Skip to content

Commit

Permalink
Do not print progress bars on uv calls
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Jul 18, 2024
1 parent 09b7a52 commit fb90856
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 75 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/autofix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Install gha-utils
run: |
uv venv --system
uv pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/gha-utils.txt
uv --no-progress venv --system
uv --no-progress pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/gha-utils.txt
- name: Project metadata
id: project-metadata
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: |
uv run gha-utils --verbosity DEBUG metadata --overwrite "$GITHUB_OUTPUT"
uv --no-progress run gha-utils --verbosity DEBUG metadata --overwrite "$GITHUB_OUTPUT"
format-python:
name: Format Python
Expand Down Expand Up @@ -145,8 +145,8 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Install Ruff, blacken-docs and autopep8
run: |
uv venv --system
uv pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/format-python.txt
uv --no-progress venv --system
uv --no-progress pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/format-python.txt
- name: Run autopep8
if: needs.project-metadata.outputs.python_files
# Ruff is not wrapping comments: https://github.com/astral-sh/ruff/issues/7414
Expand All @@ -155,7 +155,7 @@ jobs:
# - --aggressive is requires to force autopep8 to consider comments.
# Explicit list of files is provided, as autopep8 is not able to handle find files in ".github" subdirectory.
run: >
uv tool run autopep8 --recursive --in-place --max-line-length 88 --select E501 --aggressive
uv --no-progress tool run autopep8 --recursive --in-place --max-line-length 88 --select E501 --aggressive
${{ needs.project-metadata.outputs.python_files }}
- name: Optional Ruff config
if: needs.project-metadata.outputs.ruff_py_version
Expand Down Expand Up @@ -212,12 +212,12 @@ jobs:
cat ./ruff.toml
- name: Run Ruff check
run: |
uv tool run ruff check --config ./ruff.toml
uv --no-progress tool run ruff check --config ./ruff.toml
- name: Run Ruff format
# XXX: Ruff is planning to support linting and formatting in one unified command at one point.
# See: https://github.com/astral-sh/ruff/issues/8232
run: |
uv tool run ruff format --config ./ruff.toml
uv --no-progress tool run ruff format --config ./ruff.toml
- name: Remove temporary Ruff config
run: |
rm ./ruff.toml
Expand All @@ -231,7 +231,7 @@ jobs:
# TODO: replace blacken-docs by ruff. See: https://github.com/astral-sh/ruff/issues/8237
# https://github.com/astral-sh/ruff/issues/3792
run: >
uv tool run blacken-docs
uv --no-progress tool run blacken-docs
--line-length 88
${{ needs.project-metadata.outputs.blacken_docs_params }}
${{ needs.project-metadata.outputs.doc_files }}
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Sync uv.lock
run: |
uv sync --upgrade
uv --no-progress sync --upgrade
- uses: peter-evans/create-pull-request@v6.1.0
with:
assignees: ${{ github.actor }}
Expand Down Expand Up @@ -347,14 +347,14 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Install mdformat
run: |
uv venv --system
uv pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/mdformat.txt
uv --no-progress venv --system
uv --no-progress pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/mdformat.txt
- name: Install shfmt
run: |
sudo apt install --yes shfmt
- name: Auto-format Markdown
run: |
find ./ -iname "*.md" -exec uv tool run mdformat "{}" \;
find ./ -iname "*.md" -exec uv --no-progress tool run mdformat "{}" \;
- name: Markdown fixes for Awesome Lists
if: startsWith(github.event.repository.name, 'awesome-')
# Remove forbidden TOC entries
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Install bump-my-version
run: |
uv venv --system
uv pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/changelog.txt
uv --no-progress venv --system
uv --no-progress pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/changelog.txt

Check failure on line 50 in .github/workflows/changelog.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

50:121 [line-length] line too long (127 > 120 characters)
- name: ${{ matrix.part }} version bump
# TODO: get configuration URL once https://github.com/callowayproject/bump-my-version/issues/148 is addressed,
# so we can factorize projects' pyproject.toml files to kdeldycke/workflow/pyproject.toml .
run: |
uv tool run bump-my-version bump --verbose ${{ matrix.part }}
uv --no-progress tool run bump-my-version bump --verbose ${{ matrix.part }}
- name: Extract version
id: get_version
run: |
echo "new_version=$( uv tool run bump-my-version show current_version )" >> "$GITHUB_OUTPUT"
echo "new_version=$( uv --no-progress tool run bump-my-version show current_version )" >> "$GITHUB_OUTPUT"
- name: Print version
run: |
echo "New version: ${{ steps.get_version.outputs.new_version }}"
Expand Down Expand Up @@ -128,12 +128,12 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Install bump-my-version and gha-utils
run: |
uv venv --system
uv pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/changelog.txt
uv --no-progress venv --system
uv --no-progress pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/changelog.txt
- name: Extract version
id: get_version
run: |
echo "current_version=$( uv tool run bump-my-version show current_version )" >> "$GITHUB_OUTPUT"
echo "current_version=$( uv --no-progress tool run bump-my-version show current_version )" >> "$GITHUB_OUTPUT"
- name: Print version
run: |
echo "Current version: ${{ steps.get_version.outputs.current_version }}"
Expand All @@ -145,19 +145,19 @@ jobs:
# TOML.
run: >
RELEASE_DEFAULT_BRANCH="main" &&
uv tool run bump-my-version replace --no-configured-files --ignore-missing-version
uv --no-progress tool run bump-my-version replace --no-configured-files --ignore-missing-version
--search "/workflows/$RELEASE_DEFAULT_BRANCH/"
--replace "/workflows/v{current_version}/"
./.github/workflows/*.yaml
- name: Set release date in changelog
run: >
uv tool run bump-my-version replace --no-configured-files
uv --no-progress tool run bump-my-version replace --no-configured-files
--search " (unreleased)"
--replace " ({utcnow:%Y-%m-%d})"
./changelog.md
- name: Update comparison URL in changelog
run: >
uv tool run bump-my-version replace --no-configured-files
uv --no-progress tool run bump-my-version replace --no-configured-files
--search "...main"
--replace "...v{current_version}"
./changelog.md
Expand All @@ -166,7 +166,7 @@ jobs:
# > \[!IMPORTANT\]
# > ...
run: >
uv tool run bump-my-version replace --no-configured-files --ignore-missing-version
uv --no-progress tool run bump-my-version replace --no-configured-files --ignore-missing-version
--regex --search "^> \\\.\!IMPORTANT\\\..+?\\n\\n"
--replace ""
./changelog.md
Expand All @@ -188,18 +188,18 @@ jobs:
# TOML.
run: >
RELEASE_DEFAULT_BRANCH="main" &&
uv tool run bump-my-version replace --no-configured-files --ignore-missing-version
uv --no-progress tool run bump-my-version replace --no-configured-files --ignore-missing-version
--search "/workflows/v{current_version}/"
--replace "/workflows/$RELEASE_DEFAULT_BRANCH/"
./.github/workflows/*.yaml
- name: Add new changelog entry
run: |
uv run gha-utils --verbosity DEBUG changelog ./changelog.md
uv --no-progress run gha-utils --verbosity DEBUG changelog ./changelog.md
- name: Version bump
# TODO: get configuration URL once https://github.com/callowayproject/bump-my-version/issues/148 is addressed,
# so we can factorize projects' pyproject.toml files to kdeldycke/workflow/pyproject.toml .
run: |
uv tool run bump-my-version bump --verbose patch
uv --no-progress tool run bump-my-version bump --verbose patch
- name: Reset uv.lock
# Exclude `uv.lock` file which might be auto-updated by calls to `uv run`.
# See: https://github.com/peter-evans/create-pull-request#controlling-committed-files
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Install gha-utils
run: |
uv venv --system
uv pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/gha-utils.txt
uv --no-progress venv --system
uv --no-progress pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/gha-utils.txt

Check failure on line 114 in .github/workflows/docs.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

114:121 [line-length] line too long (127 > 120 characters)
- name: Generate .mailmap
run: |
uv run gha-utils --verbosity DEBUG mailmap-sync --skip-if-missing ./.mailmap
uv --no-progress run gha-utils --verbosity DEBUG mailmap-sync --skip-if-missing ./.mailmap
- name: Reset uv.lock
# Exclude `uv.lock` file which might be auto-updated by calls to `uv run`.
# See: https://github.com/peter-evans/create-pull-request#controlling-committed-files
Expand Down Expand Up @@ -194,14 +194,14 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Install gha-utils
run: |
uv venv --system
uv pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/gha-utils.txt
uv --no-progress venv --system
uv --no-progress pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/gha-utils.txt

Check failure on line 198 in .github/workflows/docs.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

198:121 [line-length] line too long (127 > 120 characters)
- name: Project metadata
id: project-metadata
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: |
uv run gha-utils --verbosity DEBUG metadata --overwrite "$GITHUB_OUTPUT"
uv --no-progress run gha-utils --verbosity DEBUG metadata --overwrite "$GITHUB_OUTPUT"
update-deps-graph:
name: Update dependency graph
Expand All @@ -224,19 +224,19 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Install pipdeptree
run: |
uv venv --system
uv pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/pipdeptree.txt
uv --no-progress venv --system
uv --no-progress pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/pipdeptree.txt

Check failure on line 228 in .github/workflows/docs.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

228:121 [line-length] line too long (128 > 120 characters)
- name: Install project
run: |
uv pip install .
uv --no-progress pip install .
- name: Run uv for debug
# TODO: switch from pipdeptree to uv.
# See: https://github.com/astral-sh/uv/issues/4439#issuecomment-2183911185
run: |
uv pip tree
uv --no-progress pip tree
- name: Run pipdeptree for debug
run: >
uv run pipdeptree ${{ needs.project-metadata.outputs.package_name
uv --no-progress run pipdeptree ${{ needs.project-metadata.outputs.package_name
&& format('--packages {0}', needs.project-metadata.outputs.package_name)}}
- name: Create dir structure
run: |
Expand All @@ -245,7 +245,7 @@ jobs:
# See: https://github.com/tox-dev/pipdeptree/issues/107
- name: Generate graph
run: >
uv run pipdeptree ${{ needs.project-metadata.outputs.package_name
uv --no-progress run pipdeptree ${{ needs.project-metadata.outputs.package_name
&& format('--packages {0}', needs.project-metadata.outputs.package_name)}}
--mermaid > ${{ env.dependency-graph-output }}
- name: Reset uv.lock
Expand Down Expand Up @@ -294,11 +294,11 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Install project dependencies
run: |
uv venv --system
uv pip install --extra docs --requirement ./pyproject.toml
uv --no-progress venv --system
uv --no-progress pip install --extra docs --requirement ./pyproject.toml
- name: Run Sphinx
run: |
uv run sphinx-apidoc --no-toc --module-first --force -o ./docs .
uv --no-progress run sphinx-apidoc --no-toc --module-first --force -o ./docs .
- name: Reset uv.lock
# Exclude `uv.lock` file which might be auto-updated by calls to `uv run`.
# See: https://github.com/peter-evans/create-pull-request#controlling-committed-files
Expand Down Expand Up @@ -343,8 +343,8 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Install project dependencies
run: |
uv venv --system
uv pip install --all-extras --requirement ./pyproject.toml
uv --no-progress venv --system
uv --no-progress pip install --all-extras --requirement ./pyproject.toml
- name: Install Graphviz
# So we can use the sphinx.ext.graphviz plugin.
# See: https://www.sphinx-doc.org/en/master/usage/extensions/graphviz.html
Expand All @@ -353,7 +353,7 @@ jobs:
sudo apt install --yes graphviz
- name: Build documentation
run: |
uv run sphinx-build -b html ./docs ./docs/html
uv --no-progress run sphinx-build -b html ./docs ./docs/html
- name: Deploy
uses: peaceiris/actions-gh-pages@v4.0.0
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Install gha-utils
run: |
uv venv --system
uv pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/gha-utils.txt
uv --no-progress venv --system
uv --no-progress pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/gha-utils.txt

Check failure on line 75 in .github/workflows/lint.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

75:121 [line-length] line too long (127 > 120 characters)
- name: Project metadata
id: project-metadata
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: |
uv run gha-utils --verbosity DEBUG metadata --overwrite "$GITHUB_OUTPUT"
uv --no-progress run gha-utils --verbosity DEBUG metadata --overwrite "$GITHUB_OUTPUT"
mypy-lint:
needs:
Expand All @@ -101,15 +101,15 @@ jobs:
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
- name: Install Mypy
run: |
uv venv --system
uv pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/mypy.txt
uv --no-progress venv --system
uv --no-progress pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/mypy.txt

Check failure on line 105 in .github/workflows/lint.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

105:121 [line-length] line too long (122 > 120 characters)
- name: Install package from all requirement files
run: |
uv pip install --all-extras ${{ needs.project-metadata.outputs.uv_requirement_params }}
uv --no-progress pip install --all-extras ${{ needs.project-metadata.outputs.uv_requirement_params }}
- name: Run Mypy
# --color-output - Force colorized output as in CI, Mypy defaults to no color in CI.
run: >
uv run mypy --color-output ${{ needs.project-metadata.outputs.mypy_params }}
uv --no-progress run mypy --color-output ${{ needs.project-metadata.outputs.mypy_params }}
${{ needs.project-metadata.outputs.python_files }}
lint-yaml:
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
uv pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/yamllint.txt
- name: Run yamllint
run: |
uv tool run yamllint --strict --config-data "{rules: {line-length: {max: 120}}}" --format github .
uv --no-progress tool run yamllint --strict --config-data "{rules: {line-length: {max: 120}}}" --format github .

Check failure on line 166 in .github/workflows/lint.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

166:121 [line-length] line too long (122 > 120 characters)
lint-zsh:
runs-on: ubuntu-22.04
Expand Down
Loading

0 comments on commit fb90856

Please sign in to comment.