Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only run docs-building sessions with Python 3.8. #4210

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

pp-mo
Copy link
Member

@pp-mo pp-mo commented Jun 24, 2021

🚀 Pull Request

Make sessions that build docs (doctest, gallery, linkcheck) only support Python 3.8.

Hitherto we offered 'docstest-3.7' and 'docstest-3.8'. We could still do that, but I'm choosing not to.
(since Py3.7 gives different results in some cases)
Likewise, if nox is called specifying a specific unsuitable python, via the PY_VER environment variable, we could still run the session, with Python3.8, but instead I chose not to allow it all.

So..

  1. nox -s doctest now runs with Python 3.8
    • whereas previously it ran "doctest-3.7", giving different results
  2. PY_VER=3.8 nox -s doctest still works
    * this is how cirrus invokes it
  3. PY_VER=3.7 nox -s doctest now gives an error
    • previously available

New behaviours demonstrated :

$ nox -l
Sessions defined in /net/home/h05/itpp/git/iris/iris_main/noxfile.py:

* lint -> Perform pre-commit linting of iris codebase.
* tests-3.7 -> Perform iris system, integration and unit tests.
* tests-3.8 -> Perform iris system, integration and unit tests.
* gallery -> Perform iris gallery doc-tests.
* doctest -> Perform iris doc-tests.
* linkcheck -> Perform iris doc link check.

sessions marked with * are selected, sessions marked with - are skipped.
$ PY_VER=3.8 nox -l
Sessions defined in /net/home/h05/itpp/git/iris/iris_main/noxfile.py:

* lint -> Perform pre-commit linting of iris codebase.
* tests -> Perform iris system, integration and unit tests.
* gallery -> Perform iris gallery doc-tests.
* doctest -> Perform iris doc-tests.
* linkcheck -> Perform iris doc link check.

sessions marked with * are selected, sessions marked with - are skipped.
$ PY_VER=3.7 nox -l
Sessions defined in /net/home/h05/itpp/git/iris/iris_main/noxfile.py:

* lint -> Perform pre-commit linting of iris codebase.
* tests -> Perform iris system, integration and unit tests.

sessions marked with * are selected, sessions marked with - are skipped.
$ nox -s doctest
nox > Running session doctest
nox > Creating conda env in .nox/doctest with python=3.8
 . . .
$ PY_VER=3.7 nox -s doctest
nox > Error while collecting sessions.
nox > Sessions not found: doctest
$ 

@pp-mo pp-mo requested a review from bjlittle June 24, 2021 14:53
Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea @pp-mo, but I think we can reduce the complexity slightly.

@pp-mo
Copy link
Member Author

pp-mo commented Jul 6, 2021

Simplified code as review requested.
But now need to rebase.

@pp-mo
Copy link
Member Author

pp-mo commented Jul 6, 2021

Rebased.
@trexfeathers can you please re-review ?

@trexfeathers
Copy link
Contributor

Thanks @pp-mo, LGTM!

@trexfeathers trexfeathers merged commit 7b6634a into SciTools:main Jul 7, 2021
tkknight added a commit to tkknight/iris that referenced this pull request Jul 21, 2021
* main: (43 commits)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4244)
  Updated environment lockfiles (SciTools#4242)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4239)
  Documented the --force option on conda env create (SciTools#4240)
  Updated environment lockfiles (SciTools#4237)
  pre-commit isort and black --check only for cirrus-ci (SciTools#4235)
  Only run docs-building sessions with Python 3.8. (SciTools#4210)
  consolidate cirrus-ci documentation tasks (SciTools#4219)
  Updated environment lockfiles (SciTools#4223)
  Replace pyke nopyke (SciTools#4198)
  drop cirrus-ci minimal tests (SciTools#4218)
  remove change management tech paper (SciTools#4217)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4213)
  Updated environment lockfiles (SciTools#4212)
  Widen cube printout for long ancil or cell-measure names. (SciTools#4124)
  convert docs print statements (SciTools#4209)
  optimise pre-commit (SciTools#4208)
  drop black and flake8 dependencies (SciTools#4181)
  pre-commit blacked docs (SciTools#4205)
  pre-commit update (SciTools#4204)
  ...
@pp-mo pp-mo deleted the nox_docs_py38 branch March 18, 2022 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants