Skip to content

Conversation

@2bndy5
Copy link
Contributor

@2bndy5 2bndy5 commented May 30, 2025

  • Use uv to manage dependencies
  • Updated dependabot config to use uv.lock file
  • Remove requirements*.txt in favor of uv.lock
  • Use nox as the project task runner
  • Updated CI to use uv and nox
  • Add CONTRIBUTING doc about on-boarding info
  • Update RTD config

Summary by CodeRabbit

  • New Features

    • Added a comprehensive contributor guide outlining setup, testing, and documentation instructions.
    • Introduced automation scripts to streamline development tasks, testing, and documentation building.
  • Improvements

    • Switched environment and dependency management to use the uv tool across development, testing, and documentation workflows.
    • Simplified and clarified project dependencies and development tools configuration.
    • Enhanced documentation with new navigation and theme options.
    • Refined GitHub Actions workflows for building documentation, running tests, and generating coverage reports.
    • Updated documentation build and hosting processes for better integration and automation.
    • Enforced consistent line endings for YAML and TOML files.
  • Removals

    • Deleted legacy requirements and development dependency files in favor of centralized configuration.
  • Documentation

    • Integrated contributing guidelines directly into the documentation navigation.

2bndy5 added 2 commits May 30, 2025 14:35
- Use `uv` to manage dependencies
- Remove requirements*.txt in favor of uv.lock
- Updated dependabot config to use uv.lock file
- Use `nox` as the project task runner
- Updated CI to use `uv` and `nox`
- Add CONTRIBUTING doc about on-boarding info
- Update RTD config
@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 30, 2025
@2bndy5 2bndy5 force-pushed the switch-to-uv branch 3 times, most recently from 24c51f9 to 94139f2 Compare May 30, 2025 23:02
@codecov
Copy link

codecov bot commented May 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.25%. Comparing base (f01a6b1) to head (bab6473).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #143      +/-   ##
===========================================
- Coverage   100.00%   98.25%   -1.75%     
===========================================
  Files           24       23       -1     
  Lines         1869     1886      +17     
===========================================
- Hits          1869     1853      -16     
- Misses           0       33      +33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@2bndy5
Copy link
Contributor Author

2bndy5 commented May 31, 2025

Well, coverage went down for some reason; I'll investigate that.

I had a lot of trouble testing pre-release python on Windows (& some Linux) runners. So, I've disable using pre-releases for now.

Test in CI are now done with fewer jobs. Each clang version gets its own job per platform. Each test jobs uses all supported stable versions of Python. Over all, this approach takes ~5 min less CI time and uses much less CI artifacts.

I think this also fixes the problem we had before uploading coverage reports. But I'm not using the reusable workflow for that anymore.

@2bndy5 2bndy5 marked this pull request as ready for review May 31, 2025 00:09
@coderabbitai
Copy link

coderabbitai bot commented May 31, 2025

Note

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Walkthrough

This update restructures the project's dependency management and automation workflows. It removes requirements.txt and requirements-dev.txt in favor of explicit dependency declarations in pyproject.toml and introduces dependency groups. Development automation is migrated to a new noxfile.py using the uv tool. Continuous integration workflows are revised to use uv and Nox, with jobs rewritten for clarity and efficiency. Documentation build and contribution guidelines are updated accordingly.

Changes

File(s) Change Summary
.gitattributes Updated to normalize line endings for .yml, .yaml, and .toml files (with a typo for .yaml).
.github/dependabot.yml Changed package ecosystem from pip to uv and renamed group accordingly.
.github/workflows/build-docs.yml Replaced reusable workflow with explicit steps using uv and Nox for documentation build and deployment.
.github/workflows/run-dev-tests.yml Removed separate build job, simplified test matrix, switched to uv and Nox, and made coverage reporting explicit.
.gitpod.yml Switched environment setup from pip to uv commands for dependency sync and pre-commit installation.
.readthedocs.yaml Replaced Sphinx builder config with custom job-based build using uv and Nox.
CONTRIBUTING.rst New file with setup and contribution instructions using uv and Nox.
docs/conf.py Added Sphinx extension for inline icons and a new palette for theme options.
docs/contributing.rst Now includes the main CONTRIBUTING.rst file.
docs/index.rst Added "contributing" to hidden toctree for documentation navigation.
docs/requirements.txt Removed the only dependency (sphinx-immaterial).
noxfile.py New file defining sessions for docs, test, test-all, and coverage using uv and Nox.
pyproject.toml Declared all dependencies explicitly, introduced dependency groups, and updated coverage config.
requirements-dev.txt, requirements.txt Deleted; dependencies now managed through pyproject.toml and dependency groups.

Sequence Diagram(s)

CI Test Workflow (New)

sequenceDiagram
    participant GitHub Actions
    participant uv
    participant Nox
    participant pytest
    participant Coverage

    GitHub Actions->>uv: Install and sync dependencies (test group)
    GitHub Actions->>Nox: Run test-all session
    Nox->>pytest: Execute tests with coverage
    pytest->>Coverage: Generate coverage data
    GitHub Actions->>Nox: Run coverage session
    Nox->>Coverage: Combine and report coverage
    GitHub Actions->>Codecov: Upload coverage data
Loading

Documentation Build and Deploy (New)

sequenceDiagram
    participant GitHub Actions
    participant uv
    participant Nox
    participant Sphinx
    participant GitHub Pages

    GitHub Actions->>uv: Install and sync dependencies (docs group)
    GitHub Actions->>Nox: Run docs session
    Nox->>Sphinx: Build HTML documentation
    GitHub Actions->>GitHub Pages: Deploy docs if on main branch
Loading

Local Development Setup (from CONTRIBUTING.rst)

sequenceDiagram
    participant Developer
    participant uv
    participant pre-commit
    participant Nox

    Developer->>uv: Run uv sync to create venv and install dev dependencies
    Developer->>uv: Run pre-commit install
    Developer->>uv: Run nox -s test or nox -s docs
    uv->>Nox: Execute test/docs session
Loading

Suggested labels

enhancement


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

coderabbitai[bot]

This comment was marked as resolved.

Copy link
Contributor

@shenxianpeng shenxianpeng left a comment

Choose a reason for hiding this comment

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

All goood.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@2bndy5 2bndy5 force-pushed the switch-to-uv branch 2 times, most recently from 4a4024d to a56e20e Compare May 31, 2025 03:20
call `uv` directly when using it

use fixed install path
coderabbitai[bot]

This comment was marked as resolved.

@2bndy5
Copy link
Contributor Author

2bndy5 commented May 31, 2025

@coderabbitai pause

@2bndy5 2bndy5 force-pushed the switch-to-uv branch 4 times, most recently from c09f654 to 872f3e0 Compare June 1, 2025 02:59
@2bndy5 2bndy5 linked an issue Jun 1, 2025 that may be closed by this pull request
CI run only tests that need to be repeated for each version of clang. 1 job tests everything
@2bndy5
Copy link
Contributor Author

2bndy5 commented Jun 12, 2025

I don't understand the loss of coverage. I run the tests locally and some lines are covered but not covered in CI. I also see lines missing coverage in both CI and local results, but these lines should be triggered by the current tests that are being run.

I'm giving up on the coverage investigation. I really think it is a side effect of using chdir() with multithreading. @coderabbitai resume

@coderabbitai

This comment was marked as off-topic.

@2bndy5
Copy link
Contributor Author

2bndy5 commented Jun 12, 2025

Avoid calling os.chdir() in production code

I will pursue this idea in a separate issue. It may also be causing some other problems.

@2bndy5 2bndy5 merged commit cf35912 into main Jun 12, 2025
40 checks passed
@2bndy5 2bndy5 deleted the switch-to-uv branch June 12, 2025 03:41
@2bndy5 2bndy5 mentioned this pull request Jul 26, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Probably remove if __name__ == "__main__"

3 participants