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

Clean sphinx documentation #91

Closed
jared321 opened this issue May 15, 2024 · 5 comments
Closed

Clean sphinx documentation #91

jared321 opened this issue May 15, 2024 · 5 comments
Assignees

Comments

@jared321
Copy link
Contributor

jared321 commented May 15, 2024

When I try to build the sphinx documentation in HTML using tox -e html, I get many warnings and two errors.

Determine if these are due to a poor tox specification or genuine. Some tools contain a flag that treats warnings as errors. It might be good to setup all documentation GH actions with such a flag when possible to ensure that documentation quality does not drift over time. This implies that we first need to get rid of all warnings and errors.

I see that the notebooks are excluded from the sphinx build. It sounds like these notebooks are examples that might be pulled out of the sphinx-based documentation. In such a case, it would be good to pull that folder out of docs.

As part of this, the docs action could be rewritten to use tox -e html.

@jared321 jared321 self-assigned this May 15, 2024
jared321 added a commit that referenced this issue May 30, 2024
I've temporarily set this to run on PRs to develop so that I can test it.
Also, I'm not having it publish any pages for now.  I'll do that once all the
docs are clean.
jared321 added a commit that referenced this issue May 30, 2024
@asemposki
Copy link
Collaborator

I have finished cleaning up my portion of the files in terms of flake8 compatibility. These include all files related to the building and testing of the Bivariate Linear class (previously written and maintained by Dan Liyanage), and my own Gaussian multivariate method and testing suite. I have also cleaned up the likelihood_wrappers.py, wrappers.py, and init.py files that showed flake8 errors. The only ones left to clean are related to the Trees class, which I'll leave for John since that is his expertise.

@asemposki
Copy link
Collaborator

I have assigned John so he will see these comments.

jared321 added a commit that referenced this issue Jun 26, 2024
Could still render HTML and PDF format docs locally with tox.
jared321 added a commit that referenced this issue Jul 10, 2024
Daniel has already established the connection between RTD and the repo, so
hopefully this will work.
jared321 added a commit that referenced this issue Jul 10, 2024
RTD did run automatically in the PR as hoped.  However, it failed due to three
warnings that John needs to fix.
jared321 added a commit that referenced this issue Jul 10, 2024
Return variable docs just needed indent.
jared321 added a commit that referenced this issue Jul 10, 2024
These changes were made to address flake8 issues.
jared321 added a commit that referenced this issue Jul 16, 2024
Apparently installing the python package in the root of the repo and with the
tox.ini in the root implies that flake8 will automatically check all Python
code in the repo including the tools folder, which is not really a part of the
package.  Therefore, we don't need the separate check script.
jared321 added a commit that referenced this issue Jul 16, 2024
We should see the PR/Standards GH action fail.
jared321 added a commit that referenced this issue Jul 16, 2024
The previous commit caused GH action to fail as expected.  This should fail in
a similar way.
jared321 added a commit that referenced this issue Jul 16, 2024
The last commit caused GH action to fail as intended.  The action seems to be
effective.
jared321 added a commit that referenced this issue Jul 16, 2024
As before the code standards GH action should fail.
jared321 added a commit that referenced this issue Jul 16, 2024
Reset last breakage.  It resulted in failure as expected.  Should see failure
again.
jared321 added a commit that referenced this issue Jul 16, 2024
Last commit did lead to GH action failure again as expected.
@jared321
Copy link
Contributor Author

jared321 commented Jul 19, 2024

The initial changes are in the main branch and the sphinx docs were automatically published to RTD from that branch to

https://taweretdocs.readthedocs.io

Everything looks reasonably good there in terms of a spot check. In particular, the PDF is available from the fly-away at the bottom left.

The work done on 91_SphinxClean was largely to get the sphinx docs switched to publishing via RTD rather than GH pages and to help integrate quality control of docs in GH actions and in PR reviews. In particular, since the RTD config was not in main I was not able to finalize the publishing of the docs to RTD officially. I will do that final work on the new branch 91_RtdPublish with some direct testing on main.

jared321 added a commit that referenced this issue Jul 19, 2024
…to RTD.

This is to confirm that the docs generation/publishing is setup so that any
pushes to main trigger an automatic publishing to RTD.  In particular, this is
accomplished outside of GH actions and special branches.  This is also a
confirmation that hot fixes could be made to the docs if so desired.

THESE CHANGES SHOULD BE REVERTED DIRECTLY ON MAIN.
jared321 added a commit that referenced this issue Jul 19, 2024
Made additions to .rst and python docstring docs to see that they are rendered
locally by tox, that they are visible in the RTD test rendering for the PR, but
not published in the official, public RTD docs.  They did show up as expected
with tox.

NOTE:  I want these to make it into main so that we do see them automatically
incluced in the official, public RTD docs.  We can then remove them as a hotfix
to test the whole workflow.  Note that these were also added in to generate a
merge conflict with the changes made direclty on main at commit d53cbfe so that
we can test the git workflow a bit as well.
jared321 added a commit that referenced this issue Jul 19, 2024
Some were running on edits to PR conversations as well as upon closing.  Revert
to default, which seems to be working for other PR actions.  If we want actions
to run upon merging, then we will make actions on special branches in accord
with the git workflow to run on pushes to the branch.
jared321 added a commit that referenced this issue Jul 22, 2024
@jared321
Copy link
Contributor Author

The majority of the work needed has been done. However, I keep this Issue open until we are building the Jupyter book correctly on main as part of the release and have converged on a final set of GH actions that are compatible with out git workflow.

jared321 added a commit that referenced this issue Aug 27, 2024
What are now the official notebooks have been moved to a different location and
are successfully integrated into the Taweret jupyterbook.  Therefore, we can
remove those files from here.  All sphinx warnings are now treated as errors
for HTML build.

I was able to build the HTML and PDF versions locally with tox without issue.
I made some typos in index.rst and tox did fail as expected.
@jared321
Copy link
Contributor Author

All charges are now in main. Closed.

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

No branches or pull requests

3 participants