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

build: move from poetry to hatch #1407

Merged
merged 9 commits into from
Oct 8, 2024
Merged

build: move from poetry to hatch #1407

merged 9 commits into from
Oct 8, 2024

Conversation

weibullguy
Copy link
Collaborator

@weibullguy weibullguy commented Oct 6, 2024

Does this PR introduce a breaking change?

  • Yes
  • 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

    • Code is following code style guidelines.
  • Static Checks

    • Failing static checks are only applicable to code outside the scope of
      this PR.
  • Tests

    • At least one test for all newly created functions/methods?
  • Chores

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

Copy link
Contributor

sourcery-ai bot commented Oct 6, 2024

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];
Loading

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

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @weibullguy - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Could you please clarify how testing will be handled after removing the test-related targets from the Makefile? It's important to ensure that the project maintains its testing capabilities with the new build system.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@weibullguy weibullguy added priority: normal Issue or PR is normal priority. status: inprogress Issue or PR is open, milestoned, and assigned. type: build Issue or PR associated with RAMSTK build system labels Oct 6, 2024
@weibullguy weibullguy merged commit 4711569 into master Oct 8, 2024
27 of 28 checks passed
@trafico-bot trafico-bot bot added the endgame: merged Pull Request has been merged successfully label Oct 8, 2024
@weibullguy weibullguy deleted the chore/switch_to_hatch branch October 8, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
endgame: merged Pull Request has been merged successfully priority: normal Issue or PR is normal priority. status: inprogress Issue or PR is open, milestoned, and assigned. type: build Issue or PR associated with RAMSTK build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant