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

Updating documentation dependencies for Python 3.11 #1378

Merged
merged 5 commits into from
Aug 9, 2023

Conversation

ntouran
Copy link
Member

@ntouran ntouran commented Aug 8, 2023

What is the change?

Update documentation dependencies to be Python 3.11 compatible.

Why is the change being made?

The dependencies as pinned don't work in Python 3.11. The new ones do.

Fixes #1344


Checklist

  • This PR has only one purpose or idea.
  • Tests have been added/updated to verify that the new/changed code works.

(well I built the docs in python 3.11 and 3.9 and confirmed they worked.)

  • The release notes (location doc/release/0.X.rst) are up-to-date with any important changes.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in setup.py.

@john-science john-science added the documentation Improvements or additions to documentation label Aug 8, 2023
@john-science
Copy link
Member

Nice!

@opotowsky FYI!

Copy link
Member

@opotowsky opotowsky left a comment

Choose a reason for hiding this comment

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

Hero's work, @ntouran. Thanks so much!

You have a merge conflict because of something I merged yesterday but otherwise looks good to me!

Comment on lines 33 to 34
# helps us use RST files
docutils<0.18
Copy link
Member

Choose a reason for hiding this comment

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

This is the source of your merge conflict. I changed this to 0.17 because of some old bug. But if this update removes that limitation then even better!

Copy link
Member

Choose a reason for hiding this comment

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

hmmm...

I guess we should test that. Or test if the Nick's changes work with the other version of docutils.

Copy link
Member

Choose a reason for hiding this comment

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

from elsewhere, we still need docutils<0.19 in here.

Copy link
Member

@opotowsky opotowsky left a comment

Choose a reason for hiding this comment

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

This isn't working for me in a fresh python 3.11 venv, so I retract my original approval :-(

doc/requirements-docs.txt Show resolved Hide resolved
@ntouran
Copy link
Member Author

ntouran commented Aug 9, 2023

I rebased to fix the merge and pinned docutils to 0.18.1. I built a fresh venv in 3.11 installing requirements, then requirements-test, then requirements-doc in order.

. I don't understand the issue with sphinx-data-viewer. It isn't dead, it just hasn't changed for a while. The entire sphinx-needs community uses it as a dependency so I'm pretty confident it works on python 3.11 even in Windows. What kind of error do you guys see installing that?

@ntouran ntouran force-pushed the doc-deps-update branch 2 times, most recently from 9508b71 to e470d32 Compare August 9, 2023 01:36
@ntouran
Copy link
Member Author

ntouran commented Aug 9, 2023

I fixed that CI build in another PR: #1380

This makes them compatible with Python 3.11 and 3.9.
I confirmed with fresh venvs of both versions on
Linux at least.
This uses the modern recommended approach from the RTD theme
docs for overriding a few css things using @import.

Also bring in a few other theme options just for visibility.
This is required for sphinx-gallery to build the galleries
correctly. Otherwise you get sphinx build errors
and rendering errors where the gallery examples
cannot be clicked.
This one is pulled between sphinx-rtd-theme and sphinx-needs.
@ntouran
Copy link
Member Author

ntouran commented Aug 9, 2023

rebased over the test fix so all checks should pass this time.

@john-science john-science changed the title Doc deps update Updating documentation dependencies for Python 3.11 Aug 9, 2023
@ntouran ntouran requested a review from opotowsky August 9, 2023 21:41
Copy link
Member

@opotowsky opotowsky left a comment

Choose a reason for hiding this comment

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

I think all my issues were a me-problem and now resolved, so we are officially good to go here!

@ntouran
Copy link
Member Author

ntouran commented Aug 9, 2023

Ope uh oh I'm getting errors in python3.9 doc build now. don't merge yet.

Copy link
Member

@john-science john-science left a comment

Choose a reason for hiding this comment

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

Okay, this built for me under Linux (Ubuntu 20.04) and Python 3.11.

There is a LOT of material in our docs, so I can't guarantee there isn't just one broken feature somewhere.

Also:

  • I didn't try building the docs under Windows. Which is still something I guess we have to support.
  • I didn't try building the docs under Python 3.9. Do we need to support that still?

This was a mistake on previous commit.

For On Python 3.9, building the docs caused a jinja error
during nbconvert that requires pinning back to Jinja2==3.0.3
so that was also done.

See: sphinx-doc/sphinx#10289
@john-science john-science merged commit 0846a86 into terrapower:main Aug 9, 2023
10 checks passed
@john-science
Copy link
Member

@ntouran @opotowsky You two can take a look, but I tried to go through the published docs fairly carefully, and I think they look good:

https://terrapower.github.io/armi/index.html

I don't see any broken features or pages.

drewj-usnctech added a commit to drewj-usnctech/armi that referenced this pull request Aug 24, 2023
…id-refactor-pre-1278

* terrapower/main:
  Move max assembly number out of global scope (terrapower#1383)
  Ensuring we throw an error on bad YAML files (terrapower#1358)
  Removing unused settings (terrapower#1393)
  Fixing some miscellaneous TODOs (terrapower#1392)
  Removing global plugin flags (terrapower#1388)
  Update reactivity coefficient parameters (terrapower#1355)
  Fixing ruff formatting of doc gallery examples (terrapower#1389)
  Fixing broken link (terrapower#1390)
  Removing unreachable code block (terrapower#1391)
  Removing unnecessary f-strings (terrapower#1387)
  Updating documentation dependencies for Python 3.11 (terrapower#1378)
  Adding a little code coverage to the CLIs (terrapower#1371)
  Remove coveragepy-lcov dependency during CI. (terrapower#1382)
  Reconnect logger after disconnecting in test. (terrapower#1381)
  Add Python 3.11 to GH Actions (terrapower#1341)
  Removing global variable from runLog.py (terrapower#1370)
  Moving the First-Time Contributors guide to the docs (terrapower#1368)
drewj-usnctech added a commit to drewj-usnctech/armi that referenced this pull request Sep 6, 2023
…t-mod-empty-validation

* terrapower/main: (23 commits)
  Allowing users to set powerDensity instead of power (terrapower#1395)
  Fix assemNum parameter for uniform mesh reactor. (terrapower#1398)
  Update to black v22.6.0 (terrapower#1396)
  Fixing gallery example for new working Grids (terrapower#1394)
  Refactor armi.reactor.grids to wider submodule; Grids as ABC (terrapower#1373)
  Make SFP a child of reactor. (terrapower#1349)
  Move max assembly number out of global scope (terrapower#1383)
  Ensuring we throw an error on bad YAML files (terrapower#1358)
  Removing unused settings (terrapower#1393)
  Fixing some miscellaneous TODOs (terrapower#1392)
  Removing global plugin flags (terrapower#1388)
  Update reactivity coefficient parameters (terrapower#1355)
  Fixing ruff formatting of doc gallery examples (terrapower#1389)
  Fixing broken link (terrapower#1390)
  Removing unreachable code block (terrapower#1391)
  Removing unnecessary f-strings (terrapower#1387)
  Updating documentation dependencies for Python 3.11 (terrapower#1378)
  Adding a little code coverage to the CLIs (terrapower#1371)
  Remove coveragepy-lcov dependency during CI. (terrapower#1382)
  Reconnect logger after disconnecting in test. (terrapower#1381)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update docs dependencies to be compatible with python 3.11
3 participants