Skip to content

Commit 1095bd9

Browse files
author
Sylvain MARIE
committed
REverted previous commit and minor improvements to noxfile
1 parent c065a75 commit 1095bd9

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

noxfile.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
(PY311, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}},
2727
# python 3.10
2828
(PY310, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}},
29-
# python 3.9 - put first to detect easy issues faster.
29+
# python 3.9
3030
(PY39, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}},
3131
(PY39, "pytest7.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<8"}},
3232
(PY39, "pytest6.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<7"}},
@@ -140,13 +140,13 @@ def tests(session: PowerSession, coverage, pkg_specs):
140140

141141
# finally run all tests
142142
if not coverage:
143-
# install self
143+
# install self so that it is recognized by pytest
144144
session.run2("pip install . --no-deps")
145145

146146
# simple: pytest only
147147
session.run2("python -m pytest --cache-clear -v tests/")
148148
else:
149-
# install self in dev mode so that coverage works
149+
# install self in "develop" mode so that coverage can be measured
150150
session.run2("pip install -e . --no-deps")
151151

152152
# coverage + junit html reports + badge generation
@@ -176,7 +176,6 @@ def flake8(session: PowerSession):
176176
"""Launch flake8 qualimetry."""
177177

178178
session.install("-r", str(Folders.ci_tools / "flake8-requirements.txt"))
179-
session.install("genbadge[flake8]")
180179
session.run2("pip install .")
181180

182181
rm_folder(Folders.flake8_reports)
@@ -195,15 +194,15 @@ def flake8(session: PowerSession):
195194

196195
@power_session(python=[PY39])
197196
def docs(session: PowerSession):
198-
"""Generates the doc and serves it on a local http server. Pass '-- build' to build statically instead."""
197+
"""Generates the doc. Pass '-- serve' to serve it on a local http server instead."""
199198

200199
session.install_reqs(phase="docs", phase_reqs=["mkdocs-material", "mkdocs", "pymdown-extensions", "pygments"])
201200

202201
if session.posargs:
203-
# use posargs instead of "serve"
202+
# use posargs instead of "build"
204203
session.run2("mkdocs %s" % " ".join(session.posargs))
205204
else:
206-
session.run2("mkdocs serve")
205+
session.run2("mkdocs build")
207206

208207

209208
@power_session(python=[PY39])

setup.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@
3333
setup(
3434
download_url=DOWNLOAD_URL,
3535
use_scm_version={
36-
"version_file": "src/pytest_cases/_version.py",
37-
"version_file_template": """# file generated by setuptools_scm
38-
# don't change, don't track in version control
39-
__version__ = version = '{version}'
40-
__version_tuple__ = version_tuple = {version_tuple}
41-
"""
36+
"write_to": "src/pytest_cases/_version.py",
37+
#
38+
# "version_file_template": """# file generated by setuptools_scm
39+
# # don't change, don't track in version control
40+
# __version__ = version = '{version}'
41+
# __version_tuple__ = version_tuple = {version_tuple}
42+
# """
4243
}, # we can't put `use_scm_version` in setup.cfg yet unfortunately
4344
)

0 commit comments

Comments
 (0)