Skip to content

docs: add documentation about releases in the contributing doc#56

Merged
AlexButeau merged 1 commit intomainfrom
alex/sdk-32-document-the-python-client-release-process
Mar 17, 2025
Merged

docs: add documentation about releases in the contributing doc#56
AlexButeau merged 1 commit intomainfrom
alex/sdk-32-document-the-python-client-release-process

Conversation

@AlexButeau
Copy link
Copy Markdown
Contributor

@AlexButeau AlexButeau commented Mar 7, 2025

Summary by CodeRabbit

  • Documentation
    • Enhanced contribution guidelines with instructions on the package publishing process.
    • Added a step-by-step guide for testing the Python client locally.
    • Detailed the process for releasing test and production versions of the package.

@AlexButeau AlexButeau added the documentation Improvements or additions to documentation label Mar 7, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 7, 2025

Walkthrough

This update enhances the CONTRIBUTING.md file by adding detailed sections on the package publishing process. The new content explains how commits with "feat" or "fix" prefixes on the main branch trigger an automatic release pull request, including updates to the changelog and version in setup.py, followed by the package upload to PyPI via Twine. Additional instructions guide developers on locally testing the Python Client and outline that only team members can merge production releases.

Changes

File Change Summary
CONTRIBUTING.md Added "How is the package published?" section detailing the automated release process with GitHub Actions, release-please, and Twine. Introduced sections for local testing and production release.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant GH as GitHub Actions
    participant RP as release-please
    participant Team as TofuPilot Team
    participant PyPI as PyPI

    Dev->>GH: Commit to main ("feat"/"fix")
    GH->>RP: Trigger automated release process
    RP->>GH: Create release pull request
    Team->>GH: Merge release pull request
    GH->>GH: Update changelog and setup.py version
    GH->>PyPI: Upload package using Twine
Loading

Poem

Oh, what a hop in every byte,
A new release takes off in flight,
With GitHub Actions lighting the way,
Code and magic come to play,
TofuPilot soars to a brighter day! 🐇✨


🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

@AlexButeau AlexButeau force-pushed the alex/sdk-32-document-the-python-client-release-process branch from a2cb9d9 to 6bc28c7 Compare March 7, 2025 14:59
Copy link
Copy Markdown

@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: 0

🧹 Nitpick comments (2)
CONTRIBUTING.md (2)

55-65: Clear Documentation on Package Publishing Process

This new section thoroughly explains how the package is published using release-please and Twine via GitHub Actions. The links to the relevant documentation and workflow files provide additional context for developers. Consider adding a brief troubleshooting note or common error scenarios in case the automated release process encounters issues.


91-113: Clear Guidelines for Releasing a Test Version

The instructions for publishing to TestPyPI are well-detailed and include all necessary steps. As a minor improvement, consider rephrasing “with the exact same version” (line 102) to simply “with the same version” to reduce wordiness.

🧰 Tools
🪛 LanguageTool

[style] ~102-~102: ‘exact same’ might be wordy. Consider a shorter alternative.
Context: ... 2. If a previous test package with the exact same version was released, update the versio...

(EN_WORDINESS_PREMIUM_EXACT_SAME)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a2cb9d91b6c2f58a42b8a2b998786fb8d96f7489 and 6bc28c72189703dea577091c34ee85f4d94be438.

📒 Files selected for processing (1)
  • CONTRIBUTING.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
CONTRIBUTING.md

[style] ~102-~102: ‘exact same’ might be wordy. Consider a shorter alternative.
Context: ... 2. If a previous test package with the exact same version was released, update the versio...

(EN_WORDINESS_PREMIUM_EXACT_SAME)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: test (windows-latest)
  • GitHub Check: test (ubuntu-latest)
🔇 Additional comments (2)
CONTRIBUTING.md (2)

66-90: Detailed Instructions for Testing the Python Client Locally

The step-by-step guide for testing the Python client locally is clear and well-structured. The instructions for updating the version in setup.py, cleaning the distribution directory, and building the package are easy to follow. This should greatly help contributors in verifying their changes before an official release.


114-118: Concise Process for Releasing a Production Version

The production release section clearly emphasizes that only TofuPilot team members can merge the release PR, ensuring controlled production deployments, while still welcoming community contributions. This reinforces the necessary security and process controls.

@AlexButeau AlexButeau force-pushed the alex/sdk-32-document-the-python-client-release-process branch from 6bc28c7 to ea726ba Compare March 7, 2025 15:18
Copy link
Copy Markdown

@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: 0

🧹 Nitpick comments (1)
CONTRIBUTING.md (1)

81-98: Structured Guide for Releasing a Test Version
The section covers all the essential steps for testing a new package version on TestPyPI—from rebuilding the package to using Twine for upload.

  • Suggestion : The phrase "with the exact same version" (line 88) may be simplified to "with the same version" or "identical version" for brevity, as indicated by the static analysis hint.
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6bc28c72189703dea577091c34ee85f4d94be438 and ea726ba.

📒 Files selected for processing (1)
  • CONTRIBUTING.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
CONTRIBUTING.md

[style] ~102-~102: ‘exact same’ might be wordy. Consider a shorter alternative.
Context: ... 2. If a previous test package with the exact same version was released, update the versio...

(EN_WORDINESS_PREMIUM_EXACT_SAME)

🔇 Additional comments (3)
CONTRIBUTING.md (3)

55-64: Detailed Documentation for the Publishing Process
The new section clearly explains how TofuPilot is published using release-please and Twine via GitHub Actions. The inclusion of links to the relevant workflow files and documentation provides helpful context. Ensure that "releasable units" are well understood by developers—consider briefly defining what qualifies (e.g., commits with "feat" or "fix" prefixes in main).


60-80: Clear, Step-by-Step Local Testing Instructions
The "Testing the Python Client locally" section provides a well-structured guide. The instructions on creating a new branch, updating the version in setup.py (from "X.Y.Z" to "X.Y.Z.dev0"), cleaning the distribution directory, building the package, and installing it locally are concise and actionable.


99-100: Controlled Production Release Process
The documentation clearly states that only TofuPilot team members can merge the release PR into main, ensuring that production releases are properly managed. This emphasis on gated access is excellent for maintaining release integrity.

@AlexButeau AlexButeau requested a review from upview March 7, 2025 15:25
@AlexButeau AlexButeau merged commit d1aa208 into main Mar 17, 2025
3 checks passed
@upview upview deleted the alex/sdk-32-document-the-python-client-release-process branch August 11, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant