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

Configuring Read the Docs to publish the MPS manual #141

Merged
merged 17 commits into from
Feb 16, 2023

Conversation

rptb1
Copy link
Member

@rptb1 rptb1 commented Feb 2, 2023

Adds CI configuration to build the MPS manual and publish it at https://memory-pool-system.readthedocs.io/ .

CI will help us know sooner if the manual breaks.

Migrates away from Ravenbrook internal automation that publishes at https://www.ravenbrook.com/project/mps/master/manual/html/ . See #98 (comment) .

Fixes #118.

@rptb1 rptb1 added documentation git-migration Project migration from Ravenbrook internal Perforce infrastructure to public git repo build Problems with builds and build automation labels Feb 2, 2023
@rptb1 rptb1 added this to the Perforce Divorce milestone Feb 2, 2023
@rptb1
Copy link
Member Author

rptb1 commented Feb 2, 2023

Bootstrap issue: If the Read the Docs manual goes away, and someone has a bare MPS tree, how can they read the manual? The readme.txt does not lead to instructions for how to build and read it.

@rptb1
Copy link
Member Author

rptb1 commented Feb 2, 2023

https://memory-pool-system.readthedocs.io/en/latest/design/index.html is blank, so Read the Docs didn't run Sphinx in the same way as "make html" would.

@rptb1
Copy link
Member Author

rptb1 commented Feb 3, 2023

https://memory-pool-system.readthedocs.io/en/latest/design/index.html is blank, so Read the Docs didn't run Sphinx in the same way as "make html" would.

Examining the Read the Docs build output at https://readthedocs.org/projects/memory-pool-system/builds/19364054/ reveals that it's invoking Sphinx with

python -m sphinx -T -E -b html -d _build/doctrees -D language=en . ../../_readthedocs/html

whereas we invoke it with

$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

So Read the Docs is building with "manual/source" as the current working directory. That causes this glob to find no design documents

for design in glob.iglob('../design/*.txt'):

@rptb1
Copy link
Member Author

rptb1 commented Feb 3, 2023

That causes this glob to find no design documents

Fixed in 409aea1 by using app.srcdir as the base directory for the glob etc.

You can see that the designs are converted in https://readthedocs.org/projects/memory-pool-system/builds/19364368/ output from the Sphinx command and at https://memory-pool-system.readthedocs.io/en/branch-2023-02-02-readthedocs/design/index.html

@rptb1
Copy link
Member Author

rptb1 commented Feb 3, 2023

Bootstrap issue: If the Read the Docs manual goes away, and someone has a bare MPS tree, how can they read the manual? The readme.txt does not lead to instructions for how to build and read it.

Fixed in 380b43d which also closes #144 .

Results visible at https://memory-pool-system.readthedocs.io/en/branch-2023-02-02-readthedocs/guide/build.html#building-the-mps-manual

@rptb1
Copy link
Member Author

rptb1 commented Feb 3, 2023

Review suggestion: Check https://memory-pool-system.readthedocs.io/en/branch-2023-02-02-readthedocs/index.html against https://www.ravenbrook.com/project/mps/master/manual/html/ to make sure building with Read the Docs hasn't broken anything. They ought to be identical in content, except for changes made in this branch.

@rptb1 rptb1 marked this pull request as ready for review February 3, 2023 01:43
@rptb1
Copy link
Member Author

rptb1 commented Feb 3, 2023

@UNAA008 spotted a couple of warnings from Read the Docs:

WARNING: while setting up extension extensions.mps: directive 'deprecated' is already registered, it will be overridden
WARNING: while setting up extension extensions.mps: node class 'note' is already registered, its visitors will be overridden

Investigate.

@rptb1
Copy link
Member Author

rptb1 commented Feb 6, 2023

@UNAA008 spotted a couple of warnings from Read the Docs

https://github.com/Ravenbrook/mps/blob/631d30ea5cc1307f801ec2b6d0c3444e6f411172/manual/source/extensions/mps/__init__.py is not well commented, and it's hard to discern the intention, but these are definitely deliberate overrides.

I think adding commentary or working out whether and how to suppress these warnings is outside the scope of this pull request and not very important.

@rptb1 rptb1 linked an issue Feb 15, 2023 that may be closed by this pull request
@rptb1
Copy link
Member Author

rptb1 commented Feb 15, 2023

The manual on Read the Docs doesn't seem to have a search. Investigate.

https://dnd-srd-sphinx.readthedocs.io/en/latest/index.html has a search. I suspect this is to do with our custom theme. We may be able to inherit the search from Read the Docs themes.

manual/build.txt Show resolved Hide resolved
readme.txt Show resolved Hide resolved
manual/source/extensions/mps/designs.py Outdated Show resolved Hide resolved
@rptb1
Copy link
Member Author

rptb1 commented Feb 16, 2023

GitHub deleted my express review record. Reconstructing...

We executed proc.review.express.

  1. @UNAA008 and @thejayps attending.
  2. @UNAA008 had a PI: "TODOs" are for nice-level stuff.
  3. @rptb1 has a new PI: Press the Comment button to save the review record before doing anything else with your tab.
  4. We found no major defects and three minor defects.
  5. @rptb1 I wonder if we could have a general duplicate text finder to prevent Configuring Read the Docs to publish the MPS manual #141 (comment)
  6. @rptb1 Iwbni we had a global tag checker to prevent Configuring Read the Docs to publish the MPS manual #141 (comment)
  7. Edits made together 170d805
  8. Starting exit at 15:20.
  9. Estimated defects remaining: zero.
  10. Revised change passed.
  11. Express review took 55 minutes.

Copy link
Contributor

@thejayps thejayps left a comment

Choose a reason for hiding this comment

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

proc.review.exit.pass

#141 (comment)

@rptb1 rptb1 merged commit e179634 into master Feb 16, 2023
@rptb1
Copy link
Member Author

rptb1 commented Feb 16, 2023

Executing proc.merge.pull-request.

  1. Start time 16:17.
  2. An automated test case isn't feasible because it would need to publish a readme.txt via GitHub and check that the link to the manual was broken.
  3. End time 16:22.
  4. Merging procedure took 5 minutes.

@rptb1
Copy link
Member Author

rptb1 commented Feb 17, 2023

  • @UNAA008 had a PI: "TODOs" are for nice-level stuff.

Added to #140 (comment)

  • @rptb1 has a new PI: Press the Comment button to save the review record before doing anything else with your tab.

Fixed in 6fa80f4

  • @rptb1 I wonder if we could have a general duplicate text finder

Created #160

  • @rptb1 Iwbni we had a global tag checker to prevent ..

Created #161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Problems with builds and build automation documentation git-migration Project migration from Ravenbrook internal Perforce infrastructure to public git repo
2 participants