-
-
Notifications
You must be signed in to change notification settings - Fork 314
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: add poetry tooling #849
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #849 +/- ##
=======================================
Coverage 97.29% 97.29%
=======================================
Files 43 43
Lines 4028 4028
=======================================
Hits 3919 3919
Misses 109 109 Continue to review full report at Codecov.
|
hey @fleimgruber great initiative on this PR! One question I have: as you can see here, the conda environment file is the source of truth for all the dev dependencies of pandera, and this script ensure that the Is there similar tooling for syncing |
And to ask the converse question: is it not possible to install setup.py-based projects on poetry? |
This discussion seems relevant: python-poetry/poetry#1135 To merge this PR, I'd like to fulfill these requirements:
|
Thanks for your comments and questions @cosmicBboy.
Installation with pip from pyproject.toml seems to be experimental for now: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
Given the above, not at the moment AFAICS.
I am not aware of any.
This is very reasonable and I was expecting it.
There is an inactive issue for creating the pyproject.toml form a conda env file: conda/conda#10633.
I guess this won't be done as pyproject.toml is seen as the source of truth for this.
This is possible and done automatically with recent versions of poetry and one reason it makes it so convenient for development.
I guess maintaining two files is not worth it at the moment. We can revisit this when Setuptools finally moves to pyproject.toml. But even then it might be good to have setup.py to be backwards compatible. If you do not want to accept this PR for the valid stated reasons (and I am with you on those), I will just keep my local pyproject.toml around and keep it in sync with project development - it works for me, I just wanted to share so that people can use it locally as well. |
In addition to @fleimgruber's detailed answer, I'd like to point out that poetry does not support PEP 621, which standardizes setuptools (standard pyproject.toml): # pyproject.toml
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "my_package"
description = "My package description"
dependencies = [ 'importlib-metadata; python_version<"3.8"']
[project.optional-dependencies]
rest = ["requests"] poetry: # pyproject.toml
[build-system]
requires = ["poetry>=0.1.4"]
build-backend = "poetry.masonry.api"
[tool.poetry]
name = "my_package"
description = "My package description"
[tool.poetry.dependencies]
importlib-metadata = { version = "^4.11.3", python = "<3.8" }
[tool.poetry.dev-dependencies]
rest = ["requests"] It's not clear when poetry will be compliant with PEP 621: python-poetry/roadmap#3 Note that flit is PEP 621 compliant but I have no experience with it. re: conda. I found conda-lock that can create conda lock files from Long term, it seems that standard PEP 621 |
Cool, thanks for your initiative on this @fleimgruber ! Let's table this for now until there's better compatibility with setuptools. Gonna close this issue for now, but will keep #848 open. |
No description provided.