ReliaQualAssociates / ramstk

Reliability, Availability, Maintainability, Safety (RAMS) analysis program.
https://www.reliaqual.com/rtk/
BSD 3-Clause "New" or "Revised" License
46 stars 15 forks source link

build: move from poetry to hatch #1407

Closed weibullguy closed 1 month ago

weibullguy commented 1 month ago

Does this PR introduce a breaking change?

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

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:

Build:

sourcery-ai[bot] commented 1 month ago

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
  • Removed targets for managing dependencies (requirements, depends, upgrade)
  • Removed targets for running tests and coverage (test.unit, test.integration, coverage.unit, etc.)
  • Updated Python versions to 3.10, 3.11, and 3.12
  • Removed variables related to testing (TESTFILE, TESTOPTS, COVDIR)
Makefile
Updated file operations in Python code
  • Replaced shutil.copytree with copytree function, adding dirs_exist_ok parameter
  • Replaced shutil.rmtree with rmtree function
  • Updated error handling for file operations
tests/conftest.py
src/ramstk/configuration.py
Minor updates to database-related code
  • Added return statement in do_build_database_url method
  • Updated type hint for database parameter in do_connect method
src/ramstk/models/db/basedatabase.py
src/ramstk/models/db/basedatabase.pyi

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on 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-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere 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](https://app.sourcery.ai) 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](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).