Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: move deps from requirements.txt to pyproject.toml #233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 1, 2025

Conversation

shenxianpeng
Copy link
Contributor

@shenxianpeng shenxianpeng commented May 31, 2025

Summary by CodeRabbit

  • Chores
    • Simplified dependency management by switching from requirements files to using package extras for development and documentation dependencies.
    • Updated workflow and environment setup to use the new dependency approach.
    • Removed obsolete requirements files related to development and documentation.
    • Updated project configuration to define development and documentation dependencies directly.

Copy link
Contributor

coderabbitai bot commented May 31, 2025

Caution

Review failed

The pull request is closed.

## Walkthrough

This update transitions the project's dependency management from requirements files to using package extras defined in `pyproject.toml`. It removes `requirements-dev.txt` and `docs/requirements.txt`, adjusts workflow and Gitpod commands, and updates `noxfile.py` to install dependencies via extras, streamlining development and documentation setup.

## Changes

| File(s)                                         | Change Summary                                                                                           |
|------------------------------------------------|--------------------------------------------------------------------------------------------------------|
| .github/workflows/main.yml, .gitpod.yml         | Replaced explicit requirements file installation with package extras (`.[dev]`), simplified setup steps. |
| docs/requirements.txt, requirements-dev.txt     | Deleted requirements files for docs and development dependencies.                                       |
| noxfile.py                                      | Removed REQUIREMENTS dict; sessions now install dependencies using package extras (`.[test]`, `.[docs]`).|
| pyproject.toml                                  | Added `[project.optional-dependencies]` for `dev`, `test`, and `docs` extras.                           |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant Developer
    participant Workflow/Gitpod/Nox
    participant Package Installer

    Developer->>Workflow/Gitpod/Nox: Initiate environment setup
    Workflow/Gitpod/Nox->>Package Installer: pip install .[dev] or .[docs]
    Package Installer-->>Workflow/Gitpod/Nox: Installs dependencies from pyproject.toml extras
    Workflow/Gitpod/Nox-->>Developer: Environment ready

Possibly related PRs

Suggested labels

documentation

Poem

🐇
Goodbye, old files of requirements past,
Now extras install dependencies fast.
With pyproject in charge, the setup is neat,
No more chasing lists—just one tidy sheet!
Docs and devs, hop on with glee,
For streamlined installs, as easy as can be!
🌱✨


<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS4NY+CtcjN8UyEu7IAZhRaQABg4AjtjwDmwYuIgauAAeuH6QBP7csrz4ImLRLBZ+BgBy2MwClFwATADM5QYAqoglkIiwZDHwmNxkREb6xuBQZPT4njgExGTKNPRMrOxcvPzCouJSMvJMSlSq6lo63SZQcKiomMOEpORUEwrTEVxUAO4NhcxoFPJyCusqapraumCGPVMBg0RHUsGwAgA9Hd7ABrTwWfB3RCQ57wDAaWTMCwcAwAIgJBgAxETIABBACSo3O1Doj1YL3kg0YsEwpEQZiakBhFHhiIeYRc0nQFgskBIMW4FngDHUyXg3BQGEQuDQot0fCCITC7EQYCUEmicQSU2eGFoyEw9AcUrQDGFuCazG5YPFYMoSpVaulGCIiS53DtsLQpBdjv8AG0DQBdBIS3BUZD2T2q0Xov1+DD4GJxyXS2W4CyyDSQClYR0kSACEIWehWtz4BjIISCRAAGn9lZVJEVjuoKe9dINJER3HCuEgWtCJHHXh8zork5IwWns8gnngVhQyBtFjtdPeaAaNF7rIn2G4RCoSmQ3AV6HNA9FyEz2YSElayVkjvwWDAzrvRV0S9dUsxzEsy07J8xRbAQO0XYDUz3cRf34IZh1Hcc3B7foyFlYVEDudRbGFbxfGwRB0ygqcdQiLxN0rJJEO9KjF0DBhg1DIjwz8KMSAkWNxTiRNIA/I8/EA6DIA0PiBL8Es4GkStbDZYUR3gZh0VpNxpzESAKJDStmUXGiZ11fV+KNCcNy3dF1zQCRk2ZZi019bCpEw9hsPac08PgB1YB8bAiFgKD2M4yt4xE5MXJ9DMwNzKUZUsYsjCMElyQsGgLngX9kCS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y28VYesNjfG2H8QwGu/a4CafAC0TSmv+VM7QJpXow3W8BFAAAHAANgAAy+4AKwAHZygh4ACwMFKAATgEAARkD2H2gAhfcB/KAwWgDBA+J7QInuPQDyhh6j7QOPceo+lG9xr2gpQGCVED6UNAqeBAMH9/7zwuDE/+7D4nqP5QSDlDQJ3sPQfA8MCTyHwP/vfdRu6AYW3n31AO6dy789dAmn9Gt0AA= -->

<!-- internal state end -->

---

<details>
<summary>📜 Recent review details</summary>

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


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between d2c3302a7dbc66fad167143e3a6f7600cb15068c and 2cb7753d98673d57ae2f1286c4a34570d7a32219.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `noxfile.py` (1 hunks)
* `pyproject.toml` (1 hunks)

</details>

</details>
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=commit-check/commit-check&utm_content=233):

- 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](https://www.coderabbit.ai/contact-us/support) 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](https://docs.coderabbit.ai/finishing-touches/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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

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: 3

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 742fc42 and 8608573.

📒 Files selected for processing (6)
  • .github/workflows/main.yml (1 hunks)
  • .gitpod.yml (1 hunks)
  • docs/requirements.txt (0 hunks)
  • noxfile.py (2 hunks)
  • pyproject.toml (1 hunks)
  • requirements-dev.txt (0 hunks)
💤 Files with no reviewable changes (2)
  • docs/requirements.txt
  • requirements-dev.txt
🧰 Additional context used
🪛 Pylint (3.3.7)
noxfile.py

[convention] 67-67: Missing function or method docstring

(C0116)

🔇 Additional comments (3)
pyproject.toml (1)

43-53: LGTM! Clean dependency group implementation.

The dependency groups are well-structured and follow PEP 735 standards. The separation of dev and docs dependencies is logical, and including "." in the docs group ensures the current package is available for documentation builds.

.gitpod.yml (1)

6-8: LGTM! Correctly updated for dependency groups.

The changes properly transition from installing requirements-dev.txt to using the new [dev] dependency group. This simplifies the setup process while maintaining the same functionality.

.github/workflows/main.yml (1)

64-65: LGTM! Workflow correctly updated for dependency groups.

The installation command properly uses the new [dev] dependency group instead of requirements files, maintaining consistency with the project's transition to pyproject.toml-based dependency management.

shenxianpeng and others added 7 commits May 31, 2025 22:51
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link

codecov bot commented Jun 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (742fc42) to head (2cb7753).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #233   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          290       290           
=========================================
  Hits           290       290           

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

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

🧹 Nitpick comments (1)
noxfile.py (1)

64-67: LGTM! Correct implementation of package extras with additional dependency.

The docs-live session correctly combines package extras '.[docs]' with the additional "sphinx-autobuild" package. The syntax is proper and maintains the intended functionality.

Note: Static analysis suggests adding a docstring for this function, but this is a minor convention issue for nox session functions.

🧰 Tools
🪛 Pylint (3.3.7)

[convention] 65-65: Missing function or method docstring

(C0116)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8608573 and d2c3302.

📒 Files selected for processing (3)
  • .github/workflows/main.yml (3 hunks)
  • noxfile.py (1 hunks)
  • pyproject.toml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/main.yml
  • pyproject.toml
🧰 Additional context used
🪛 Pylint (3.3.7)
noxfile.py

[convention] 59-59: Missing function or method docstring

(C0116)


[convention] 65-65: Missing function or method docstring

(C0116)

🔇 Additional comments (2)
noxfile.py (2)

51-55: LGTM! Correct implementation of package extras.

The transition from requirements files to package extras syntax is correctly implemented. The '.[test]' syntax properly installs the test dependencies defined in pyproject.toml.

🧰 Tools
🪛 Pylint (3.3.7)

[convention] 51-51: Missing function or method docstring

(C0116)


58-61: LGTM! Correct implementation of package extras.

The docs session correctly uses package extras syntax with '.[docs]' to install documentation dependencies from pyproject.toml.

🧰 Tools
🪛 Pylint (3.3.7)

[convention] 59-59: Missing function or method docstring

(C0116)

Copy link

sonarqubecloud bot commented Jun 1, 2025

@shenxianpeng shenxianpeng changed the title chore: remove requirements.txt files chore: move deps from requirements.txt to pyproject.toml Jun 1, 2025
@shenxianpeng shenxianpeng merged commit 0219eb3 into main Jun 1, 2025
25 of 26 checks passed
@shenxianpeng shenxianpeng deleted the drop-requirement-txt branch June 1, 2025 16:30
@shenxianpeng shenxianpeng added the enhancement New feature or request label Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant