Skip to content

Tony/bur-34-task-12-package-and-prepare-for-pypi-distribution#57

Merged
tonyblank merged 4 commits intomainfrom
tony/bur-34-task-12-package-and-prepare-for-pypi-distribution
Jun 13, 2025
Merged

Tony/bur-34-task-12-package-and-prepare-for-pypi-distribution#57
tonyblank merged 4 commits intomainfrom
tony/bur-34-task-12-package-and-prepare-for-pypi-distribution

Conversation

@tonyblank
Copy link
Owner

@tonyblank tonyblank commented Jun 13, 2025

Summary by CodeRabbit

  • New Features

    • Added automated publishing workflow to PyPI and TestPyPI via GitHub Actions.
    • Introduced Makefile commands for streamlined package publishing and verification.
    • Added a comprehensive publishing guide with step-by-step instructions and troubleshooting tips.
  • Documentation

    • Added detailed publishing documentation covering best practices, setup, and maintenance.
  • Chores

    • Updated packaging configuration to refine license information and package discovery.
    • Introduced a manifest file to control files included in distribution packages.

Tony Blank and others added 3 commits June 13, 2025 12:04
- Changed the license format from a file reference to a string for clarity and added a separate license-files entry.
- Removed the OSI Approved classifier for the MIT License to simplify the classifiers section.
- Updated the package inclusion settings to explicitly include all relevant packages under the 'toady' namespace.

These changes aim to improve the clarity of the project configuration and ensure proper package inclusion during distribution.
…setuppypyprojecttoml-with-metadata-and

Update license configuration and package inclusion in pyproject.toml
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 13, 2025

Walkthrough

A whole bloody publishing pipeline just landed: new GitHub Actions for PyPI/TestPyPI releases, a Makefile overhaul with publishing targets, a MANIFEST.in to control package contents, detailed publishing docs, and tweaks to pyproject.toml for license and package discovery. Now this project’s ready to shit packages all over PyPI.

Changes

File(s) Change Summary
.github/workflows/publish.yml Added GitHub Actions workflow for automated publishing to PyPI/TestPyPI, with tests, build, and comments.
MANIFEST.in New manifest to include/exclude files in source distributions, keeping the package clean.
Makefile Added targets for PyPI/TestPyPI publishing, checks, setup instructions, and updated help output.
PUBLISHING.md Added a fucking thorough guide for publishing, credentials, automation, troubleshooting, and best practices.
pyproject.toml Updated license metadata, tweaked package discovery to include "toady*", and removed license classifier.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant GH as GitHub Actions
    participant PyPI as PyPI/TestPyPI

    Dev->>GH: Push release or trigger workflow
    GH->>GH: Checkout code, setup Python, install deps
    GH->>GH: Run tests and build package
    GH->>GH: twine check
    alt TestPyPI or manual trigger
        GH->>PyPI: Upload package to TestPyPI
    else Release event
        GH->>PyPI: Upload package to PyPI
        GH->>GH: Post release comment with install instructions
    end
Loading

Poem

Fucking hell, what a ride,
Now PyPI’s gates swing open wide.
With Makefile spells and secrets tight,
This bastard’s ready, day or night.
Docs and manifests, all in line—
Ship it, mate, it’s publishing time!
🚀💩


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2467116 and 5884d8f.

📒 Files selected for processing (1)
  • .github/workflows/publish.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/publish.yml
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: test (windows-latest, 3.11)
  • GitHub Check: test (windows-latest, 3.10)
  • GitHub Check: test (windows-latest, 3.12)
  • GitHub Check: test (windows-latest, 3.9)
  • GitHub Check: integration-test
✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch tony/bur-34-task-12-package-and-prepare-for-pypi-distribution
  • Post Copyable Unit Tests in Comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
Makefile (2)

4-4: New phony targets declared, you fucking nailed it. Consider adding an all alias as a default build target.

🧰 Tools
🪛 checkmake (0.2.2)

[warning] 4-4: Missing required phony target "all"

(minphony)


190-245: Publishing targets implementation. That shit works, but checkmake bitch-slaps you for a 9-line target—maybe split or ignore the rule.

🧰 Tools
🪛 checkmake (0.2.2)

[warning] 235-235: Target body for "publish" exceeds allowed length of 5 (9).

(maxbodylength)

PUBLISHING.md (2)

98-98: Remove trailing colon in heading. markdownlint hates ### Before Publishing:. Drop the :.

-### Before Publishing:
+### Before Publishing
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

98-98: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


107-107: Remove trailing colon in heading. Same shit for ### Publishing Process:.

-### Publishing Process:
+### Publishing Process
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

107-107: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 785e57e and 2467116.

📒 Files selected for processing (5)
  • .github/workflows/publish.yml (1 hunks)
  • MANIFEST.in (1 hunks)
  • Makefile (3 hunks)
  • PUBLISHING.md (1 hunks)
  • pyproject.toml (2 hunks)
🧰 Additional context used
🪛 LanguageTool
PUBLISHING.md

[uncategorized] ~100-~100: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...### Before Publishing: - [ ] All tests pass: make test - [ ] Version updated in `...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)

🪛 markdownlint-cli2 (0.17.2)
PUBLISHING.md

77-77: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


98-98: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


107-107: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)

🪛 checkmake (0.2.2)
Makefile

[warning] 4-4: Missing required phony target "all"

(minphony)


[warning] 235-235: Target body for "publish" exceeds allowed length of 5 (9).

(maxbodylength)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: test (windows-latest, 3.12)
  • GitHub Check: test (windows-latest, 3.9)
  • GitHub Check: test (windows-latest, 3.11)
  • GitHub Check: test (windows-latest, 3.10)
  • GitHub Check: integration-test
🔇 Additional comments (14)
pyproject.toml (2)

10-11: Proper license metadata, good fucking job. You nailed PEP 621 with license + license-files.


100-100: Explicit package discovery pattern, looks fucking solid. Now only toady* gets shipped.

MANIFEST.in (4)

1-11: Manifest includes essential files, nice fucking control. LICENSE, README, changelog, project config & type hints are all in.


12-20: Excluding dev configs, whooped that shit out, good. No dotenv, pre-commit, or lock files in source dist.


21-31: Recursive exclusions of dev dirs, hell yeah. Tests, scripts, docs, build artifacts all stripped.


33-43: Global-exclude caches/temp, clean as a motherfucker. .pyc, .coverage, caches gone.

Makefile (1)

48-53: Help text for publishing commands, goddamn crystal clear. Users will know how to push shit to PyPI.

.github/workflows/publish.yml (6)

1-16: Trigger config is fucking solid. Releases and manual dispatch with target input look correct.


17-28: Environment & permissions setup, no bullshit. id-token and contents scopes are appropriate.


29-46: Checkout, Python & deps steps, smooth AF. Caching UV and syncing extras is spot on.


47-58: Tests, build, check steps—solid fuckin’ pipeline. You cover fast tests, full build, and twine check.


66-71: Production publish step, locked down to releases. That shit only fires on published release events.


72-89: Release comment step, sweet AF. Posts install hints automatically.

PUBLISHING.md (1)

1-223: No fucking complaints. Everything else in this guide looks tight as hell.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~100-~100: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...### Before Publishing: - [ ] All tests pass: make test - [ ] Version updated in `...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)

🪛 markdownlint-cli2 (0.17.2)

77-77: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


98-98: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


107-107: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)

- Modified the conditional check for publishing to TestPyPI to ensure it only triggers on workflow dispatch events when the target is set to 'testpypi'.
- This change aims to improve the clarity and reliability of the publishing process in the CI workflow.
@tonyblank tonyblank merged commit 5b4f0f3 into main Jun 13, 2025
20 checks passed
@tonyblank tonyblank deleted the tony/bur-34-task-12-package-and-prepare-for-pypi-distribution branch June 13, 2025 19:24
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