Poetry usage notes:
-
poetry init
inside the root folder to start poetry project -
change the
pyproject.toml
file about dependencies. I think that the '^' decorator (e.g. python = '^3.8') is the most useful. See poetry website for details. -
poetry update
to generate the lock file and install all the dependencies to a venv. -
poetry run python script.py
to run script.py in the new venv. ORpoetry shell
to activate the new venv. One useful way I found to use it ispoetry run python -c 'import deeptissue'
to make sure that I didpoetry init
in the right folder. -
poetry config repositories.testpypi https://test.pypi.org/legacy/
to define the testpypi directory as the "testpypi" repository for publishing. -
poetry version [BUMP_SIZE]
to bump version. (e.g.poetry version patch
) -
poetry publish --build -r testpypi -u [USERNAME] -p [PASSWORD]
to publish. Alternatively, runpoetry build
thenpoetry publish
. The username and password parameters would be asked for interactively if not passed in through command line.