-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
explore python dependency management #1295
Comments
at minimum should we move to something with a lockfile like pipenv? |
relevant incident report: https://scikit-learn.org/stable/whats_new.html#version-0-21-0 released which broke all of our builds since it dropped support for anything Python 3.4 and below https://github.com/scikit-learn/scikit-learn/releases We had some slowness fixing this due to not getting the order of editable installs in one place, see https://dagster.phacility.com/D75 |
We could check in requirements.txt files created by pip freeze, etc., but I think this sends the wrong message (you must develop using these specific versions) for an open source project. |
tox:
|
RTD issues: |
python-poetry/poetry#1245 is now fixed on poetry:develop |
|
I recommend to have a look at the next combination:
Related docs:
Dephell's own config can be helpful: https://github.com/dephell/dephell/blob/master/pyproject.toml The main idea is to make as many environments as possible with dephell environments and extra dependecies. One environment for one command. For example, test environment for dephell: [tool.dephell.pytest]
from = {format = "poetry", path = "pyproject.toml"}
envs = ["main", "tests"]
command = "python -m pytest tests/"
...
[tool.poetry.dev-dependencies]
pytest = "*"
requests-mock = "*"
aioresponses = "*"
...
[tool.poetry.extras]
tests = ["aioresponses", "pytest", "requests-mock"] |
Wow @orsinium dephell might be the tool I've been waiting for. All of our setup.py's and requirements.txt's under code-generation is definitely what I think the structure should be. Thanks a ton for the pointer. |
Per discussion here: https://dagster.phacility.com/D1750 we should also update |
python-poetry/poetry#1245 has landed (in the new poetry-core package) and dev on poetry looks like it has picked up again -- i'll revisit this (with an eye to moving to poetry/dephell) soon |
current dependency hell:
|
I got the pandas error as well, did you find solution? |
I think we should do a couple of things in concert over the Xmas holidays when hopefully the rate of commits slows down a little: move to poetry with pants to manage monorepo builds (deprecating some of our homegrown build scripting), use cookiecutter or copier for project templating. This should also set us up for a cleaner conda story. some refs |
@mgasner definitely onboard w/ poetry. thoughts on pants vs. bazel vs. please.build? maybe worth a comparison/eval? |
tried to use poetry in the internal stuff and its editable installs still don't work right |
I started to use flit for my projects.
To automate things like venv creation and deps installation, I use taskfile. |
fwiw poetry is much improved from when i looked at it in december 2020, editable installs now seem to work |
We've made some big changes since this was filed and it's mandate is very general. Closing. |
Problem: dependencies are encoded explicitly and implicitly in several places - setup.py, requirements.txt, tox.ini, dev env setup and CI jobs. This sucks.
We should have a single source of truth and then use that to generate what we need. In addition to solving our current problems, a good system here can empower stuff like determining what modules (and their recursive deps) to test as a function of changed files.
The text was updated successfully, but these errors were encountered: