Skip to content

feat: add .tool-versions and prompt for poetry_version#37

Merged
JaeAeich merged 12 commits into
mainfrom
asdf
Mar 10, 2025
Merged

feat: add .tool-versions and prompt for poetry_version#37
JaeAeich merged 12 commits into
mainfrom
asdf

Conversation

@JaeAeich

@JaeAeich JaeAeich commented Nov 16, 2024

Copy link
Copy Markdown
Collaborator

Description

Also prompt for poetry version, ref.

Checklist

  • My code follows the contributing guidelines of this
    project, including, in particular, with regard to any style guidelines
  • The title of my PR complies with the Conventional Commits
    specification
    ; in particular, it clearly indicates
    that a change is a breaking change
  • I acknowledge that all my commits will be squashed into a single commit,
    using the PR title as the commit message
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have updated the user-facing documentation to describe any new or
    changed behavior
  • I have added type annotations for all function/class/method interfaces
    or updated existing ones (only for Python, TypeScript, etc.)
  • I have provided appropriate documentation (Google-style Python
    docstrings
    ) for all packages/modules/functions/classes/
    methods or updated existing ones
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature
    works
  • New and existing unit tests pass locally with my changes
  • I have not reduced the existing code coverage

Comments

Summary by Sourcery

Add support for managing the development environment with asdf.

New Features:

  • Add a new Makefile command asdfi to install tools based on the .tool-versions file.

Enhancements:

  • Introduce a .tool-versions file to specify tool versions.

Documentation:

  • Document the usage of asdf for managing project dependencies.

@sourcery-ai

sourcery-ai Bot commented Nov 16, 2024

Copy link
Copy Markdown

Reviewer's Guide by Sourcery

This pull request introduces support for managing project tools using asdf. It adds a .tool-versions file to specify tool versions, a new asdf-install Makefile target to install the specified tools, and updates the README with instructions for using asdf.

Sequence diagram for asdf tool installation process

sequenceDiagram
    participant D as Developer
    participant M as Makefile
    participant A as asdf
    participant TV as .tool-versions

    D->>M: make asdfi
    M->>TV: Read tool list
    M->>A: Add plugins for each tool
    A-->>M: Plugins added
    M->>A: asdf install
    A->>TV: Read tool versions
    A-->>M: Tools installed
    M-->>D: Installation complete
Loading

File-Level Changes

Change Details Files
Added support for asdf.
  • Added a section to the README explaining how to use asdf to manage the development environment.
  • Created a new Makefile target asdf-install to install the tools specified in .tool-versions.
  • Added a .tool-versions file to list the project's tool versions and their respective plugins to be managed by asdf
{{ cookiecutter.project_name_dashed }}/README.md
{{ cookiecutter.project_name_dashed }}/Makefile
{{ cookiecutter.project_name_dashed }}/.tool-versions

Assessment against linked issues

Issue Objective Addressed Explanation
#27 Streamline the setup process for developers by ensuring tool and language versions are easily available and version-controlled
#27 Leverage asdf as a version manager to manage and install various tool versions needed for the project
#27 Provide a consistent and flexible approach to tool version management across development environments

Possibly linked issues

  • imp: support .tool-versions #27: The PR implements the solution proposed in the issue by adding a .tool-versions file and Makefile commands to install the specified tools.

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Overall Comments:

  • The .tool-versions file appears to be empty. Please add the required tool version specifications to make this change functional.
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.

@JaeAeich

Copy link
Copy Markdown
Collaborator Author

Screenshot from 2024-11-16 16-07-57

@JaeAeich

JaeAeich commented Jan 3, 2025

Copy link
Copy Markdown
Collaborator Author

@sourcery-ai review

@JaeAeich

JaeAeich commented Jan 3, 2025

Copy link
Copy Markdown
Collaborator Author

@sourcery-ai summary

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Overall Comments:

  • The .tool-versions file appears to be empty in the diff. Please include its intended contents so we can review the tool specifications.
  • Consider adding documentation about the expected format and usage of the '# INSTALL:' commands in .tool-versions, since this is a custom implementation.
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.

@JaeAeich JaeAeich requested a review from uniqueg January 6, 2025 15:15
Comment thread {{ cookiecutter.project_name_dashed }}/.tool-versions Outdated
Comment thread {{ cookiecutter.project_name_dashed }}/Makefile Outdated
Comment thread {{ cookiecutter.project_name_dashed }}/.tool-versions
Comment thread {{ cookiecutter.project_name_dashed }}/Makefile Outdated
Comment thread {{ cookiecutter.project_name_dashed }}/README.md Outdated
@JaeAeich

JaeAeich commented Jan 6, 2025

Copy link
Copy Markdown
Collaborator Author

@uniqueg I do agree that maybe make asdfi might be way too hacky, if you think that we should let go of it, then I'll just remove make command and all the comments in .tools, with that I think this PR will be simplified quite alot, it just .tools-version with pythons version and docs.

What do you think? is that the way to go, or if its not hacky enough we can try to over engineer make asdfi and make it "secure" 😁 .

@uniqueg

uniqueg commented Jan 7, 2025

Copy link
Copy Markdown
Member

@uniqueg I do agree that maybe make asdfi might be way too hacky, if you think that we should let go of it, then I'll just remove make command and all the comments in .tools, with that I think this PR will be simplified quite alot, it just .tools-version with pythons version and docs.

What do you think? is that the way to go, or if its not hacky enough we can try to over engineer make asdfi and make it "secure" 😁 .

I would

  1. for sure remove comments in .tool-versions
  2. keep make asdfi and execute cat .tool-versions | cut -d' ' -f1 | grep "^[^\#]" | xargs -i asdf plugin add {} (as per Feature Idea: asdf install to also install plugins asdf-vm/asdf#276 (comment)), followed by asdf install

That way, make asdfi would install everything in .tool-versions - which I think is quite useful.

Now, for installing tools that are not covered by asdf plugins, just leave it up for each project to decide how to deal with those.

@JaeAeich

JaeAeich commented Jan 7, 2025

Copy link
Copy Markdown
Collaborator Author

@sourcery-ai review

@JaeAeich

JaeAeich commented Jan 7, 2025

Copy link
Copy Markdown
Collaborator Author

@sourcery-ai summary

Comment thread {{ cookiecutter.project_name_dashed }}/.tool-versions Outdated

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey @JaeAeich - I've reviewed your changes and they look great!

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.

@JaeAeich JaeAeich requested a review from uniqueg January 7, 2025 16:09
Comment thread {{ cookiecutter.project_name_dashed }}/README.md
@JaeAeich JaeAeich requested a review from uniqueg January 9, 2025 13:22

@uniqueg uniqueg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please prompt the user for the desired Poetry version, just like you do for the Python version.

Comment thread {{ cookiecutter.project_name_dashed }}/.tool-versions Outdated
@JaeAeich JaeAeich changed the title feat: add .tool-versions feat: add .tool-versions and prompt for poetry_version Jan 14, 2025
@JaeAeich JaeAeich requested a review from uniqueg January 14, 2025 16:38
@JaeAeich JaeAeich merged commit 89c9e90 into main Mar 10, 2025
@JaeAeich JaeAeich deleted the asdf branch March 10, 2025 04:57
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.

imp: support .tool-versions

2 participants