Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure requirements.txt is available #202

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions actions/build_deploy_python_executable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
deployment:
required: false
description: "The deployment to push to, defaults to 'prod'. Ignored for pull requests where the branch deployment is used."
default: "prod"
default: "prod"
deploy:
description: 'Whether to upload the code files and update the code location'
required: false
Expand Down Expand Up @@ -44,13 +44,10 @@ runs:
run: echo "FLAG_DEPS_CACHE_TO=--deps-cache-to=${{ github.repository }}" >> $GITHUB_ENV
shell: bash

- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install uv
uses: astral-sh/setup-uv@v3

- if: ${{ inputs.python_version != '3.8' }}
id: custom-python-version
- id: custom-python-version
name: Set up Python ${{ inputs.python_version }} for target
uses: actions/setup-python@v5
with:
Expand All @@ -64,6 +61,11 @@ runs:
echo SOURCE_DIRECTORY=$(dirname ${{ inputs.dagster_cloud_file }}) >> $GITHUB_ENV
shell: bash

- name: Ensure requirements.txt is available
shell: bash
run: >
pip compile pyproject.toml --output-file requirement.txt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output filename requirement.txt should be requirements.txt (plural) to follow standard Python conventions. This matches both the step name and the widely-used filename across the Python ecosystem.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this action is using the astral-sh/setup-uv action, the command should be uv pip compile rather than pip compile. The standard pip package doesn't include a compile command - this functionality is specific to uv.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.


- if: ${{ inputs.deploy == 'true' }}
run: >
cd $ACTION_REPO &&
Expand Down