Skip to content

Commit

Permalink
Drops 3.7 support, adds 3.12 and 3.13 support.
Browse files Browse the repository at this point in the history
Modernizes configuration.
Switches to trusted publishers.
  • Loading branch information
Daverball committed Aug 21, 2024
1 parent 9685f35 commit 600712d
Show file tree
Hide file tree
Showing 7 changed files with 132 additions and 131 deletions.
12 changes: 0 additions & 12 deletions .coveragerc

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/python-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
runs-on: ubuntu-latest
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', '3.13']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
30 changes: 19 additions & 11 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,28 @@ jobs:

runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/project/pytest-codecov

permissions:
id-token: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
pip install build
- name: Build package distributions
run: python -m build -s -w

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 3 additions & 3 deletions .github/workflows/python-tox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
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', '3.13']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Get branch name (merge)
if: github.event_name != 'pull_request'
Expand All @@ -28,7 +28,7 @@ jobs:
>> $GITHUB_ENV
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
105 changes: 105 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
[build-system]
requires = [
"setuptools>=61.0.0",
]
build-backend = "setuptools.build_meta"

[project]
name = "pytest-codecov"
dynamic = ["version"]
description = "Pytest plugin for uploading pytest-cov results to codecov.io"
readme = "README.rst"
requires-python = ">=3.8"
authors = [
{ name = "David Salvisberg", email = "david.salvisberg@seantis.ch" },
]
maintainers = [
{ name = "David Salvisberg", email = "david.salvisberg@seantis.ch" },
]
license = {file = "LICENSE"}
classifiers = [
"Framework :: Pytest",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development :: Testing",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"License :: OSI Approved :: MIT License",
]
dependencies = [
"pytest>=4.6.0",
"pytest-cov>=2.11.0",
"coverage[toml]>=5.2.1",
"requests>=2.25.1",
]

[project.optional-dependencies]
git = [
"GitPython>=3.1.15",
]

[project.urls]
Repository = "https://github.com/seantis/pytest-codecov"

[project.entry-points.pytest11]
codecov = "pytest_codecov"

[tool.setuptools.dynamic]
version = {attr = "pytest_codecov.__version__"}

[tool.coverage.paths]
source = ["src"]

[tool.coverage.run]
source = ["pytest_codecov"]

[tool.coverage.report]
show_missing = true
precision = 2

[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py38,py39,py310,py311,py312,py313,flake8,report
[gh-actions]
python =
3.8: py38,flake8
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
[testenv]
setenv =
py{38,39,310,311,312,313}: COVERAGE_FILE = .coverage.{envname}
commands = pytest --cov --cov-report= {posargs:tests}
deps =
pytest
coverage
pytest-cov
.
GitPython
[testenv:flake8]
skip_install = true
deps = flake8
commands = flake8 src setup.py tests
[testenv:report]
deps = coverage
skip_install = true
commands =
coverage combine
coverage report
"""
68 changes: 2 additions & 66 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,67 +1,3 @@
#!/usr/bin/env python
import codecs
import os
from glob import glob
from os.path import basename
from os.path import splitext
from setuptools import setup, find_packages
from setuptools import setup


def read(fname):
file_path = os.path.join(os.path.dirname(__file__), fname)
return codecs.open(file_path, encoding='utf-8').read()


setup(
name='pytest-codecov',
version='0.5.1',
author='David Salvisberg',
author_email='david.salvisberg@seantis.ch',
maintainer='David Salvisberg',
maintainer_email='david.salvisberg@seantis.ch',
license='MIT',
url='https://github.com/seantis/pytest-codecov',
description='Pytest plugin for uploading pytest-cov results to codecov.io',
long_description=read('README.rst'),
packages=find_packages('src'),
package_dir={'': 'src'},
py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')],
include_package_data=True,
python_requires='>=3.5',
install_requires=[
'pytest>=4.6.0',
'pytest-cov>=2.11.0',
'coverage[toml]>=5.2.1',
'requests>=2.25.1'
],
tests_require=[
'GitPython>=3.1.15'
],
extras_require={
'git': [
'GitPython>=3.1.15'
],
},
classifiers=[
'Development Status :: 4 - Beta',
'Framework :: Pytest',
'Intended Audience :: Developers',
'Topic :: Software Development :: Testing',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: Implementation :: CPython',
'Operating System :: OS Independent',
'License :: OSI Approved :: MIT License',
],
entry_points={
'pytest11': [
'codecov = pytest_codecov',
],
},
)
setup()
36 changes: 0 additions & 36 deletions tox.ini

This file was deleted.

0 comments on commit 600712d

Please sign in to comment.