python-poetry

Should I commit .lock file changes separately? What should I write for the commit message?

假装没事ソ 提交于 2021-02-07 14:29:40
问题 I'm using poetry for my Python package manager but I believe this would apply to any programming practices. I've been doing this without knowing exactly what I'm doing, or how I should be doing. When you use a package manager and install a new package, there's usually a .lock file change to keep your build deterministic. Usually, I would commit these changes like: $ git add poetry.lock pyproject.toml $ git commit -m "Install packages: beautifulsoup4" i.e, I make a commit every time I install

How to organize shared libraries with docker and monorepo

[亡魂溺海] 提交于 2021-01-27 15:13:22
问题 What I have I have 2 python apps that share a few bits of code, enough that I am trying to isolate the shared parts into modules/packages/libraries (I'm keeping the term vague on purpose, as I am not sure what the solution is). All my code is in a monorepo, because I am hoping to overcome some of the annoyances of managing more repos than we have team members. Currently my file layout looks like: + myproject + appA | + python backend A | + js frontend + appB | + B stuff + libs + lib1 + lib2

Poetry and PyTorch

拥有回忆 提交于 2021-01-26 07:44:25
问题 I've recently found poetry to help out with all of the different dependencies for our group. In one project we also use PyTorch and I was wondering if anyone could help me out and point me to the direction on how to add this to poetry. We are working on machines that have no access to a CUDA GPU (for simple on the road inferencing/testing) and workstations where we do have access to CUDA CPU's. Now I would love to use poetry to ensure every dev is using the same versions with the help of

Poetry and PyTorch

情到浓时终转凉″ 提交于 2021-01-26 07:41:38
问题 I've recently found poetry to help out with all of the different dependencies for our group. In one project we also use PyTorch and I was wondering if anyone could help me out and point me to the direction on how to add this to poetry. We are working on machines that have no access to a CUDA GPU (for simple on the road inferencing/testing) and workstations where we do have access to CUDA CPU's. Now I would love to use poetry to ensure every dev is using the same versions with the help of

How to enforce a minimum python poetry version

天涯浪子 提交于 2021-01-04 05:33:52
问题 I am using python-poetry to manage dependencies in a python project. I want to enforce a minimum poetry version to avoid unnecessary changes in poetry.lock file in version control. I tried updating it in build-systems section of pyproject.toml file but it works with lower versions as well. Is there a way by which I can enforce minimum poetry version in a project? 来源: https://stackoverflow.com/questions/64003868/how-to-enforce-a-minimum-python-poetry-version

How to enforce a minimum python poetry version

。_饼干妹妹 提交于 2021-01-04 05:31:46
问题 I am using python-poetry to manage dependencies in a python project. I want to enforce a minimum poetry version to avoid unnecessary changes in poetry.lock file in version control. I tried updating it in build-systems section of pyproject.toml file but it works with lower versions as well. Is there a way by which I can enforce minimum poetry version in a project? 来源: https://stackoverflow.com/questions/64003868/how-to-enforce-a-minimum-python-poetry-version

Building installable tar.gz/whl with poetry using local dependency

我与影子孤独终老i 提交于 2020-12-12 08:27:53
问题 There is following structure in my python project: ├───pyproject.toml └───mypackage │ ├───lib │ localdep-0.2.0-py3-none-any.whl │ localdep-0.2.0.tar.gz └───service app.py home.py modules.py I need to build mypackage using poetry and local dependency localdep from mypackage/lib/localdep-0.2.0... to be able to install mypackage just using simple pip install mypackage-0.1.0.tar.gz command without any additional files. I've tried to use path and file specifiers in pyproject.toml however I

Python poetry - how to install optional dependencies?

青春壹個敷衍的年華 提交于 2020-11-29 04:26:48
问题 Python's poetry dependency manager allows specifying optional dependencies via command: $ poetry add --optional redis Which results in this configuration: [tool.poetry.dependencies] python = "^3.8" redis = {version="^3.4.1", optional=true} However how do you actually install them? Docs seem to hint to: $ poetry install -E redis but that just throws and error: Installing dependencies from lock file [ValueError] Extra [redis] is not specified. 回答1: You need to add a tool.poetry.extras group to