diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a72a182..9174f45 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,6 @@ version: 2 updates: - - package-ecosystem: pip + - package-ecosystem: github-actions directory: "/" schedule: interval: monthly @@ -8,13 +8,18 @@ updates: open-pull-requests-limit: 10 labels: - "changelog: skip" - - dependencies - - package-ecosystem: github-actions + - "dependencies" + ignore: + - dependency-name: "*" + update-types: + - "version-update:semver-minor" + - "version-update:semver-patch" + - package-ecosystem: pip directory: "/" schedule: interval: monthly time: "03:00" open-pull-requests-limit: 10 labels: - - dependencies - "changelog: skip" + - "dependencies" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b483d0b..fc8bf2e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,18 +19,12 @@ jobs: with: fetch-depth: 0 - - name: Cache - uses: actions/cache@v3.0.1 - with: - path: ~/.cache/pip - key: deploy-${{ hashFiles('**/setup.py') }} - restore-keys: | - deploy- - - name: Set up Python uses: actions/setup-python@v3 with: python-version: "3.10" + cache: pip + cache-dependency-path: setup.cfg - name: Install dependencies run: | diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index b769ceb..a806a43 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -5,10 +5,11 @@ on: # branches to consider in the event; optional, defaults to all branches: - main + workflow_dispatch: jobs: update_release_draft: - if: github.repository == 'hugovk/norwegianblue' + if: github.repository_owner == 'hugovk' runs-on: ubuntu-latest steps: # Drafts your next release notes as pull requests are merged into "main" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e83f15f..dfedf12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,13 +11,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["pypy-3.7", "3.7", "3.8", "3.9", "3.10"] - os: [ubuntu-latest, macos-latest, windows-latest] - include: - # Include new variables for Codecov - - { codecov-flag: GHA_Ubuntu, os: ubuntu-latest } - - { codecov-flag: GHA_macOS, os: macos-latest } - - { codecov-flag: GHA_Windows, os: windows-latest } + python-version: ["3.11-dev", "pypy-3.7", "3.7", "3.8", "3.9", "3.10"] + os: [windows-latest, macos-latest, ubuntu-latest] steps: - uses: actions/checkout@v3 @@ -26,21 +21,8 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache - uses: actions/cache@v3.0.1 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: - ${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ - hashFiles('**/setup.py') }} - restore-keys: | - ${{ matrix.os }}-${{ matrix.python-version }}-v1- + cache: pip + cache-dependency-path: setup.cfg - name: Install dependencies run: | @@ -61,5 +43,5 @@ jobs: - name: Upload coverage uses: codecov/codecov-action@v2.1.0 with: - flags: ${{ matrix.codecov-flag }} + flags: ${{ matrix.os }} name: ${{ matrix.os }} Python ${{ matrix.python-version }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3c87e42..8563f09 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v2.31.1 + rev: v2.32.0 hooks: - id: pyupgrade args: [--py37-plus] @@ -28,7 +28,7 @@ repos: - id: python-check-blanket-noqa - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.2.0 hooks: - id: check-merge-conflict - id: check-toml @@ -39,6 +39,12 @@ repos: rev: v1.20.1 hooks: - id: setup-cfg-fmt + args: [--max-py-version=3.11] + + - repo: https://github.com/tox-dev/tox-ini-fmt + rev: 0.5.2 + hooks: + - id: tox-ini-fmt - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.6.2 diff --git a/README.md b/README.md index c470915..4d47a43 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ end-of-life dates for a number of products. ### From PyPI ```bash -python -m pip install --upgrade norwegianblue +python3 -m pip install --upgrade norwegianblue ``` ### From source @@ -26,7 +26,7 @@ python -m pip install --upgrade norwegianblue ```bash git clone https://github.com/hugovk/norwegianblue cd norwegianblue -pip install . +python3 -m pip install . ``` ## Example command-line use diff --git a/setup.cfg b/setup.cfg index 4d3b993..db67ddb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,6 +19,7 @@ classifiers = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Programming Language :: Python :: Implementation :: CPython keywords = end-of-life diff --git a/tox.ini b/tox.ini index 48f1785..e716956 100644 --- a/tox.ini +++ b/tox.ini @@ -2,34 +2,37 @@ envlist = cog lint - py{37, 38, 39, 310} pins + py{311, 310, 39, 38, 37} [testenv] extras = tests commands = - # Unit tests {envpython} -m pytest --cov norwegianblue --cov tests --cov-report xml {posargs} - - # Test runs norwegianblue --version norwegianblue --help eol --version eol --help [testenv:cog] -deps = cogapp -commands = cog -Pr README.md skip_install = true +deps = + cogapp +commands = + cog -Pr README.md [testenv:lint] -deps = pre-commit -commands = pre-commit run --all-files +passenv = + PRE_COMMIT_COLOR skip_install = true -passenv = PRE_COMMIT_COLOR +deps = + pre-commit +commands = + pre-commit run --all-files [testenv:pins] -extras = None +extras = + None commands_pre = {envpython} -m pip install -r requirements.txt