build: move from poetry to hatch
Does this PR introduce a breaking change?
- [ ] Yes
- [X] No
Describe the purpose of this pull request.
To move the build system from Poetry to Hatch.
Describe how this was implemented.
Making necessary updates to pyproject.toml and Makefile.
Describe any particular area(s) reviewers should focus on.
None
Provide any other pertinent information.
Pull Request Checklist
-
Code Style
- [x] Code is following code style guidelines.
-
Static Checks
- [x] Failing static checks are only applicable to code outside the scope of this PR.
-
Tests
- [x] At least one test for all newly created functions/methods?
-
Chores
- [x] Issue(s) have been raised for problem areas outside the scope of this PR. These problem areas have been decorated with an ISSUE: # comment.
Summary by Sourcery
Move the project's build system from Poetry to Hatch, updating configuration files and removing Poetry-specific commands from the Makefile. Enhance file operation functions by replacing shutil and dir_util with copyfile and copytree, and update Python version support in the Makefile.
Enhancements:
- Update Python version support in the Makefile to include versions 3.10, 3.11, and 3.12.
- Replace shutil and dir_util functions with copyfile and copytree for file operations, adding dirs_exist_ok parameter for better error handling.
Build:
- Switch the build system from Poetry to Hatch, updating the Makefile and pyproject.toml accordingly.
Reviewer's Guide by Sourcery
This pull request moves the build system from Poetry to Hatch. The changes primarily affect the Makefile, with updates to the pyproject.toml file (not shown in the diff). The PR also includes some minor updates to Python files for improved compatibility and code style.
Architecture diagram for build system migration from Poetry to Hatch
graph TD;
A[Makefile] -->|Removed Poetry commands| B[Build System];
A -->|Updated Python versions| C[Python Environment];
B -->|New Build System| D[Hatch];
C -->|Supported Versions| E[3.10, 3.11, 3.12];
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Removed Poetry-specific targets and commands from Makefile |
|
Makefile |
| Updated file operations in Python code |
|
tests/conftest.pysrc/ramstk/configuration.py |
| Minor updates to database-related code |
|
src/ramstk/models/db/basedatabase.pysrc/ramstk/models/db/basedatabase.pyi |
Tips and commands
Interacting with Sourcery
-
Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an issue from a review comment by replying to it.
-
Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. -
Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted.
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.