Skip to content

Update packaging following uv advancements#106

Merged
mscheltienne merged 3 commits intomainfrom
packaging
May 28, 2025
Merged

Update packaging following uv advancements#106
mscheltienne merged 3 commits intomainfrom
packaging

Conversation

@mscheltienne
Copy link
Copy Markdown
Owner

@mscheltienne mscheltienne commented May 28, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a new CLI command, sys-info, with options to display optional and developer dependencies, or information for a specific package.
  • Improvements

    • Enhanced the sys_info utility to support more granular options and improved handling of dependency groups.
    • Updated documentation configuration with new autodoc options for Pydantic models.
    • Raised the minimum Python version requirement to 3.11.
    • Refined dependency management using explicit dependency groups.
    • Streamlined and modernized GitHub Actions workflows for documentation, testing, and publishing.
    • Improved pre-commit configuration with updated and new hooks.
  • Bug Fixes

    • Improved error handling and messaging in the sys_info utility for unsupported packages or missing configuration.
  • Tests

    • Expanded and updated test coverage for the sys_info utility and related features.
  • Refactor

    • Updated naming conventions and internal structure for improved clarity and maintainability.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update restructures dependency management and developer tooling by introducing PEP 735-style dependency groups in pyproject.toml, updating CLI and test infrastructure, and refining the sys-info command to support extra and developer dependency reporting. The CI workflows and pre-commit configuration are modernized, and Python 3.10 support is removed.

Changes

File(s) Change Summary
.github/workflows/doc.yaml,
.github/workflows/publish.yaml,
.github/workflows/pytest.yaml,
.github/workflows/stubs.yaml
Workflows updated: switch to setup-uv, modernize dependency installation, update Python versions, streamline steps
.pre-commit-config.yaml Added uv-pre-commit hook, updated ruff-pre-commit version
doc/conf.py Added autodoc pydantic config options, updated section comments
pyproject.toml Switched to [dependency-groups], raised Python requirement to 3.11, updated scripts, added [tool.uv] section
template/_commands/sys_info.py New CLI command: sys-info with options for extra, developer, and package
template/_commands/tests/test_sys_info.py Updated assertions for new sys-info output, added return type, refined checks
template/commands/sys_info.py Removed old sys-info CLI command implementation
template/utils/_checks.pyi Renamed check_verbose to ensure_verbose, updated docstrings
template/utils/config.py,
template/utils/config.pyi
Expanded sys_info signature, added support for extras/developer/package, now parses pyproject.toml
template/utils/logs.pyi Updated import to use ensure_verbose
template/utils/tests/test_config.py Added/updated tests for sys_info, type annotations, error handling, and other packages
tools/stubgen.py Changed directory exclusion filter from "commands" to "_commands"

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI (sys-info)
    participant config.sys_info
    participant pyproject.toml
    User->>CLI (sys-info): Invoke with --extra/--developer/--package
    CLI (sys-info)->>config.sys_info: Call with options
    alt Show core dependencies
        config.sys_info->>pyproject.toml: Read core dependencies
    end
    alt Show extras
        config.sys_info->>pyproject.toml: Read "Provides-Extra"
    end
    alt Show developer dependencies
        config.sys_info->>pyproject.toml: Parse [dependency-groups]
    end
    config.sys_info-->>CLI (sys-info): Output info
    CLI (sys-info)-->>User: Display system/dependency info
Loading

Poem

🐇
Hop, hop, the dependencies grow,
With groups and extras now in tow!
A sys-info command, new and bright,
Shows dev and docs in the CLI light.
Workflows pruned, old ways gone,
On Python 3.11+, we leap along!
— A rabbit with a modern song.


📜 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 2ed859c and e2f3e08.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (16)
  • .github/workflows/doc.yaml (1 hunks)
  • .github/workflows/publish.yaml (1 hunks)
  • .github/workflows/pytest.yaml (2 hunks)
  • .github/workflows/stubs.yaml (1 hunks)
  • .pre-commit-config.yaml (1 hunks)
  • doc/conf.py (1 hunks)
  • pyproject.toml (3 hunks)
  • template/_commands/sys_info.py (1 hunks)
  • template/_commands/tests/test_sys_info.py (2 hunks)
  • template/commands/sys_info.py (0 hunks)
  • template/utils/_checks.pyi (2 hunks)
  • template/utils/config.py (3 hunks)
  • template/utils/config.pyi (1 hunks)
  • template/utils/logs.pyi (1 hunks)
  • template/utils/tests/test_config.py (2 hunks)
  • tools/stubgen.py (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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

@github-actions github-actions Bot added the 📓 doc Issue with the documentation and examples. label May 28, 2025
@mscheltienne mscheltienne merged commit cab5638 into main May 28, 2025
18 checks passed
@mscheltienne mscheltienne deleted the packaging branch May 28, 2025 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📓 doc Issue with the documentation and examples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant