Skip to content

Commit

Permalink
chore: bump dependencies, add docker, update readme, remove unused po…
Browse files Browse the repository at this point in the history
…etry exec script (DEV-2159) (#365)
  • Loading branch information
jnussbaum committed May 12, 2023
1 parent 62ec04b commit 69d65e7
Show file tree
Hide file tree
Showing 4 changed files with 453 additions and 296 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ If you want to install a new package, install it with `poetry add package`. This
If a package is only needed for development, please install it with `poetry add package --group dev`,
so it will be added to the `[tool.poetry.group.dev.dependencies]` section of `pyproject.toml`.

For security reasons, the maintainer regularly executes `poetry update` to update `poetry.lock` with the latest
version of every package. The resulting changes are then committed in a version bumping PR.
For security reasons, the maintainer regularly executes `poetry add dependency@latest` for every dependency.
This updates the dependency constraint in `pyproject.toml` to the latest version,
updates the dependency to that version,
and updates `poetry.lock` accordingly.
The resulting changes are then committed in a version bumping PR.

All developers working with the DSP-TOOLS repository should regularly execute `poetry self update` to update poetry,
and `poetry install` to update the dependencies from `poetry.lock`.
Expand All @@ -57,11 +60,17 @@ and `poetry install` to update the dependencies from `poetry.lock`.

## Using the virtual environment

`poetry shell` spawns a shell within the virtual environment. From there, the command `dsp-tools` is available,
because `poetry install` made an editable installation of DSP-TOOLS inside the virtual environment. This means that
inside the `site-packages` folder of your poetry virtual environment, there is a folder called `dsp_tools-[version].
dist-info` containing a link to your local clone of the DSP-TOOLS repository. When you call `dsp-tools` from within
the virtual environment, the code of your local clone will be executed.
`poetry shell` spawns a shell within the virtual environment.
Even more convenient is to choose `/bin/python` inside poetry's virtual environment as the interpreter in your IDE.
This way, every Terminal you open in your IDE will automatically be in the virtual environment.

The advantage of being in a poetry shell is that the command `dsp-tools` is available,
because `poetry install` made an editable installation of DSP-TOOLS inside the virtual environment.
This means that inside the `site-packages` folder of your poetry virtual environment,
there is a folder called `dsp_tools-[version].dist-info`
containing a link to your local clone of the DSP-TOOLS repository.
When you call `dsp-tools` from within the virtual environment,
the code of your local clone will be executed.



Expand Down
Loading

0 comments on commit 69d65e7

Please sign in to comment.