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

Doc configuration updates #286

Merged
merged 3 commits into from
Nov 29, 2023

Conversation

greglucas
Copy link
Collaborator

Change Summary

In #271 we identified that we had to build documentation on Python 3.10 or lower due to IntEnum inheritance. Instead of pinning the lower Python version, we can instead ignore the places that cause the issues directly with numpydoc and nitpick_ignore options.
https://numpydoc.readthedocs.io/en/latest/install.html

The inherited methods are to_bytes() and the like from the Int class, which we don't really need/want to show up anyways. They still show up in the documentation, they just aren't clickable.

Additionally, put the nitpicky = True into the configuration, so that anyone building the docs gets that locally as well.

closes #271

This updates some numpydoc options and ignores inherited members
for classes that inherit from IntEnum. IntEnum use throws warnings
for sphinx references, so ignore those here for now.
We now have PRs being built in ReadTheDocs, so no need to upload
the docs here as well.
@greglucas greglucas added the Repo: Documentation Improvements or additions to documentation label Nov 22, 2023
@greglucas greglucas requested a review from sdhoyt November 22, 2023 18:15
@greglucas greglucas requested a review from bourque November 22, 2023 18:23
Comment on lines -29 to -58
make -C docs html SPHINXOPTS="-W --keep-going -n"

- uses: actions/upload-artifact@v2
with:
name: DocumentationHTML
path: docs/build/html/

# Publish built docs to gh-pages branch
- name: Commit documentation changes
# push docs only when a GitHub Release is made
if: github.event_name == 'release' && github.event.action == 'published'
run: |
git clone https://github.com/IMAP-Science-Operations-Center/imap_processing.git --branch gh-pages --single-branch gh-pages
cp -r docs/build/html/* gh-pages/
cd gh-pages
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore that.

- name: Publish docs
# push docs only when a GitHub Release is made
if: github.event_name == 'release' && github.event.action == 'published'

uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am guessing we are removing all of this because we don't use GitHub pages now that we are using RTD?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Exactly, this was so you could download and the artifacts created, but much easier to just look at the read the docs built PR pages instead now that we have that set up.

Copy link
Collaborator

@bourque bourque left a comment

Choose a reason for hiding this comment

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

Aside from my one comment here, this looks good to me! And it will help me with my CoDICE doc problems on #288 I think. Thank you

@greglucas greglucas merged commit c20b1e8 into IMAP-Science-Operations-Center:dev Nov 29, 2023
14 checks passed
@greglucas greglucas deleted the doc-conf branch November 29, 2023 15:05
laspsandoval pushed a commit to laspsandoval/imap_processing that referenced this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Repo: Documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG - Github CI doc generation is not working with python 3.11
2 participants