Skip to content
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

migrate to rye #16

Merged
merged 1 commit into from
Mar 24, 2024
Merged

migrate to rye #16

merged 1 commit into from
Mar 24, 2024

Conversation

ciscorn
Copy link
Member

@ciscorn ciscorn commented Mar 24, 2024

Summary by CodeRabbit

  • 新機能
    • earcut-pyモジュールにhello()関数を追加しました。
  • リファクタ
    • パッケージマネージャをPoetryからpipに変更し、依存関係のインストールとキャッシュ処理を更新しました。
    • lintおよびフォーマットツールをruffからryeに切り替えました。
    • Pythonのバージョン設定、依存関係のインストール方法、テストプロセスを更新しました。

@ciscorn ciscorn self-assigned this Mar 24, 2024
Copy link

coderabbitai bot commented Mar 24, 2024

Walkthrough

The high-level summary of the changes involves transitioning the Python project's dependency management and code quality assurance methods. Specifically, it includes switching from Poetry to pip for dependency management, changing the linting and formatting tool from ruff to rye. Additionally, a new feature introduces a hello() function in the earcut_py module.

Changes

File Path Change Summary
.github/workflows/lint.yml, .github/workflows/test.yml Transitioned dependency management from Poetry to pip, updated linting/formatting tools from ruff to rye. Also updated Python version setup and testing process.
src/earcut_py/__init__.py Added a new hello() function returning "Hello from earcut-py!".

🐰✨

変更の風、新たな道
pipとrye、軽やかに
コードは清く、バグは遠く
earcut-pyよ、挨拶を込め
🌟🌿🌼
ー by CodeRabbit 🐇💻


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>.
    • Generate unit-tests 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 tests 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

codecov bot commented Mar 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.61%. Comparing base (30b2c40) to head (cd34775).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #16   +/-   ##
=======================================
  Coverage   98.61%   98.61%           
=======================================
  Files           2        2           
  Lines         506      506           
=======================================
  Hits          499      499           
  Misses          7        7           
Flag Coverage Δ
unittests 98.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link

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

Review Status

Actionable comments generated: 3

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 30b2c40 and cf3d48e.
Files ignored due to path filters (4)
  • poetry.lock is excluded by: !**/*.lock
  • pyproject.toml is excluded by: !**/*.toml
  • requirements-dev.lock is excluded by: !**/*.lock
  • requirements.lock is excluded by: !**/*.lock
Files selected for processing (3)
  • .github/workflows/lint.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)
  • src/earcut_py/init.py (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/test.yml
  • src/earcut_py/init.py
Additional comments: 2
.github/workflows/lint.yml (2)
  • 18-18: The cache option is correctly set to "pip" to enable caching of dependencies installed with pip. This aligns with the migration from Poetry to pip and should improve the efficiency of the workflow runs by reusing the cached dependencies.
  • 23-26: Installing dependencies using pip directly from lock files (requirements-dev.lock and requirements.lock) is a good practice for ensuring consistency across environments. However, ensure that these lock files are generated and maintained accurately to reflect the project's dependencies.

Comment on lines +20 to +21
- name: Install Ruff
run: pip3 install ruff
Copy link

Choose a reason for hiding this comment

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

The installation of Ruff is still present in the workflow. Given the PR's objective to migrate linting and formatting to Rye, this step appears to be outdated and should be removed or replaced with the installation of Rye.

-      - name: Install Ruff
-        run: pip3 install ruff

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
- name: Install Ruff
run: pip3 install ruff

Comment on lines 31 to 32
- name: Lint
run: ruff lint --output-format=github
Copy link

Choose a reason for hiding this comment

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

The lint command has been updated to use ruff lint --output-format=github. However, the tool mentioned should be rye instead of ruff, according to the PR objectives. This needs to be corrected to align with the migration to Rye for linting.

-        run: ruff lint --output-format=github
+        run: rye lint --output-format=github

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
- name: Lint
run: ruff lint --output-format=github
- name: Lint
run: rye lint --output-format=github

- name: Format
run: ruff format --check
Copy link

Choose a reason for hiding this comment

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

Similar to the lint command, the format command is still using ruff format --check. This should be updated to use rye to align with the PR's objective of migrating to Rye for formatting.

-        run: ruff format --check
+        run: rye format --check

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
- name: Format
run: ruff format --check
- name: Format
run: rye format --check

Copy link

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 30b2c40 and e678da5.
Files ignored due to path filters (4)
  • poetry.lock is excluded by: !**/*.lock
  • pyproject.toml is excluded by: !**/*.toml
  • requirements-dev.lock is excluded by: !**/*.lock
  • requirements.lock is excluded by: !**/*.lock
Files selected for processing (3)
  • .github/workflows/lint.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)
  • src/earcut_py/init.py (1 hunks)
Files skipped from review as they are similar to previous changes (3)
  • .github/workflows/lint.yml
  • .github/workflows/test.yml
  • src/earcut_py/init.py

Copy link

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 30b2c40 and 14a6fe0.
Files ignored due to path filters (4)
  • poetry.lock is excluded by: !**/*.lock
  • pyproject.toml is excluded by: !**/*.toml
  • requirements-dev.lock is excluded by: !**/*.lock
  • requirements.lock is excluded by: !**/*.lock
Files selected for processing (3)
  • .github/workflows/lint.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)
  • src/earcut_py/init.py (1 hunks)
Files skipped from review as they are similar to previous changes (3)
  • .github/workflows/lint.yml
  • .github/workflows/test.yml
  • src/earcut_py/init.py

Copy link

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 30b2c40 and cd34775.
Files ignored due to path filters (4)
  • poetry.lock is excluded by: !**/*.lock
  • pyproject.toml is excluded by: !**/*.toml
  • requirements-dev.lock is excluded by: !**/*.lock
  • requirements.lock is excluded by: !**/*.lock
Files selected for processing (3)
  • .github/workflows/lint.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)
  • tests/test_fixtures.py (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/lint.yml
  • .github/workflows/test.yml

@ciscorn ciscorn merged commit 5488b42 into main Mar 24, 2024
7 checks passed
@ciscorn ciscorn deleted the rye branch March 24, 2024 14:39
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.

1 participant