-
Notifications
You must be signed in to change notification settings - Fork 68
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
chore: migrate package manager from Poetry to Rye #6
Conversation
WalkthroughThis update transitions the project’s dependency management from Poetry to Rye, modernizing the environment setup. The Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant VSCode
participant Docker
participant Rye
participant Hatch
Developer->>VSCode: Open project
VSCode->>Docker: Build container
Docker->>Rye: Install dependencies
Rye->>Hatch: Build project
Hatch-->>Docker: Project ready
Docker-->>VSCode: Container built
VSCode-->>Developer: Environment ready
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this 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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (3)
poetry.lock
is excluded by!**/*.lock
requirements-dev.lock
is excluded by!**/*.lock
requirements.lock
is excluded by!**/*.lock
Files selected for processing (3)
- .devcontainer/Dockerfile (1 hunks)
- .vscode/settings.json (1 hunks)
- pyproject.toml (1 hunks)
Files skipped from review due to trivial changes (1)
- .vscode/settings.json
Additional comments not posted (12)
.devcontainer/Dockerfile (4)
4-4
: Good practice: Use ofpipefail
option.Setting the
pipefail
option ensures that the shell will exit if any command in a pipeline fails, which is a good practice for robust error handling.
5-5
: Approved: Installation of Rye using curl.The command uses curl to download and install Rye with specific options for error handling and non-interactive installation.
7-7
: Approved: Setting RYE_HOME environment variable.The command sets the RYE_HOME environment variable to a specific directory, which is necessary for configuring Rye.
8-8
: Approved: Updating PATH to include Rye shims.The command updates the PATH environment variable to include Rye shims, which is necessary for using Rye commands.
pyproject.toml (8)
1-1
: Approved: Transition from Poetry to Hatch.The
[tool.poetry]
section is renamed to[project]
, indicating a shift from Poetry to Hatch for project management.
3-3
: Approved: Project version update.The project version is updated from
0.9.0
to0.10.0
, suggesting new features or improvements.
5-5
: Approved: Project metadata.The project description and author details are necessary for project metadata.
6-12
: Approved: Listing dependencies.Dependencies are listed under the new
[project]
section with specific versions, which is necessary for the project.
14-14
: Approved: Python version requirement update.The Python version requirement is updated from
^3.11
to>=3.12
, indicating a move to support newer Python features.
16-18
: Approved: Build system configuration.The
[build-system]
section specifieshatchling
as the build backend, replacing the previous Poetry configuration.
20-28
: Approved: Development dependencies management.The
[tool.rye]
section is introduced with development dependencies, indicating a management strategy using Rye.
30-34
: Approved: Additional Hatch configuration.The
[tool.hatch.metadata]
and[tool.hatch.build.targets.wheel]
sections provide additional configuration for Hatch.
dd714e5
to
861d7e4
Compare
There was a problem hiding this 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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
requirements-dev.lock
is excluded by!**/*.lock
requirements.lock
is excluded by!**/*.lock
Files selected for processing (10)
- .github/workflows/test.yml (1 hunks)
- Makefile (1 hunks)
- dddpy/domain/book/book_exception.py (3 hunks)
- dddpy/domain/book/book_repository.py (1 hunks)
- dddpy/infrastructure/sqlite/book/book_dto.py (1 hunks)
- dddpy/presentation/schema/book/book_error_message.py (1 hunks)
- dddpy/usecase/book/book_command_model.py (1 hunks)
- dddpy/usecase/book/book_command_usecase.py (2 hunks)
- dddpy/usecase/book/book_query_model.py (1 hunks)
- pyproject.toml (1 hunks)
Files skipped from review due to trivial changes (4)
- dddpy/domain/book/book_repository.py
- dddpy/infrastructure/sqlite/book/book_dto.py
- dddpy/usecase/book/book_command_usecase.py
- dddpy/usecase/book/book_query_model.py
Additional comments not posted (25)
dddpy/presentation/schema/book/book_error_message.py (3)
11-11
: Change fromexample
toexamples
is appropriate.The
Field
declaration now uses theexamples
parameter, which allows for multiple examples. This change is correct and improves flexibility.
15-15
: Change fromexample
toexamples
is appropriate.The
Field
declaration now uses theexamples
parameter, which allows for multiple examples. This change is correct and improves flexibility.
19-19
: Change fromexample
toexamples
is appropriate.The
Field
declaration now uses theexamples
parameter, which allows for multiple examples. This change is correct and improves flexibility.Makefile (8)
1-1
: Variable definition updated to use Rye.The
RYE
variable is defined to replace thePOETRY
variable. This change is correct and aligns with the migration to Rye.
2-2
: Command updated to use Rye for running tests.The
PYTEST
command is updated to userye
. This change is correct and aligns with the migration to Rye.
3-3
: Command updated to use Rye for type checking.The
MYPY
command is updated to userye
. This change is correct and aligns with the migration to Rye.
4-4
: Command updated to use Rye for code formatting.The
BLACK
command is updated to userye
. This change is correct and aligns with the migration to Rye.
5-5
: Command updated to use Rye for import sorting.The
ISORT
command is updated to userye
. This change is correct and aligns with the migration to Rye.
6-6
: Command updated to use Rye for linting.The
PYLINT
command is updated to userye
. This change is correct and aligns with the migration to Rye.
7-7
: Command updated to use Rye for running the application.The
UVICORN
command is updated to userye
. This change is correct and aligns with the migration to Rye.
11-15
: Targets updated to use Rye for installation and updates.The
install
andupdate
targets are updated to userye
. These changes are correct and align with the migration to Rye..github/workflows/test.yml (5)
11-11
: Python version matrix expanded to include Python 3.12.The Python version matrix now includes Python 3.11 and 3.12. This change is correct and enhances the flexibility of the testing setup.
13-13
: Checkout action version updated to v4.The
checkout
action version is updated to v4. This change is correct and aligns with the latest version of the action.
17-17
: Setup-Python action version updated to v5.The
setup-python
action version is updated to v5. This change is correct and aligns with the latest version of the action.
20-25
: Updated installation steps to use Rye.The installation steps are updated to install Rye instead of Poetry. These changes are correct and align with the migration to Rye.
28-28
: Command updated to use Rye for running tests.The Pytest command is updated to use Rye. This change is correct and aligns with the migration to Rye.
dddpy/domain/book/book_exception.py (3)
4-10
: LGTM!The
BookNotFoundError
class is well-defined with a clear error message.
Line range hint
12-18
:
LGTM!The
BooksNotFoundError
class is well-defined with a clear error message.
Line range hint
20-26
:
LGTM!The
BookIsbnAlreadyExistsError
class is well-defined with a clear error message.pyproject.toml (4)
1-14
: LGTM!The
[project]
section is well-defined with updated project metadata and dependencies.
16-18
: LGTM!The
[build-system]
section is well-defined with the updated build backend.
20-28
: LGTM!The
[tool.rye]
section is well-defined with updated development dependencies.
30-34
: LGTM!The
[tool.hatch.metadata]
and[tool.hatch.build.targets.wheel]
sections are well-defined.dddpy/usecase/book/book_command_model.py (2)
7-11
: LGTM!The
BookCreateModel
class is well-defined with the updatedexamples
parameter.
18-21
: LGTM!The
BookUpdateModel
class is well-defined with the updatedexamples
parameter.
Summary by CodeRabbit
New Features
Bug Fixes