From 0172c1ad99586da9bfd18da1105f11854d61af4d Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Fri, 19 Aug 2022 20:07:50 -0400 Subject: [PATCH 1/5] chore: ignore local development artifacts `.python-version` is useful for `pyenv` `.vscode/` stores Visual Studio Code settings Signed-off-by: Mike Fiedler --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 142b10c..962e2f9 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,7 @@ htmlcov/ *.eggs *.py[co] .pytest_cache/ +.python-version .idea/ +.vscode/ From 1dadef77674f07f231c9214afe132a00055bd46a Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Fri, 19 Aug 2022 20:13:32 -0400 Subject: [PATCH 2/5] chore: remove unused pytest config The test that used the marker was removed in #233 `pytest` also included the marker in version 3.7.2 in late 2018. Signed-off-by: Mike Fiedler --- MANIFEST.in | 2 +- pytest.ini | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 pytest.ini diff --git a/MANIFEST.in b/MANIFEST.in index 1533bc0..571fc19 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ include LICENSE README.rst CHANGES.rst -include tox.ini .coveragerc pytest.ini +include tox.ini .coveragerc include readme_renderer/py.typed recursive-include tests *.html diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 5d6dbaf..0000000 --- a/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -markers = - filterwarnings: built-in maker to silence warnings, not recognized by --strict. From 9dd4d7c7bea88ff8d805a8d61d5ed641be040913 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Fri, 19 Aug 2022 20:27:39 -0400 Subject: [PATCH 3/5] chore: add coverage reporting This library never had coverage reporting, but had the basic configs. We can now collapse the configuration into `pyproject.toml` and save a root file. Using the `pytest-cov` library, we get a nice wrapper for free. Refs: https://pypi.org/project/pytest-cov/ Signed-off-by: Mike Fiedler --- .coveragerc | 2 -- MANIFEST.in | 2 +- pyproject.toml | 3 +++ tox.ini | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 398ff08..0000000 --- a/.coveragerc +++ /dev/null @@ -1,2 +0,0 @@ -[run] -branch = True diff --git a/MANIFEST.in b/MANIFEST.in index 571fc19..5242524 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ include LICENSE README.rst CHANGES.rst -include tox.ini .coveragerc +include tox.ini include readme_renderer/py.typed recursive-include tests *.html diff --git a/pyproject.toml b/pyproject.toml index 1fdc514..609a620 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,9 @@ build-backend = "setuptools.build_meta" [tool.check-manifest] ignore = [".gitpod.yml"] +[tool.coverage.run] +branch = true + [tool.mypy] strict = true warn_unused_configs = true diff --git a/tox.ini b/tox.ini index 0e79d08..7e77737 100644 --- a/tox.ini +++ b/tox.ini @@ -5,8 +5,9 @@ isolated_build = True [testenv] deps = pytest + pytest-cov commands = - pytest --strict-markers {posargs} + pytest --strict-markers --cov {posargs} extras = md [testenv:mypy] From 70b28a5b4e18de76ba4752a0ac071cf83a19f9c0 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Fri, 19 Aug 2022 20:33:16 -0400 Subject: [PATCH 4/5] chore: upgrade actions/checkout Signed-off-by: Mike Fiedler --- .github/workflows/ci.yml | 6 +++--- .github/workflows/release.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cda83a8..a1132c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: python-version: ["pypy-3.7", "3.7", "3.8", "3.9", "3.10"] steps: - name: Check out repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install Python uses: actions/setup-python@v2 with: @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Install Python uses: actions/setup-python@v2 with: @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Install Python uses: actions/setup-python@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5bb5123..f0f9052 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.event.release.tag_name }} - name: Set up Python From c6cf239cb049397e413e1c6b6d7ad45ff34f634a Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Fri, 19 Aug 2022 20:39:12 -0400 Subject: [PATCH 5/5] chore: upgrade actions/setup-python Release logs: https://github.com/actions/setup-python/releases Notable: Previously, the version of Python might have been cached between builds, and wouldn't end up using the most recent release. Adding `check-latest: true` ensures we get the latest released version. Signed-off-by: Mike Fiedler --- .github/workflows/ci.yml | 9 ++++++--- .github/workflows/release.yml | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1132c1..5730b5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,9 +11,10 @@ jobs: - name: Check out repository uses: actions/checkout@v3 - name: Install Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + check-latest: true - name: Install dependencies run: python -m pip install tox - name: Run tests @@ -25,9 +26,10 @@ jobs: - name: Check out repository uses: actions/checkout@v3 - name: Install Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.x" + check-latest: true - name: Install dependencies run: python -m pip install tox - name: Run linting @@ -41,9 +43,10 @@ jobs: - name: Check out repository uses: actions/checkout@v3 - name: Install Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.x" + check-latest: true - name: Install dependencies run: python -m pip install tox - name: Test packaging diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0f9052..be12984 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,10 @@ jobs: with: ref: ${{ github.event.release.tag_name }} - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 + with: + python-version: "3.x" + check-latest: true - name: Install build dependencies run: pip install -U setuptools wheel build - name: Build