Skip to content

Conversation

@ankith26
Copy link
Member

@ankith26 ankith26 commented Nov 2, 2025

import-names: https://peps.python.org/pep-0794/

I also took the opportunity to add the keywords metadata, hopefully it improves pypi discoverability

@ankith26 ankith26 requested a review from a team as a code owner November 2, 2025 05:43
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 2, 2025

📝 Walkthrough

Walkthrough

Two new project metadata fields added to pyproject.toml: keywords listing pygame-related terms and import-names specifying the primary import name. No functional or behavioral changes.

Changes

Cohort / File(s) Change Summary
Project metadata configuration
pyproject.toml
Added keywords field with pygame, game, gamedev tags and import-names field with pygame import identifier under [project] section

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Add keywords and import-names to pyproject.toml" accurately and directly describes the main changes in the changeset. The title is concise, clear, and specific, clearly indicating that two metadata fields (keywords and import-names) are being added to the pyproject.toml configuration file. The title matches the actual changes demonstrated in the raw summary and aligns with the PR objectives.
Description Check ✅ Passed The pull request description is clearly related to the changeset. It explains the purpose of adding the import-names field by referencing PEP 794 and provides context for the keywords addition, noting that it is intended to improve PyPI discoverability. While brief, the description conveys meaningful information about both changes and their rationale without being vague or generic.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ankith26-import-names

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c2020e and 7c3c109.

📒 Files selected for processing (1)
  • pyproject.toml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-08T08:15:01.411Z
Learnt from: ankith26 Repo: pygame-community/pygame-ce PR: 3602 File: buildconfig/stubs/pygame/locals.pyi:601-1198 Timestamp: 2025-10-08T08:15:01.411Z Learning: The repository pygame-community/pygame-ce is for pygame-ce (pygame community edition), not the original pygame project. Always refer to it as pygame-ce in reviews and analyses. 

Applied to files:

  • pyproject.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: build (windows-latest)
  • GitHub Check: x86_64
  • GitHub Check: Debian (Bookworm - 12) [armv6]
  • GitHub Check: Debian (Bookworm - 12) [ppc64le]
  • GitHub Check: x86
  • GitHub Check: aarch64
  • GitHub Check: AMD64
  • GitHub Check: Debian (Bookworm - 12) [s390x]
  • GitHub Check: i686
  • GitHub Check: msys2 (ucrt64, ucrt-x86_64)
  • GitHub Check: build (ubuntu-22.04)
  • GitHub Check: debug_coverage (ubuntu-24.04, 3.14.0)
  • GitHub Check: msys2 (mingw64, x86_64)
  • GitHub Check: msys2 (clang64, clang-x86_64)
  • GitHub Check: debug_coverage (ubuntu-24.04, 3.10.17)
  • GitHub Check: Pyodide build
  • GitHub Check: dev-check
🔇 Additional comments (1)
pyproject.toml (1)

9-10: Keywords and import-names metadata are correct and safe.

Both fields follow best practices:

  • Line 9: keywords = ["pygame", "game", "gamedev"] is standard PyPI metadata; values are relevant for pygame-ce discoverability.
  • Line 10: import-names = ["pygame"] correctly follows PEP 794 (accepted; core metadata v2.5). Since pygame-ce is imported as pygame, this mapping is accurate.

No issues were found in the PyPI/Warehouse, twine, or setuptools repositories, and PEP 794 is officially published with reference implementation. Even if current PyPI deployment has not yet recognized the import-names field, it will not prevent package upload—the field will simply be preserved in metadata for future use. Testing before publication remains a good practice, but these changes are safe to merge.


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 and usage tips.

@ankith26
Copy link
Member Author

ankith26 commented Nov 2, 2025

this PR can potentially fix #2478 but it depends on whether PyCharm supports this metadata rn. It would be cool if some pycharm user were to test this PR.

@Starbuck5
Copy link
Member

I'm extremely doubtful Pycharm would support this, it's pretty new.

Do you need to update the metadata in setup.py as well?

@ankith26
Copy link
Member Author

ankith26 commented Nov 2, 2025

Do you need to update the metadata in setup.py as well?

That won't be necessary. All our pypi wheels use pyproject.toml + new meson buildconfig.

@Starbuck5
Copy link
Member

Regardless, it would be good to keep them consistent while they both still exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants