Skip to content

fix: use release-please python#7

Merged
cademirch merged 1 commit intomainfrom
fix-release
Feb 11, 2025
Merged

fix: use release-please python#7
cademirch merged 1 commit intomainfrom
fix-release

Conversation

@cademirch
Copy link
Copy Markdown
Collaborator

@cademirch cademirch commented Feb 11, 2025

I had used the "simple" strategy since in release-please's docs the Python strategy required a setup.py, but it seems to work fine without. This strategy will update the version in pyproject.toml.

I've also updated the pypi trusted Github repo to point to this one.

Sorry for all the hassle with this @dlaehnemann and @johanneskoester - appreciate your patience with me! This should be it though.

Summary by CodeRabbit

  • Chores
    • Refined our release process to support Python-specific releases.
    • Removed an outdated version indicator to streamline version management.

I had used the "simple" strategy since in release-please's docs the Python strategy required a setup.py, but it seems to work fine without. This strategy will update the version in pyproject.toml
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 11, 2025

📝 Walkthrough

Walkthrough

This pull request modifies the GitHub Actions workflow for the release-please job by updating its configuration. The release-type parameter in .github/workflows/release-please.yml has been changed from simple to python to indicate a transition to a Python-centric release process. Additionally, the file version.txt, which previously contained the version number 0.1.2, has been removed.

Changes

File(s) Summary
.github/workflows/release-please.yml Updated the release-type parameter from simple to python in the release-please job.
version.txt Deleted the file that contained the version number 0.1.2.

Sequence Diagram(s)

sequenceDiagram
    participant Runner as GitHub Actions Runner
    participant ReleaseJob as Release-Please Job
    Runner->>ReleaseJob: Trigger workflow (e.g., push/release event)
    ReleaseJob->>ReleaseJob: Load configuration (release-type: python)
    ReleaseJob-->>Runner: Generate releases with Python-specific settings
Loading

Possibly related PRs

Suggested reviewers

  • dlaehnemann

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 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. (Beta)
  • @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
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)
.github/workflows/release-please.yml (1)

17-18: LGTM! Clean up trailing spaces.

The change to use release-type: python aligns with modern Python packaging practices and is appropriate for managing versions in pyproject.toml.

Remove trailing spaces on line 18.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 18-18: trailing spaces

(trailing-spaces)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c26b9a3 and 72e3c63.

⛔ Files ignored due to path filters (1)
  • pyproject.toml is excluded by !pyproject.toml
📒 Files selected for processing (2)
  • .github/workflows/release-please.yml (1 hunks)
  • version.txt (0 hunks)
💤 Files with no reviewable changes (1)
  • version.txt
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/release-please.yml

[error] 18-18: trailing spaces

(trailing-spaces)

🔇 Additional comments (1)
.github/workflows/release-please.yml (1)

1-66: Verify version management after removing version.txt.

The workflow looks good overall. Since version.txt has been removed, please verify that:

  1. The version is correctly specified in pyproject.toml
  2. Release-please can detect and update the version correctly

Let's verify the version management setup:

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Check version management setup

# Check if version is specified in pyproject.toml
echo "Checking version in pyproject.toml:"
cat pyproject.toml | grep -A 1 '^\[tool\.poetry\]'

# Check release-please configuration
echo -e "\nChecking release-please configuration:"
fd -t f "release-please-config.json|.release-please-manifest.json"

Length of output: 335


Let's run an additional check to see if a version field is declared in pyproject.toml since the initial grep didn't show one.


🏁 Script executed:

#!/bin/bash
# Check for a version field in pyproject.toml
echo "Searching for version field in pyproject.toml:"
grep -E "^\s*version\s*=" pyproject.toml || echo "No version field found."

Length of output: 163


Version management is correctly configured.

  • The pyproject.toml file correctly specifies a version (version = "0.1.2").
  • The release-please action uses release-type: python, which by default detects and updates the version in pyproject.toml without requiring a separate configuration file.
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 18-18: trailing spaces

(trailing-spaces)

Copy link
Copy Markdown
Member

@dlaehnemann dlaehnemann left a comment

Choose a reason for hiding this comment

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

Should we merge this first, and then the resulting release-please pull request?

@dlaehnemann
Copy link
Copy Markdown
Member

release-please is very useful, but getting this set up properly is always a hassle...

@cademirch
Copy link
Copy Markdown
Collaborator Author

Should we merge this first, and then the resulting release-please pull request?

Yes, thats what I had in mind.

release-please is very useful, but getting this set up properly is always a hassle...

Yeah it is very useful, but a bit tricky for sure.

@cademirch cademirch merged commit 2e1c9b2 into main Feb 11, 2025
6 checks passed
@cademirch cademirch deleted the fix-release branch February 11, 2025 19:28
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.

2 participants