Skip to content

Commit 55950a5

Browse files
committed
Only run docs-building sessions with Python 3.8.
1 parent 9c25db6 commit 55950a5

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

noxfile.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,15 @@
1515
#: Default to reusing any pre-existing nox environments.
1616
nox.options.reuse_existing_virtualenvs = True
1717

18+
#: Python versions we can run sessions under
19+
_PY_VERSIONS_ALL = ["3.7", "3.8"]
20+
_PY_VERSION_LATEST = _PY_VERSIONS_ALL[-1]
21+
22+
#: One specific python version for docs builds
23+
_PY_VERSION_DOCSBUILD = _PY_VERSION_LATEST
24+
1825
#: Cirrus-CI environment variable hook.
19-
PY_VER = os.environ.get("PY_VER", ["3.7", "3.8"])
26+
PY_VER = os.environ.get("PY_VER", _PY_VERSIONS_ALL)
2027

2128
#: Default cartopy cache directory.
2229
CARTOPY_CACHE_DIR = os.environ.get("HOME") / Path(".local/share/cartopy")
@@ -196,8 +203,7 @@ def tests(session: nox.sessions.Session):
196203
"--system-tests",
197204
)
198205

199-
200-
@nox.session(python=PY_VER, venv_backend="conda")
206+
@nox.session(python=_PY_VERSION_DOCSBUILD, venv_backend="conda")
201207
def doctest(session: nox.sessions.Session):
202208
"""
203209
Perform iris doctests and gallery.
@@ -230,8 +236,7 @@ def doctest(session: nox.sessions.Session):
230236
"--gallery-tests",
231237
)
232238

233-
234-
@nox.session(python=PY_VER, venv_backend="conda")
239+
@nox.session(python=_PY_VERSION_DOCSBUILD, venv_backend="conda")
235240
def linkcheck(session: nox.sessions.Session):
236241
"""
237242
Perform iris doc link check.

0 commit comments

Comments
 (0)