microsoft / microsoft/Oryx

Support poetry install --only

Open
#2,019 2 comments 2 reactions 1 assignee View on GitHub

@snehapar9 is already working on this.

Since Jun 12, 2023.

enhancement
Dominant language
C#
Stars
881
Forks
195
Avg merge
20h 13m
Merged PRs (30d)
13

Description

Feature Request

Currently the script PythonBashBuildSnippet.sh.tpl assumes that pyproject.toml implies that the user always intends to use 'poetry run --no-env'. First of all, 'poetry install --no-env' is deprecated (https://python-poetry.org/docs/cli/#install) in favor of, for example, poetry install --only no-dev. Secondly we have a use case where we deploy a monorepo containing many dependencies using github actions to an Azure App, which uses Oryx as the build system. We have a smaller dependency group defined in the pyproject.toml, which contains only the dependencies that are needed to the deployed application. So, in this case, what we would like to run is poetry install --only on this subset of dependencies.

It would be nice if we can set an environment variable that allows to specify additional poetry install arguments. The documentation makes no mention of this and the PythonBashBuildSnippet.sh.tpl seems to indicate that this is not an option.

I think this would be a useful feature to support for users who deploy an entire monorepo, but only wish to run a specific package from that monorepo as an Azure App.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.