prefect icon indicating copy to clipboard operation
prefect copied to clipboard

pip_install_pyproject utility pull step

Open robfreedy opened this issue 1 year ago • 0 comments

In prefect.yaml methods for deployment, there is a utility in the pull section for installing dependencies from a requirements.txt. This does not support the pyproject.toml use case.

This PR adds another utility pull step to be able to optionally specify a directory and run pip install with needing a requirements.txt file.

Potentially related issue: https://github.com/PrefectHQ/prefect/issues/13252

Example

- prefect.deployments.steps.git_clone:
      id: clone-step
      repository: https://gitlab.com/robfreedy/prefect-deployment-examples.git
  - prefect.deployments.steps.pip_install_pyproject:
      directory: "{{ clone-step.directory }}"
      stream_output: False

Checklist

  • [x] This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • [x] If this pull request adds new functionality, it includes unit tests that cover the changes
  • [x] This pull request includes a label categorizing the change e.g. maintenance, fix, feature, enhancement, docs.

For documentation changes:

  • [ ] This pull request includes redirect settings in netlify.toml for files that are removed or renamed.

For new functions or classes in the Python SDK:

  • [x] This pull request includes helpful docstrings.
  • [ ] If a new Python file was added, this pull request contains a stub page in the Python SDK docs and an entry in mkdocs.yml navigation.

robfreedy avatar May 17 '24 20:05 robfreedy