Skip to content
Merged
Show file tree
Hide file tree
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
17 changes: 7 additions & 10 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,26 @@ jobs:
wd: ./
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{github.head_ref}}

- name: Set up poetry
run: pipx install poetry
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python3.x
uses: actions/setup-python@v4
with:
python-version: 3.12.3
cache: "poetry"
uses: actions/setup-python@v5
id: py

- name: Get requirements
working-directory: ${{env.wd}}
run: |
poetry install --with dev --no-interaction --no-ansi
uv sync --locked --all-extras --dev

- name: Linting, formatting, and type checking
working-directory: ${{env.wd}}
run: poetry run pre-commit run --show-diff-on-failure --all-files
run: uv run pre-commit run --show-diff-on-failure --all-files

- name: Test
working-directory: ${{env.wd}}
run: poetry run pytest -v
run: uv run pytest -vx
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ repos:
hooks:
- id: mypy
args: [--ignore-missing-imports, --install-types, --non-interactive]
- repo: https://github.com/python-poetry/poetry
rev: 1.8.3
hooks:
- id: poetry-check
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ process_file() {
stripped_filename=${filename:4} # Strip the last four characters
temp_toml="$TEMP_DIR/${stripped_filename}.toml"
sed "s/{{filename}}/${stripped_filename}/g" "$CONFIG_FILE" > "$temp_toml"
poetry run python -m bc2.core "$temp_toml" --input-path "$file" --output-path "$OUTPUT_DIR/${filename}.pdf" --debug
uv run python -m bc2.core "$temp_toml" --input-path "$file" --output-path "$OUTPUT_DIR/${filename}.pdf" --debug
}

export -f process_file
Expand Down
Loading
Loading