Skip to content

Commit 65ca633

Browse files
authored
Merge pull request #83 from smarie/chore/82_pytest_no_limits_in_cicd
Removed pytest version limit in cicd and upgraded nox sessions to python 3.11 (+removed invalid check in nox session)
2 parents e6c8c22 + 298e648 commit 65ca633

4 files changed

Lines changed: 27 additions & 24 deletions

File tree

.github/workflows/base.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
- name: Checkout
2626
uses: actions/checkout@v4
2727

28-
- name: Install python 3.9
28+
- name: Install python 3.11
2929
uses: actions/setup-python@v5
3030
with:
31-
python-version: 3.9
31+
python-version: 3.11
3232
architecture: x64
3333

3434
- name: Install noxfile requirements
@@ -130,10 +130,10 @@ jobs:
130130
- name: Checkout
131131
uses: actions/checkout@v4
132132

133-
- name: Install python 3.9 for nox
133+
- name: Install python 3.11 for nox
134134
uses: actions/setup-python@v5
135135
with:
136-
python-version: 3.9
136+
python-version: 3.11
137137
architecture: x64
138138

139139
- name: Install noxfile requirements
@@ -158,10 +158,10 @@ jobs:
158158
fetch-depth: 0 # so that gh-deploy works
159159
# persist-credentials: false # see https://github.com/orgs/community/discussions/25702
160160

161-
- name: Install python 3.9 for nox
161+
- name: Install python 3.11 for nox
162162
uses: actions/setup-python@v5
163163
with:
164-
python-version: 3.9
164+
python-version: 3.11
165165
architecture: x64
166166

167167
# 1) retrieve the reports generated previously

docs/long_description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pytest-harvest
22

3-
[![Python versions](https://img.shields.io/pypi/pyversions/pytest-harvest.svg)](https://pypi.python.org/pypi/pytest-harvest/) [![Build Status](https://github.com/smarie/python-pytest-harvest/actions/workflows/base.yml/badge.svg)](https://github.com/smarie/python-pytest-harvest/actions/workflows/base.yml) [![Tests Status](https://smarie.github.io/python-pytest-harvest/reports/junit/junit-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-harvest/reports/junit/report.html) [![codecov](https://codecov.io/gh/smarie/python-pytest-harvest/branch/master/graph/badge.svg)](https://codecov.io/gh/smarie/python-pytest-harvest)
3+
[![Python versions](https://img.shields.io/pypi/pyversions/pytest-harvest.svg)](https://pypi.python.org/pypi/pytest-harvest/) ![Pytest versions](https://img.shields.io/badge/pytest-6%20%7C%207%20%7C%208-blue) [![Build Status](https://github.com/smarie/python-pytest-harvest/actions/workflows/base.yml/badge.svg)](https://github.com/smarie/python-pytest-harvest/actions/workflows/base.yml) [![Tests Status](https://smarie.github.io/python-pytest-harvest/reports/junit/junit-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-harvest/reports/junit/report.html) [![codecov](https://codecov.io/gh/smarie/python-pytest-harvest/branch/master/graph/badge.svg)](https://codecov.io/gh/smarie/python-pytest-harvest)
44

55
[![Documentation](https://img.shields.io/badge/doc-latest-blue.svg)](https://smarie.github.io/python-pytest-harvest/) [![PyPI](https://img.shields.io/pypi/v/pytest-harvest.svg)](https://pypi.python.org/pypi/pytest-harvest/) [![Downloads](https://pepy.tech/badge/pytest-harvest)](https://pepy.tech/project/pytest-harvest) [![Downloads per week](https://pepy.tech/badge/pytest-harvest/week)](https://pepy.tech/project/pytest-harvest) [![GitHub stars](https://img.shields.io/github/stars/smarie/python-pytest-harvest.svg)](https://github.com/smarie/python-pytest-harvest/stargazers)
66

noxfile.py

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,24 @@ class Folders:
5353
ENVS = {
5454
# python 3.14 - numpy is not available in precompiled version for this python version yet
5555
# (PY314, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}},
56+
# (PY314, "pytest7.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<8"}},
57+
# (PY314, "pytest6.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<7"}},
5658
# python 3.13
5759
(PY313, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}},
60+
(PY313, "pytest7.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<8"}},
61+
(PY313, "pytest6.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<7"}},
5862
# python 3.12
5963
(PY312, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}},
6064
(PY312, "pytest7.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<8"}},
65+
(PY312, "pytest6.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<7"}},
6166
# python 3.11
62-
# We'll run this last for coverage
67+
# We'll run 'pytest-latest' this last for coverage
68+
(PY311, "pytest7.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<8"}},
69+
(PY311, "pytest6.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<7"}},
6370
# python 3.10
6471
(PY310, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}},
72+
(PY310, "pytest7.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<8"}},
73+
(PY310, "pytest6.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<7"}},
6574
# python 3.9
6675
(PY39, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}},
6776
(PY39, "pytest7.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<8"}},
@@ -166,7 +175,7 @@ def tests(session, coverage, pkg_specs):
166175
session.run("genbadge", "coverage", "-i", f"{Folders.coverage_xml}", "-o", f"{Folders.coverage_badge}")
167176

168177

169-
@nox.session(python=PY39)
178+
@nox.session(python=PY311)
170179
def flake8(session):
171180
"""Launch flake8 qualimetry."""
172181

@@ -187,7 +196,7 @@ def flake8(session):
187196
rm_file(Folders.flake8_intermediate_file)
188197

189198

190-
@nox.session(python=PY39)
199+
@nox.session(python=PY311)
191200
def docs(session):
192201
"""Generates the doc. Pass '-- serve' to serve it on a local http server instead."""
193202

@@ -200,7 +209,7 @@ def docs(session):
200209
session.run("mkdocs", "build")
201210

202211

203-
@nox.session(python=PY39)
212+
@nox.session(python=PY311)
204213
def publish(session):
205214
"""Deploy the docs+reports on github pages. Note: this rebuilds the docs"""
206215

@@ -245,18 +254,19 @@ def my_scheme(version_):
245254

246255
session.run("python", "setup.py", "sdist", "bdist_wheel")
247256

248-
# Make sure that the generated _version.py file exists and is compliant with python 2.7
257+
# Make sure that the generated _version.py file exists
249258
version_py = Path(f"src/{pkg_name}/_version.py")
250259
if not version_py.exists():
251260
raise ValueError("Error with setuptools_scm: _version.py file not generated")
252261

253-
if ":" in version_py.read_text():
254-
raise ValueError("Error with setuptools_scm: _version.py file contains annotations")
262+
# ...and is compliant with python 2.7
263+
# if ":" in version_py.read_text():
264+
# raise ValueError("Error with setuptools_scm: _version.py file contains annotations")
255265

256266
return current_tag, version
257267

258268

259-
@nox.session(python=PY39)
269+
@nox.session(python=PY311)
260270
def build(session):
261271
"""Same as release but just builds"""
262272

@@ -265,7 +275,7 @@ def build(session):
265275
print(f"version: {version}")
266276

267277

268-
@nox.session(python=PY39)
278+
@nox.session(python=PY311)
269279
def release(session):
270280
"""Create a release on github corresponding to the latest tag"""
271281

setup.cfg

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ classifiers =
2020
Topic :: Software Development :: Libraries :: Python Modules
2121
Topic :: Software Development :: Testing
2222
Programming Language :: Python
23-
Programming Language :: Python :: 2
24-
Programming Language :: Python :: 2.7
25-
Programming Language :: Python :: 3
26-
Programming Language :: Python :: 3.5
27-
Programming Language :: Python :: 3.6
28-
Programming Language :: Python :: 3.7
29-
Programming Language :: Python :: 3.8
3023
Programming Language :: Python :: 3.9
3124
Programming Language :: Python :: 3.10
3225
Programming Language :: Python :: 3.11
@@ -44,7 +37,7 @@ install_requires =
4437
makefun>=1.5
4538

4639
tests_require =
47-
pytest<8.4.0
40+
pytest
4841
numpy
4942
pandas
5043
tabulate

0 commit comments

Comments
 (0)