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

More Poetry support, move some metadata to pyproject.toml #86

Closed
wants to merge 4 commits into from

Conversation

kafonek
Copy link
Contributor

@kafonek kafonek commented Nov 2, 2022

Good morning maintainers. This PR for your consideration moves some metadata from Cargo.toml to pyproject.toml, and adds maturin / pytest as Python dev dependencies in pyproject.toml so that virtualenv management can be handled with poetry.

  • poetry install && poetry run maturin develop && poetry run pytest for local development
  • I think license will show up in https://pypi.org/project/y-py/ after this (currently does not)

@davidbrochart
Copy link
Collaborator

Thanks @kafonek, but I would prefer if we moved to hatch.

@kafonek
Copy link
Contributor Author

kafonek commented Nov 2, 2022

Thanks @davidbrochart, I'm most familiar with using Poetry in our work repos. I remember looking briefly at Hatch a few months ago after the 1.0 announcement and not seeing anything that really motivated me to try it out. It seemed like one of the selling points was "tox-esque" matrix of versions support, which we didn't need.

I am annoyed at Poetry for having potentially breaking changes between 1.1x and 1.2x around the dependencies block.

There's two small pain points I hit while trying to make an equivalent hatch branch to this one. First, I don't see a way to configure hatch to create virtualenv's at the current working directory. I like that my VSCode defaults to activating ./.venv/bin/python and using that as the interpreter for linting. Second, I like poetry add to update pyproject.toml for me rather than looking up versions at pypi.org or elsewhere. Is there a hatch add I'm missing? Maybe I'm missing the right hatch tutorial.

@davidbrochart
Copy link
Collaborator

First, I don't see a way to configure hatch to create virtualenv's at the current working directory.

Maybe look at this plugin?

Second, I like poetry add to update pyproject.toml for me rather than looking up versions at pypi.org or elsewhere. Is there a hatch add I'm missing?

I don't think so, but it doesn't seem so important to me, as you probably want to pin lower and upper bounds, which depends on things that the tool cannot guess anyway.

@Waidhoferj
Copy link
Collaborator

And I'm here still using conda directly 😂

@kafonek kafonek deleted the pyproject_setup branch November 8, 2022 02:32
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.

3 participants