Skip to content

refactor: rename API entry points to snake_case and centralize settings - #269

Merged
MrIbrahem merged 2 commits into
mainfrom
update
Aug 24, 2026
Merged

MrIbrahem merged 2 commits into
mainfrom
update

Conversation

@MrIbrahem

Copy link
Copy Markdown
Member

No description provided.

This commit standardizes wiki API entry points to snake_case naming across the codebase and updates call sites to use the new lowercase helpers. It also centralizes configuration behind main_settings, introduces a dedicated bot edit checker module, and fixes a few compatibility issues in the API client layer, including cookie handling, retry naming, bot detection, and max-value typing.
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c84d7815-0f08-40ce-8894-fe2002dec0b9


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MrIbrahem MrIbrahem left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary

This PR standardizes API entry points to snake_case and centralizes config under main_settings. The rename is thorough for most of src/, but I found 3 runtime-breaking call sites that were missed, plus a scope gap with the src1/ tree.

Verdict: Comment 💬 (forced — you're the PR author; underlying assessment is 🔴 blocking issues found)

Title

The title "Update" is too vague and doesn't describe the change. The repo's recent history is inconsistent (many blank/vague titles), but descriptive Refactor ... / Migrate ... prefixes are used. Suggested alternatives:

  • refactor: rename API entry points to snake_case and centralize settings
  • chore: normalize wiki API naming and settings access
  • refactor(newapi): snake_case API helpers + main_settings

Also, the PR body is empty — I can fill it in from the diff/commit message if you want.

Highlights

  • Consistent, repo-wide snake_case rename of API helpers (GetPageTextget_page_text, NewApinewapi, etc.).
  • mdwiki_api.mdwiki_page keeps NewApi/MainPage/CatDepth as backward-compatible aliases — good for limiting blast radius.
  • bot_edit/__init__.py nicely extracted into edit_checker.py.
  • Good defensive fix in cookies_client.py (accept None path, default cookies_dir).

Issues found

  • 🔴 Blocking: 3 — see inline comments
    • bot_api.py:726 calls post_continue_list positionally after it became keyword-only → TypeError.
    • fixour.py:69 and fix_cs1/fix_cs_params/bot.py:311 still call the renamed Get_All_pagesAttributeError.
  • 🟡 Suggestions: 3 (unused is_bot/mainpagesolvereditect, int | Any type, plus the title/body above)

Scope note (needs confirmation, not necessarily blocking)

The commit says it updates call sites "across the codebase," but the large src1/ tree was not touched and still references the old names (GetPageText, Get_All_pages, NewApi, MainPage, Find_pages_exists_or_not, Get_template_pages, Get_UserContribs). If src1/ is still deployed/run, those entry points also break. Please confirm whether src1/ is in scope, and consider adding a CI grep to catch missed renames in future.

Comment thread src/newapi/api_client/client.py
Comment thread src/newapi/client_wiki/bot_api.py
Comment thread src/newapi/client_wiki/api_utils/bot_edit/edit_checker.py
Comment thread src/newapi/client_wiki/all_apis.py
Comment thread src/newapi/api_client/client.py
@MrIbrahem MrIbrahem changed the title Update refactor: rename API entry points to snake_case and centralize settings Aug 24, 2026
@MrIbrahem
MrIbrahem merged commit e9272a5 into main Aug 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant