diff --git a/.github/ISSUE_TEMPLATE/major-release.md b/.github/ISSUE_TEMPLATE/major-release.md index 49d45369..1377f1e6 100644 --- a/.github/ISSUE_TEMPLATE/major-release.md +++ b/.github/ISSUE_TEMPLATE/major-release.md @@ -2,7 +2,7 @@ name: Major release about: Create a new major release title: New major release -assignees: 'sesheta' +assignees: "sesheta" labels: bot --- diff --git a/.github/ISSUE_TEMPLATE/minor-release.md b/.github/ISSUE_TEMPLATE/minor-release.md index 27262e67..f4464c30 100644 --- a/.github/ISSUE_TEMPLATE/minor-release.md +++ b/.github/ISSUE_TEMPLATE/minor-release.md @@ -2,7 +2,7 @@ name: Minor release about: Create a new minor release title: New minor release -assignees: 'sesheta' +assignees: "sesheta" labels: bot --- diff --git a/.github/ISSUE_TEMPLATE/patch-release.md b/.github/ISSUE_TEMPLATE/patch-release.md index fae0f258..e40edac4 100644 --- a/.github/ISSUE_TEMPLATE/patch-release.md +++ b/.github/ISSUE_TEMPLATE/patch-release.md @@ -2,7 +2,7 @@ name: Patch release about: Create a new patch release title: New patch release -assignees: 'sesheta' +assignees: "sesheta" labels: bot --- diff --git a/.github/workflows/builds.yaml b/.github/workflows/builds.yaml index 04a82712..eeba3702 100644 --- a/.github/workflows/builds.yaml +++ b/.github/workflows/builds.yaml @@ -1,5 +1,5 @@ --- -name: '๐Ÿงช Test builds (matrix)' +name: "๐Ÿงช Test builds (matrix)" # yamllint disable-line rule:truthy on: @@ -11,14 +11,14 @@ jobs: pre-release: # Don't run if pull request is NOT merged if: github.event.pull_request.merged == true - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" continue-on-error: true strategy: fail-fast: false matrix: - python-version: ['3.9', '3.10', '3.11'] + python-version: ["3.9", "3.10", "3.11"] steps: - - name: 'Populate environment variables' + - name: "Populate environment variables" id: setenv run: | echo "Action triggered by user: ${GITHUB_TRIGGERING_ACTOR}" @@ -29,19 +29,19 @@ jobs: vernum="${{ matrix.python-version }}.${datetime}" echo "vernum=${vernum}" >> "$GITHUB_OUTPUT" - - name: 'Checkout repository' + - name: "Checkout repository" uses: actions/checkout@v4 - - name: 'Set up Python ${{ matrix.python-version }}' + - name: "Set up Python ${{ matrix.python-version }}" uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: 'Install dependencies' + - name: "Install dependencies" run: | python -m pip install --upgrade pip pip install tox tox-gh-actions - - name: 'Tag for test release' + - name: "Tag for test release" # Delete all local tags, then create a synthetic tag for testing # Use the date/time to avoid conflicts uploading to Test PyPI run: | @@ -51,6 +51,6 @@ jobs: git checkout "tags/v${{ steps.setenv.outputs.vernum }}" grep version pyproject.toml - - name: 'Build with TOX' + - name: "Build with TOX" run: | tox -e build diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c44506e3..8cc53e69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.9' + python-version: "3.9" - name: Install dependencies run: | diff --git a/.github/workflows/dependencies.yaml b/.github/workflows/dependencies.yaml index 90b60187..d177a8db 100644 --- a/.github/workflows/dependencies.yaml +++ b/.github/workflows/dependencies.yaml @@ -1,15 +1,15 @@ --- -name: 'โ›”๏ธ Update dependencies' +name: "โ›”๏ธ Update dependencies" # yamllint disable-line rule:truthy on: workflow_dispatch: schedule: - - cron: '0 0 * * MON' + - cron: "0 0 * * MON" jobs: update-dependencies: - name: 'Update Python modules' + name: "Update Python modules" runs-on: ubuntu-latest permissions: # IMPORTANT: mandatory to raise the PR @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: 'Setup PDM for build commands' + - name: "Setup PDM for build commands" uses: pdm-project/setup-pdm@v3 with: version: 2.10.0 @@ -33,8 +33,8 @@ jobs: uses: pdm-project/update-deps-action@main with: token: ${{ secrets.GH_TOKEN }} - commit-message: 'Chore: Update dependencies and pdm.lock' - pr-title: 'Update Python module dependencies' + commit-message: "Chore: Update dependencies and pdm.lock" + pr-title: "Update Python module dependencies" update-strategy: eager # Whether to install PDM plugins before update - install-plugins: 'false' + install-plugins: "false" diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 8af82d3d..c5feafb8 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -1,5 +1,5 @@ --- -name: '๐Ÿ—’๏ธ Build documentation' +name: "๐Ÿ—’๏ธ Build documentation" # yamllint disable-line rule:truthy on: @@ -11,36 +11,36 @@ jobs: build_and_deploy: # Don't run if pull request is NOT merged if: github.event.pull_request.merged == true - name: 'Rebuild documentation' + name: "Rebuild documentation" runs-on: ubuntu-latest continue-on-error: true strategy: matrix: - python-version: ['3.11'] + python-version: ["3.11"] steps: - - name: 'Checkout repository' + - name: "Checkout repository" uses: actions/checkout@v4 - - name: 'Setup PDM for build commands' + - name: "Setup PDM for build commands" uses: pdm-project/setup-pdm@v3 - - name: 'Set up Python ${{ matrix.python-version }}' + - name: "Set up Python ${{ matrix.python-version }}" uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: 'Install dependencies' + - name: "Install dependencies" run: | python -m pip install --upgrade pip pdm export -o requirements.txt if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi - - name: 'Build documentation: (tox/sphinx)' + - name: "Build documentation: (tox/sphinx)" run: | tox -e docs - - name: 'Publish documentation' + - name: "Publish documentation" if: success() uses: peaceiris/actions-gh-pages@v3 with: diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index c81990e8..ac1b6504 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: "3.x" - name: Install dependencies run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index af4478f7..2578ad57 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,5 +1,5 @@ --- -name: '๐Ÿ๐Ÿ“ฆ Production build and release' +name: "๐Ÿ๐Ÿ“ฆ Production build and release" # GitHub/PyPI trusted publisher documentation: # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ @@ -13,13 +13,13 @@ on: - v*.*.* env: - python-version: '3.10' + python-version: "3.10" ### BUILD ### jobs: build: - name: '๐Ÿ Build packages' + name: "๐Ÿ Build packages" runs-on: ubuntu-latest permissions: # IMPORTANT: mandatory for Sigstore @@ -27,31 +27,31 @@ jobs: steps: ### BUILDING ### - - name: 'Checkout repository' + - name: "Checkout repository" uses: actions/checkout@v4 - - name: 'Setup PDM for build commands' + - name: "Setup PDM for build commands" uses: pdm-project/setup-pdm@v3 with: version: 2.10.0 - - name: 'Setup Python 3.10' + - name: "Setup Python 3.10" uses: actions/setup-python@v4.7.0 with: python-version: ${{ env.python-version }} - - name: 'Update version from tags for production release' + - name: "Update version from tags for production release" run: | echo "Github versioning: ${{ github.ref_name }}" scripts/release-versioning.sh - - name: 'Build with PDM backend' + - name: "Build with PDM backend" run: | pdm build ### SIGNING ### - - name: 'Sign packages with Sigstore' + - name: "Sign packages with Sigstore" uses: sigstore/gh-action-sigstore-python@v1.2.3 with: inputs: >- @@ -67,7 +67,7 @@ jobs: ### PUBLISH GITHUB ### github: - name: '๐Ÿ“ฆ Publish to GitHub' + name: "๐Ÿ“ฆ Publish to GitHub" # Only publish on tag pushes if: startsWith(github.ref, 'refs/tags/') needs: @@ -77,13 +77,13 @@ jobs: # IMPORTANT: mandatory to publish artefacts contents: write steps: - - name: 'โฌ‡ Download build artefacts' + - name: "โฌ‡ Download build artefacts" uses: actions/download-artifact@v3 with: name: ${{ github.ref_name }} path: dist/ - - name: '๐Ÿ“ฆ Publish release to GitHub' + - name: "๐Ÿ“ฆ Publish release to GitHub" uses: ModeSevenIndustrialSolutions/action-automatic-releases@latest with: # Valid inputs are: @@ -99,7 +99,7 @@ jobs: ### PUBLISH PYPI TEST ### testpypi: - name: '๐Ÿ“ฆ Publish to PyPi Test' + name: "๐Ÿ“ฆ Publish to PyPi Test" # Only publish on tag pushes if: startsWith(github.ref, 'refs/tags/') needs: @@ -111,13 +111,13 @@ jobs: # IMPORTANT: mandatory for trusted publishing id-token: write steps: - - name: 'โฌ‡ Download build artefacts' + - name: "โฌ‡ Download build artefacts" uses: actions/download-artifact@v3 with: name: ${{ github.ref_name }} path: dist/ - - name: 'Remove files unsupported by PyPi' + - name: "Remove files unsupported by PyPi" run: | if [ -f dist/buildvars.txt ]; then rm dist/buildvars.txt @@ -133,7 +133,7 @@ jobs: ### PUBLISH PYPI ### pypi: - name: '๐Ÿ“ฆ Publish to PyPi' + name: "๐Ÿ“ฆ Publish to PyPi" # Only publish on tag pushes if: startsWith(github.ref, 'refs/tags/') needs: @@ -145,23 +145,23 @@ jobs: # IMPORTANT: mandatory for trusted publishing id-token: write steps: - - name: 'โฌ‡ Download build artefacts' + - name: "โฌ‡ Download build artefacts" uses: actions/download-artifact@v3 with: name: ${{ github.ref_name }} path: dist/ - - name: 'Remove files unsupported by PyPi' + - name: "Remove files unsupported by PyPi" run: | if [ -f dist/buildvars.txt ]; then rm dist/buildvars.txt fi rm dist/*.crt dist/*.sig* - - name: 'Setup PDM for build commands' + - name: "Setup PDM for build commands" uses: pdm-project/setup-pdm@v3 - - name: 'Publish release to PyPI' + - name: "Publish release to PyPI" uses: pypa/gh-action-pypi-publish@release/v1 with: verbose: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec2ec39d..377e234a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: "3.x" - name: Install dependencies run: | diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index b0aa4628..e525bea9 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -4,7 +4,7 @@ # For more information see: # https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: 'โ›”๏ธ Security auditing' +name: "โ›”๏ธ Security auditing" # yamllint disable-line rule:truthy on: @@ -14,17 +14,17 @@ on: jobs: build: - name: 'Audit Python dependencies' + name: "Audit Python dependencies" runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: ['3.9', '3.10'] + python-version: ["3.9", "3.10"] steps: - - name: 'Checkout repository' + - name: "Checkout repository" uses: actions/checkout@v4 - - name: 'Setup PDM for build commands' + - name: "Setup PDM for build commands" uses: pdm-project/setup-pdm@v3 with: version: 2.10.0 @@ -34,7 +34,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: 'Install dependencies' + - name: "Install dependencies" run: | pip install --upgrade pip pdm lock @@ -43,5 +43,5 @@ jobs: python -m pip install . pdm list --graph - - name: 'Run: pip-audit' + - name: "Run: pip-audit" uses: pypa/gh-action-pip-audit@v1.0.8 diff --git a/.github/workflows/test-release.yaml b/.github/workflows/test-release.yaml index 1ef9f54e..a36283de 100644 --- a/.github/workflows/test-release.yaml +++ b/.github/workflows/test-release.yaml @@ -1,5 +1,5 @@ --- -name: '๐Ÿ๐Ÿ“ฆ Test build and release' +name: "๐Ÿ๐Ÿ“ฆ Test build and release" # GitHub/PyPI trusted publisher documentation: # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ @@ -9,13 +9,13 @@ on: workflow_dispatch: env: - python-version: '3.10' + python-version: "3.10" ### BUILD ### jobs: build: - name: '๐Ÿ Build packages' + name: "๐Ÿ Build packages" runs-on: ubuntu-latest permissions: # IMPORTANT: mandatory for Sigstore @@ -23,27 +23,27 @@ jobs: steps: ### BUILDING ### - - name: 'Checkout repository' + - name: "Checkout repository" uses: actions/checkout@v4 - - name: 'Setup PDM for build commands' + - name: "Setup PDM for build commands" uses: pdm-project/setup-pdm@v3 with: version: 2.10.0 - - name: 'Populate environment variables' + - name: "Populate environment variables" id: setenv run: | vernum="${{ env.python-version }}.$(date +'%Y%m%d%H%M')" echo "vernum=${vernum}" >> "$GITHUB_OUTPUT" echo "vernum=${vernum}" >> buildvars.txt - - name: 'Setup Python 3.10' + - name: "Setup Python 3.10" uses: actions/setup-python@v4.7.0 with: python-version: ${{ env.python-version }} - - name: 'Tag for test release' + - name: "Tag for test release" # Delete all local tags, then create a synthetic tag for testing # Use the date/time to avoid conflicts uploading to Test PyPI run: | @@ -53,7 +53,7 @@ jobs: git checkout "tags/v${{ steps.setenv.outputs.vernum }}" grep version pyproject.toml - - name: 'Build with PDM backend' + - name: "Build with PDM backend" run: | pdm build # Need to save the build environment for subsequent steps @@ -61,7 +61,7 @@ jobs: ### SIGNING ### - - name: 'Sign packages with Sigstore' + - name: "Sign packages with Sigstore" uses: sigstore/gh-action-sigstore-python@v1.2.3 with: inputs: >- @@ -77,7 +77,7 @@ jobs: ### PUBLISH GITHUB ### github: - name: '๐Ÿ“ฆ Test publish to GitHub' + name: "๐Ÿ“ฆ Test publish to GitHub" needs: - build runs-on: ubuntu-latest @@ -85,13 +85,13 @@ jobs: # IMPORTANT: mandatory to publish artefacts contents: write steps: - - name: 'โฌ‡ Download build artefacts' + - name: "โฌ‡ Download build artefacts" uses: actions/download-artifact@v3 with: name: Development path: dist/ - - name: 'Source environment variables' + - name: "Source environment variables" id: setenv run: | if [ -f dist/buildvars.txt ]; then @@ -103,7 +103,7 @@ jobs: echo "tarball=$(ls dist/*.tgz)" >> "$GITHUB_OUTPUT" echo "wheel=$(ls dist/*.whl)" >> "$GITHUB_OUTPUT" - - name: '๐Ÿ“ฆ Publish packages to GitHub' + - name: "๐Ÿ“ฆ Publish packages to GitHub" uses: ModeSevenIndustrialSolutions/action-automatic-releases@latest with: # Valid inputs are: @@ -120,7 +120,7 @@ jobs: ### PUBLISH TEST PYPI ### testpypi: - name: '๐Ÿ“ฆ Test publish to PyPi' + name: "๐Ÿ“ฆ Test publish to PyPi" needs: - build runs-on: ubuntu-latest @@ -130,13 +130,13 @@ jobs: # IMPORTANT: mandatory for trusted publishing id-token: write steps: - - name: 'โฌ‡ Download build artefacts' + - name: "โฌ‡ Download build artefacts" uses: actions/download-artifact@v3 with: name: Development path: dist/ - - name: 'Remove files unsupported by PyPi' + - name: "Remove files unsupported by PyPi" run: | if [ -f dist/buildvars.txt ]; then rm dist/buildvars.txt diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 486adf21..74a12d7e 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -1,5 +1,5 @@ --- -name: '๐Ÿงช Unit tests' +name: "๐Ÿงช Unit tests" # yamllint disable-line rule:truthy on: @@ -9,34 +9,34 @@ on: jobs: build: - name: 'Run unit tests' + name: "Run unit tests" runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: ['3.9', '3.10'] + python-version: ["3.9", "3.10"] steps: - - name: 'Checkout repository' + - name: "Checkout repository" uses: actions/checkout@v4 - - name: 'Setup PDM for build commands' + - name: "Setup PDM for build commands" uses: pdm-project/setup-pdm@v3 with: version: 2.10.0 - - name: 'Setup Python ${{ matrix.python-version }}' + - name: "Setup Python ${{ matrix.python-version }}" uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: 'Install dependencies' + - name: "Install dependencies" run: | python -m pip install --upgrade pip pdm export -o requirements.txt pip install -r requirements.txt pip install . - - name: 'Run unit tests: pytest' + - name: "Run unit tests: pytest" run: | if [ -d test ]; then python -m pytest test diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index edab370c..c60dfa9a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ --- ci: - autofix_commit_msg: 'Chore: pre-commit autoupdate' + autofix_commit_msg: "Chore: pre-commit autoupdate" skip: # pre-commit.ci cannot install WGET, so tomlint must be disabled - tomllint @@ -17,7 +17,7 @@ repos: - repo: local hooks: - id: tomllint - name: 'Script: scripts/tomllint.sh' + name: "Script: scripts/tomllint.sh" language: script # pass_filenames: false files: \^*.toml @@ -43,7 +43,7 @@ repos: - id: detect-private-key - id: end-of-file-fixer - id: mixed-line-ending - args: ['--fix=lf'] + args: ["--fix=lf"] - id: name-tests-test # Do not allow direct push to main/master branches - id: no-commit-to-branch @@ -57,14 +57,14 @@ repos: hooks: - id: prettier args: - ['--ignore-unknown', '--no-error-on-unmatched-pattern', '!chart/**'] + ["--ignore-unknown", "--no-error-on-unmatched-pattern", "!chart/**"] # Lint: Markdown - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.37.0 hooks: - id: markdownlint - args: ['--fix'] + args: ["--fix"] # - repo: https://github.com/asottile/pyupgrade # rev: v3.15.0 @@ -91,7 +91,7 @@ repos: rev: 2.1.1 hooks: - id: bashate - args: ['--ignore=E006'] + args: ["--ignore=E006"] - repo: https://github.com/koalaman/shellcheck-precommit rev: v0.9.0 @@ -135,7 +135,7 @@ repos: # additional_dependencies: [black] - repo: https://github.com/pycqa/flake8 - rev: '6.1.0' + rev: "6.1.0" hooks: - id: flake8 entry: pflake8 @@ -152,12 +152,12 @@ repos: # - id: codespell - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.6.1' + rev: "v1.6.1" hooks: - id: mypy - repo: https://github.com/psf/black - rev: '22.3.0' + rev: "22.3.0" hooks: - id: black - id: black-jupyter diff --git a/.prow.yaml b/.prow.yaml index 77336bc6..5b576821 100644 --- a/.prow.yaml +++ b/.prow.yaml @@ -9,13 +9,13 @@ presubmits: containers: - image: quay.io/thoth-station/thoth-precommit-py38:v0.12.8 command: - - 'pre-commit' - - 'run' - - '--all-files' + - "pre-commit" + - "run" + - "--all-files" resources: requests: - memory: '500Mi' - cpu: '300m' + memory: "500Mi" + cpu: "300m" limits: - memory: '1Gi' - cpu: '500m' + memory: "1Gi" + cpu: "500m" diff --git a/.thoth.yaml b/.thoth.yaml index 24e55dee..3c8bd388 100644 --- a/.thoth.yaml +++ b/.thoth.yaml @@ -7,8 +7,8 @@ runtime_environments: - name: rhel:8 operating_system: name: rhel - version: '8' - python_version: '3.9' + version: "8" + python_version: "3.9" recommendation_type: latest managers: