From b8375177ee5088f8e401e075c2281fe95cc6be63 Mon Sep 17 00:00:00 2001 From: Matthias Dellweg Date: Mon, 22 Jan 2024 13:37:44 +0100 Subject: [PATCH] Setup and apply CI template [noissue] --- .ci/scripts/collect_changes.py | 10 +++-- .ci/scripts/create_release_branch.sh | 2 +- .ci/scripts/release.sh | 4 +- .github/workflows/build.yml | 36 ++++++++++++++++++ .github/workflows/codeql.yml | 43 +++++++++++---------- .github/workflows/collect_changes.yml | 20 +++++----- .github/workflows/lint.yml | 33 +++++++++------- .github/workflows/nightly.yml | 8 +++- .github/workflows/pr.yml | 55 ++++++++++++++++----------- .github/workflows/pr_checks.yml | 55 +++++++++++++++++++++++++++ .github/workflows/publish.yml | 35 +++++++++-------- .github/workflows/release.yml | 29 +++++++------- .github/workflows/release_branch.yml | 28 +++++++------- .github/workflows/test.yml | 41 ++++++++++++-------- CHANGES/.TEMPLATE.md | 8 +++- CHANGES/pulp-glue-ostree/.gitkeep | 0 Makefile | 22 ++++++----- pyproject.toml | 38 ++++++++++++++++-- test_requirements.txt | 3 -- 19 files changed, 319 insertions(+), 151 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/pr_checks.yml create mode 100644 CHANGES/pulp-glue-ostree/.gitkeep diff --git a/.ci/scripts/collect_changes.py b/.ci/scripts/collect_changes.py index d11b528..3565db4 100755 --- a/.ci/scripts/collect_changes.py +++ b/.ci/scripts/collect_changes.py @@ -4,7 +4,7 @@ import toml from git import GitCommandError, Repo -from pkg_resources import parse_version +from packaging.version import parse as parse_version # Read Towncrier settings tc_settings = toml.load("pyproject.toml")["tool"]["towncrier"] @@ -12,9 +12,11 @@ CHANGELOG_FILE = tc_settings.get("filename", "NEWS.rst") START_STRING = tc_settings.get( "start_string", - "\n" - if CHANGELOG_FILE.endswith(".md") - else ".. towncrier release notes start\n", + ( + "\n" + if CHANGELOG_FILE.endswith(".md") + else ".. towncrier release notes start\n" + ), ) TITLE_FORMAT = tc_settings.get("title_format", "{name} {version} ({project_date})") diff --git a/.ci/scripts/create_release_branch.sh b/.ci/scripts/create_release_branch.sh index c76bd62..ce38bfa 100755 --- a/.ci/scripts/create_release_branch.sh +++ b/.ci/scripts/create_release_branch.sh @@ -23,6 +23,6 @@ git branch "${NEW_BRANCH}" # Clean changelog snippets. find CHANGES/ \( -name "*.feature" -o -name "*.bugfix" -o -name "*.doc" -o -name "*.translation" -o -name "*.devel" -o -name "*.misc" \) -exec git rm -f \{\} + -bumpversion minor --commit --message $'Bump version to {new_version}\n\n[noissue]' --allow-dirty +bump2version minor --commit --message $'Bump version to {new_version}\n\n[noissue]' --allow-dirty git push origin "${NEW_BRANCH}" diff --git a/.ci/scripts/release.sh b/.ci/scripts/release.sh index f4f3e52..9525f22 100755 --- a/.ci/scripts/release.sh +++ b/.ci/scripts/release.sh @@ -20,7 +20,7 @@ then fi towncrier build --yes --version "${NEW_VERSION}" -bumpversion release --commit --message "Release {new_version}" --tag --tag-name "{new_version}" --tag-message "Release {new_version}" --allow-dirty -bumpversion patch --commit +bump2version release --commit --message "Release {new_version}" --tag --tag-name "{new_version}" --tag-message "Release {new_version}" --allow-dirty +bump2version patch --commit git push origin "${BRANCH}" "${NEW_VERSION}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..194069f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: "Build" + +on: + workflow_call: + +jobs: + build: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4" + - uses: "actions/cache@v4" + with: + path: "~/.cache/pip" + key: "${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/*constraints.lock', '**/setup.py', '**/pyproject.toml') }}" + restore-keys: | + ${{ runner.os }}-pip- + + - name: "Set up Python" + uses: "actions/setup-python@v5" + with: + python-version: "3.11" + - name: "Install python dependencies" + run: | + pip install build setuptools wheel + - name: "Build wheels" + run: | + make build + - name: "Upload wheels" + uses: "actions/upload-artifact@v4" + with: + name: "pulp_cli_packages" + path: | + pulp-glue-ostree/dist/ + dist/ + if-no-files-found: "error" + retention-days: 5 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7bc3be3..491b3bb 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -3,42 +3,43 @@ name: "CodeQL" on: push: branches: - - main + - "main" workflow_call: jobs: analyze: - name: Analyze - runs-on: ubuntu-latest + name: "Analyze" + runs-on: "ubuntu-latest" permissions: - actions: read - contents: read - security-events: write + actions: "read" + contents: "read" + security-events: "write" steps: - - name: Checkout repository - uses: actions/checkout@v4 - - uses: actions/cache@v3 + - name: "Checkout repository" + uses: "actions/checkout@v4" + - uses: "actions/cache@v4" with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/*constraints.lock', '**/setup.py', '**/pyproject.toml') }} + path: "~/.cache/pip" + key: "${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/*constraints.lock', '**/setup.py', '**/pyproject.toml') }}" restore-keys: | ${{ runner.os }}-pip- - - name: Set up Python - uses: actions/setup-python@v5 + + - name: "Set up Python" + uses: "actions/setup-python@v5" with: - python-version: '3.11' - - name: Manually install from sources + python-version: "3.11" + - name: "Manually install from sources" run: | python -m pip install -e . -e ./pulp-glue-ostree - echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + echo "CODEQL_PYTHON=$(which python)" >> "$GITHUB_ENV" + - name: "Initialize CodeQL" + uses: "github/codeql-action/init@v3" with: - languages: python + languages: "python" setup-python-dependencies: false - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + - name: "Perform CodeQL Analysis" + uses: "github/codeql-action/analyze@v3" with: category: "/language:python" diff --git a/.github/workflows/collect_changes.yml b/.github/workflows/collect_changes.yml index e44f5d1..a175b73 100644 --- a/.github/workflows/collect_changes.yml +++ b/.github/workflows/collect_changes.yml @@ -1,31 +1,31 @@ -name: Collect changes +name: "Collect changes" on: workflow_call: workflow_dispatch: jobs: collect-changes: - runs-on: ubuntu-latest + runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 + - uses: "actions/checkout@v4" with: ref: "main" fetch-depth: 0 - - uses: actions/setup-python@v5 + - uses: "actions/setup-python@v5" with: python-version: "3.11" - - name: Setup git + - name: "Setup git" run: | git config user.name pulpbot git config user.email pulp-infra@redhat.com - - name: Collect changes + - name: "Collect changes" run: | - pip install GitPython toml + pip install GitPython packaging toml python3 .ci/scripts/collect_changes.py - - name: Create Pull Request - uses: peter-evans/create-pull-request@v6 + - name: "Create Pull Request" + uses: "peter-evans/create-pull-request@v6" with: - token: ${{ secrets.RELEASE_TOKEN }} + token: "${{ secrets.RELEASE_TOKEN }}" title: "Update Changelog" body: "" branch: "update_changes" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6003dd2..d1a1f00 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,11 +1,11 @@ -name: Lint +name: "Lint" on: workflow_call: jobs: lint: - runs-on: ubuntu-latest + runs-on: "ubuntu-latest" strategy: fail-fast: false matrix: @@ -13,18 +13,25 @@ jobs: - "3.8" - "3.11" steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 + - uses: "actions/checkout@v4" + - uses: "actions/cache@v4" with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/*constraints.lock', '**/setup.py', '**/pyproject.toml') }} + path: "~/.cache/pip" + key: "${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/*constraints.lock', '**/setup.py', '**/pyproject.toml') }}" restore-keys: | ${{ runner.os }}-pip- - - name: Set up Python - uses: actions/setup-python@v5 + + - name: "Download wheels" + uses: "actions/download-artifact@v4" + with: + name: "pulp_cli_packages" + - name: "Set up Python" + uses: "actions/setup-python@v5" with: - python-version: ${{ matrix.python }} - - name: Install python dependencies - run: pip install -r lint_requirements.txt - - name: Lint code - run: make lint + python-version: "${{ matrix.python }}" + - name: "Install python dependencies" + run: | + pip install dist/pulp_cli_ostree-*.whl pulp-glue-ostree/dist/pulp_glue_ostree-*.whl -r lint_requirements.txt + - name: "Lint code" + run: | + make lint diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 6aafe12..c4e2cca 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,4 +1,4 @@ -name: pulp-cli Nightly +name: "pulp-cli Nightly" on: schedule: @@ -6,10 +6,14 @@ on: workflow_dispatch: jobs: + build: + uses: "./.github/workflows/build.yml" test: + needs: + - "build" uses: "./.github/workflows/test.yml" codeql: uses: "./.github/workflows/codeql.yml" collect_changes: uses: "./.github/workflows/collect_changes.yml" - secrets: inherit + secrets: "inherit" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 23c5b33..de3ef99 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,57 +1,66 @@ -name: pulp-cli CI +name: "pulp-cli CI" on: pull_request: concurrency: - group: main-${{ github.ref_name }}-${{ github.workflow }} + group: "main-${{ github.ref_name }}-${{ github.workflow }}" cancel-in-progress: true jobs: + build: + uses: "./.github/workflows/build.yml" lint: + needs: + - "build" uses: "./.github/workflows/lint.yml" test: needs: - - lint + - "lint" uses: "./.github/workflows/test.yml" codeql: needs: - - lint + - "lint" uses: "./.github/workflows/codeql.yml" check-commits: - runs-on: ubuntu-latest + runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 - - run: git fetch --prune --unshallow - - name: Set up Python - uses: actions/setup-python@v5 + - uses: "actions/checkout@v4" + with: + fetch-depth: 0 + - name: "Set up Python" + uses: "actions/setup-python@v5" with: python-version: "3.11" - - name: Install python dependencies - run: pip install toml pygithub - - name: Check commit message + - name: "Install python dependencies" + run: | + pip install toml pygithub + - name: "Check commit message" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }} + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}" run: | - for sha in $(curl -H "Authorization: token $GITHUB_TOKEN" $GITHUB_CONTEXT | jq '.[].sha' | sed 's/"//g') + for SHA in $(curl -H "Authorization: token $GITHUB_TOKEN" "$GITHUB_CONTEXT" | jq -r '.[].sha') do - python .ci/scripts/validate_commit_message.py $sha + python .ci/scripts/validate_commit_message.py "$SHA" VALUE=$? if [ "$VALUE" -gt 0 ]; then exit "$VALUE" fi done - shell: bash + shell: "bash" ready-to-ship: # This is a dummy dependent task to have a single entry for the branch protection rules. - runs-on: ubuntu-latest + runs-on: "ubuntu-latest" needs: - - check-commits - - lint - - test - - codeql + - "check-commits" + - "lint" + - "test" + - "codeql" + if: "always()" steps: - - name: All set + - name: "Collect needed jobs results" run: | + echo '${{toJson(needs)}}' | jq -r 'to_entries[]|select(.value.result!="success")|.key + ": " + .value.result' + echo '${{toJson(needs)}}' | jq -e 'to_entries|map(select(.value.result!="success"))|length == 0' echo "CI says: Looks good!" diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml new file mode 100644 index 0000000..f1f8aa2 --- /dev/null +++ b/.github/workflows/pr_checks.yml @@ -0,0 +1,55 @@ +--- +name: "Pulp CLI PR static checks" +on: + pull_request_target: + types: ["opened", "synchronize", "reopened"] + +# This workflow runs with elevated permissions. +# Do not even think about running a single bit of code from the PR. +# Static analysis should be fine however. + +concurrency: + group: "${{ github.event.pull_request.number }}-${{ github.workflow }}" + cancel-in-progress: true + +jobs: + single_commit: + runs-on: "ubuntu-latest" + name: "Label multiple commit PR" + permissions: + pull-requests: "write" + steps: + - uses: "actions/checkout@v4" + with: + fetch-depth: 0 + - name: "Commit Count Check" + run: | + git fetch origin ${{ github.event.pull_request.head.sha }} + echo "COMMIT_COUNT=$(git log --oneline --no-merges origin/${{ github.base_ref }}..${{ github.event.pull_request.head.sha }} | wc -l)" >> "$GITHUB_ENV" + - uses: "actions/github-script@v7" + with: + script: | + const labelName = "multi-commit"; + const { COMMIT_COUNT } = process.env; + + if (COMMIT_COUNT == 1) + { + try { + await github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: labelName, + }); + } catch(err) { + } + } + else + { + await github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: [labelName], + }); + } diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7fd47ad..d22ff28 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,32 +1,37 @@ -name: pulp-cli Publish +name: "pulp-cli Publish" on: push: tags: - - "[0-9]+.[0-9]+.[0-9]" + - "[0-9]+.[0-9]+.[0-9]+" jobs: + build: + uses: "./.github/workflows/build.yml" publish-pypi: - name: Publish to PyPI - runs-on: ubuntu-latest + name: "Publish to PyPI" + needs: "build" + runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 + - uses: "actions/checkout@v4" + - name: "Download wheels" + uses: "actions/download-artifact@v4" with: - python-version: '3.x' - - name: Install dependencies + name: "pulp_cli_packages" + - name: "Set up Python" + uses: "actions/setup-python@v5" + with: + python-version: "3.x" + - name: "Install dependencies" run: | python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish + pip install twine + - name: "Build and publish" env: - TWINE_USERNAME: pulp - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: "${{ secrets.PYPI_API_TOKEN }}" run: | cd pulp-glue-ostree - python setup.py sdist bdist_wheel twine upload dist/* cd .. - python setup.py sdist bdist_wheel twine upload dist/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c324a29..7534d7b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,27 +1,28 @@ -name: pulp-cli Release +name: "pulp-cli Release" on: - workflow_dispatch + workflow_dispatch: jobs: release: - name: Release - runs-on: ubuntu-latest + name: "Release" + runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 + - uses: "actions/checkout@v4" with: - token: ${{ secrets.RELEASE_TOKEN }} - - name: Set up Python - uses: actions/setup-python@v5 + token: "${{ secrets.RELEASE_TOKEN }}" + - name: "Set up Python" + uses: "actions/setup-python@v5" with: - python-version: '3.x' - - name: Install dependencies + python-version: "3.x" + - name: "Install dependencies" run: | python -m pip install --upgrade pip - pip install bump2version towncrier - - name: Setup git + pip install bump2version towncrier~=23.11.0 + - name: "Setup git" run: | git config user.name pulpbot git config user.email pulp-infra@redhat.com - - name: Release - run: .ci/scripts/release.sh + - name: "Release" + run: | + .ci/scripts/release.sh diff --git a/.github/workflows/release_branch.yml b/.github/workflows/release_branch.yml index 9ef23c7..1932aea 100644 --- a/.github/workflows/release_branch.yml +++ b/.github/workflows/release_branch.yml @@ -1,29 +1,31 @@ --- -name: Create Release Branch +name: "Create Release Branch" on: workflow_dispatch: jobs: create-release-branch: - runs-on: ubuntu-latest + runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 + - uses: "actions/checkout@v4" + - name: "Set up Python" + uses: "actions/setup-python@v5" with: python-version: "3.11" - - name: Setup git + - name: "Setup git" run: | git config user.name pulpbot git config user.email pulp-infra@redhat.com - - name: Install python dependencies - run: pip install bump2version - - name: Create Release Branch - run: .ci/scripts/create_release_branch.sh - - name: Create Pull Request - uses: peter-evans/create-pull-request@v6 + - name: "Install python dependencies" + run: | + pip install bump2version + - name: "Create Release Branch" + run: | + .ci/scripts/create_release_branch.sh + - name: "Create Pull Request" + uses: "peter-evans/create-pull-request@v6" with: - token: ${{ secrets.RELEASE_TOKEN }} + token: "${{ secrets.RELEASE_TOKEN }}" title: "Bump dev-version" body: "" branch: "bump_version" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 660fe89..5dfd382 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,17 +1,17 @@ -name: Test +name: "Test" on: workflow_call: env: - COLORTERM: 'yes' - TERM: 'xterm-256color' - PYTEST_ADDOPTS: '--color=yes' - CONTAINER_RUNTIME: 'docker' + COLORTERM: "yes" + TERM: "xterm-256color" + PYTEST_ADDOPTS: "--color=yes" + CONTAINER_RUNTIME: "docker" jobs: test: - runs-on: ubuntu-20.04 + runs-on: "ubuntu-20.04" strategy: fail-fast: false matrix: @@ -35,30 +35,39 @@ jobs: image_tag: "latest" lower_bounds: true steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 + - uses: "actions/checkout@v4" + - uses: "actions/cache@v4" with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/*constraints.lock', '**/setup.py', '**/pyproject.toml') }} + path: "~/.cache/pip" + key: "${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/*constraints.lock', '**/setup.py', '**/pyproject.toml') }}" restore-keys: | ${{ runner.os }}-pip- - - name: Set up Python - uses: actions/setup-python@v5 + + - name: "Download wheels" + uses: "actions/download-artifact@v4" + with: + name: "pulp_cli_packages" + - name: "Set up Python" + uses: "actions/setup-python@v5" with: - python-version: ${{ matrix.python }} - - name: Install Test Dependencies + python-version: "${{ matrix.python }}" + - name: "Install Test Dependencies" run: | if [ "${{matrix.lower_bounds}}" ] then + # ------ DO NOT LET THE TEMPLATE REMOVE THIS ----- # https://github.com/yaml/pyyaml/issues/601#issuecomment-1834630109 pip install "cython<3.0.0" wheel pip install "pyyaml==5.4.1" --no-build-isolation - pip install -r test_requirements.txt -c lower_bounds_constraints.lock + # ------------------------------------------------ + pip install dist/pulp_cli_ostree-*.whl pulp-glue-ostree/dist/pulp_glue_ostree-*.whl -r test_requirements.txt -c lower_bounds_constraints.lock else - pip install -r test_requirements.txt + pip install dist/pulp_cli_ostree-*.whl pulp-glue-ostree/dist/pulp_glue_ostree-*.whl -r test_requirements.txt fi + # ------ DO NOT LET THE TEMPLATE REMOVE THIS ----- - name: Install the ostree utility run: sudo apt update && sudo apt-get install -y ostree + # ------------------------------------------------ - name: Run tests env: CONTAINER_RUNTIME: ${{ matrix.container_runtime }} diff --git a/CHANGES/.TEMPLATE.md b/CHANGES/.TEMPLATE.md index 91e64c2..00bafbd 100644 --- a/CHANGES/.TEMPLATE.md +++ b/CHANGES/.TEMPLATE.md @@ -1,18 +1,20 @@ {# TOWNCRIER TEMPLATE #} {% for section, _ in sections.items() %} -{% if section %}## {{section}} +{% if section %}### {{section}} {% endif %} {% if sections[section] %} {% for category, val in definitions.items() if category in sections[section]%} -### {{ definitions[category]['name'] }} +#### {{ definitions[category]['name'] }} {% if definitions[category]['showcontent'] %} {% for text, values in sections[section][category].items() %} - {{ text }} +{% if values %} {{ values|join(',\n ') }} +{% endif %} {% endfor %} {% else %} @@ -33,3 +35,5 @@ No significant changes. {% endif %} {% endfor %} --- + + diff --git a/CHANGES/pulp-glue-ostree/.gitkeep b/CHANGES/pulp-glue-ostree/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile index ba1ca1e..8aa9b6f 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,16 @@ -PLUGINS=$(notdir $(wildcard pulpcore/cli/*)) + +GLUE_PLUGINS=$(notdir $(wildcard pulp-glue-ostree/pulp_glue/*)) +CLI_PLUGINS=$(notdir $(wildcard pulpcore/cli/*)) info: + @echo Pulp glue + @echo plugins: $(GLUE_PLUGINS) @echo Pulp CLI - @echo plugins: $(PLUGINS) + @echo plugins: $(CLI_PLUGINS) + +build: + cd pulp-glue-ostree; pyproject-build -n + pyproject-build -n black: isort . @@ -10,13 +18,13 @@ black: black . lint: - find . -name '*.sh' -print0 | xargs -0 shellcheck -x + find tests .ci -name '*.sh' -print0 | xargs -0 shellcheck -x isort -c --diff . cd pulp-glue-ostree; isort -c --diff . black --diff --check . flake8 .ci/scripts/check_click_for_mypy.py - mypy + MYPYPATH=pulp-glue-ostree mypy cd pulp-glue-ostree; mypy @echo "🙊 Code 🙈 LGTM 🙉 !" @@ -26,8 +34,4 @@ tests/cli.toml: test: | tests/cli.toml pytest -v tests - -site: - mkdocs build - -.PHONY: info black lint test +.PHONY: build info black lint test diff --git a/pyproject.toml b/pyproject.toml index 75e6736..b63943c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,45 @@ +[tool.pulp_cli_template] +app_label = "ostree" +glue = true +docs = false +translations = false +test_matrix = """ +- python: "3.11" + image_tag: "nightly" + pulp_api_root: "/relocated/djnd/" +- python: "3.6" + image_tag: "3.28" + lower_bounds: true +- python: "3.7" + image_tag: "3.26" +- python: "3.8" + image_tag: "3.25" +- python: "3.9" + image_tag: "3.24" + pulp_api_root: "/relocated/djnd/" +- python: "3.10" + image_tag: "3.35" +- python: "3.11" + image_tag: "latest" + lower_bounds: true +""" + [tool.towncrier] -package = "pulpcore.cli.ostree" filename = "CHANGES.md" directory = "CHANGES/" title_format = "## {version} ({project_date})" template = "CHANGES/.TEMPLATE.md" issue_format = "[#{issue}](https://github.com/pulp/pulp-cli-ostree/issues/{issue})" start_string = "[//]: # (towncrier release notes start)\n" +underlines = ["", "", ""] + +[[tool.towncrier.section]] +path = "" +name = "" + +[[tool.towncrier.section]] +path = "pulp-glue-ostree" +name = "Pulp GLUE ostree" [[tool.towncrier.type]] directory = "feature" @@ -43,13 +77,11 @@ name = "Misc" showcontent = false [tool.black] -target = "py36" line-length = 100 [tool.isort] profile = "black" line_length = 100 -skip = ["pulp-glue-ostree"] [tool.pytest.ini_options] markers = [ diff --git a/test_requirements.txt b/test_requirements.txt index 0b5bb35..48a015f 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,6 +1,3 @@ -. -./pulp-glue-ostree - # Test requirements pygments pytest