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
48 changes: 2 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
name: Run tox on ${{ matrix.python-version }}
runs-on: ubuntu-latest
env:
USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11'
USING_COVERAGE: '3.12'

strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]

steps:
- uses: actions/checkout@v3
Expand All @@ -32,50 +32,6 @@ jobs:
- name: Run tox targets for ${{ matrix.python-version }}
run: python -m tox

- name: Upload coverage data
uses: actions/upload-artifact@v3
with:
name: coverage-data
path: .coverage.*
if-no-files-found: ignore

coverage:
name: Combine & check coverage.
runs-on: ubuntu-latest
needs: tests

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_LATEST}}

- run: python -m pip install --upgrade coverage[toml]

- uses: actions/download-artifact@v3
with:
name: coverage-data

- name: Combine coverage & fail if it's <100%.
run: |
python -m coverage combine
python -m coverage html --skip-covered --skip-empty
# Report and write to summary.
python -m coverage report | sed 's/^/ /' >> $GITHUB_STEP_SUMMARY

- name: Upload HTML report if check failed.
uses: actions/upload-artifact@v3
with:
name: html-report
path: htmlcov
if: ${{ failure() }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true

docs:
name: Build docs & run doctests
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ coverage.xml
*.cover
*.py,cover
.pytest_cache/
.tox/

# Sphinx documentation
docs/_build/
Expand Down
33 changes: 16 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
---
ci:
autoupdate_schedule: monthly
#
#default_language_version:
# python: python3.10

repos:
- repo: https://github.com/psf/black
rev: 22.12.0
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.11.4
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
- id: isort
additional_dependencies: [toml]

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
- id: flake8
additional_dependencies: [flake8-cognitive-complexity]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: check-toml
- id: check-yaml
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: check-toml
- id: check-yaml
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ version: 2
sphinx:
configuration: docs/source/conf.py

build:
os: ubuntu-22.04
tools:
python: "3.8"

python:
version: 3.8
install:
- method: pip
path: .
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_,
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.

0.1.4 - 2024-09-03
------------------

- Removed support for Python 3.7.
- Fixed Github workflows vulnerability.


0.1.3 - 2023-01-02
------------------

Expand Down
1 change: 1 addition & 0 deletions src/pygopher/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Interface base class implementations."""

import inspect
import sys
import typing as tp
Expand Down
29 changes: 10 additions & 19 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
[gh-actions]
python =
3.7: py37
3.8: pre-commit, py38
3.9: pre-commit, py39
3.10: pre-commit, py310
3.11: pre-commit, py311
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[tox]
envlist = pre-commit,py37,py38,py39,py310,py311,coverage-report
envlist = py38,py39,py310,py311,py312,coverage-report
isolated_build = True

[testenv:pre-commit]
skip_install = true
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure

[testenv]
extras = tests
setenv = PYTHONHASHSEED = 0
commands = python -m coverage run -m pytest {posargs}
commands = python -m pytest {posargs}

[testenv:docs]
# Keep basepython in sync with ci.yml/docs and .readthedocs.yml.
Expand All @@ -30,11 +25,7 @@ commands =
sphinx-build -n -T -W -b doctest -d {envtmpdir}/doctrees docs/source docs/_build/html

[testenv:coverage-report]
basepython = python3.10
deps = coverage[toml]
skip_install = true
parallel_show_output = true
depends = py37,py38,py39,py310,py311
extras = tests
setenv = PYTHONHASHSEED = 0
commands =
python -m coverage combine
python -m coverage report
python -m coverage run -m pytest {posargs}