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: Remove Sphinx theme and extensions from the repository #7927

Merged
merged 6 commits into from
Oct 17, 2023

Conversation

seisman
Copy link
Member

@seisman seisman commented Oct 17, 2023

Description of proposed changes

Changes in this PR:

  • Remove the local Sphinx theme
  • Remove the local Sphinx extensions
  • Replace the deprecated sphinx-panels extension with the sphinx-design extension
  • List all doc dependencies in doc/rst/requirements.txt
  • Improve the "Docs" workflow

To build the GMT documentation, you need to install the Sphinx theme and extensions. This can be done using the following command:

pip install -r doc/rst/requirements.txt

Closes #7847

.github/workflows/docs.yml Outdated Show resolved Hide resolved
@seisman seisman requested review from PaulWessel, joa-quim and a team October 17, 2023 12:38
@seisman seisman merged commit f9c4e68 into master Oct 17, 2023
6 checks passed
@seisman seisman deleted the doc/cleanup branch October 17, 2023 15:32
@PaulWessel
Copy link
Member

I tried the sequence of commands on the Documentation contribution page. Since I now need some sphinx stuff irst I did

pip install -r doc/rst/requirements.txt

then

dvc pull
cmake --build . --target docs_depends     # Generate images included in the documentation
cmake --build . --target optimize_images  # Optimize PNG images for documentation [optional]
cmake --build . --target docs_man         # Build UNIX manual pages
cmake --build . --target docs_html        # Build HTML manual, tutorial, cookbook, and API reference

but during the docs_man I get this

[7/7] Building manpages...
FAILED: doc/rst/CMakeFiles/docs_man /Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gmt-dev/rbuild/doc/rst/CMakeFiles/docs_man 
cd /Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gmt-dev/rbuild/doc/rst && /opt/local/bin/sphinx-build -q -b man -c /Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gmt-dev/rbuild/doc/rst -d /Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gmt-dev/rbuild/doc/rst/_doctrees_man -t nosphinxdesign /Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gmt-dev/rbuild/doc/rst/source /Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gmt-dev/rbuild/doc/rst/man 2> /Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gmt-dev/rbuild/doc/rst/man.log && /usr/bin/gzip -9 -n -f /Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gmt-dev/rbuild/doc/rst/man/*.?
ninja: build stopped: subcommand failed.

What do I do?

@seisman
Copy link
Member Author

seisman commented Oct 18, 2023

What are the error messages in /Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gmt-dev/rbuild/doc/rst/man.log?

@PaulWessel
Copy link
Member

Extension error:
Could not import extension sphinx_copybutton (exception: No module named 'sphinx_copybutton')

@seisman
Copy link
Member Author

seisman commented Oct 18, 2023

What's the output for you?

$ which python
$ which pip

@PaulWessel
Copy link
Member

which python
/Users/pwessel/miniconda3/bin/python
which pip
/Users/pwessel/miniconda3/bin/pip

They may be too old? I never use conda/miniconda so not sure how to update if that is required.

@seisman
Copy link
Member Author

seisman commented Oct 18, 2023

They should be fine. Maybe try:

python -m pip install -r doc/rst/requirements.txt

@seisman
Copy link
Member Author

seisman commented Oct 18, 2023

What's the output of which sphinx-build? It's likely that you installed Sphinx from Homebrew or MacPorts.

@PaulWessel
Copy link
Member

which sphinx-build
/Users/pwessel/miniconda3/bin/sphinx-build

echo $PATH
/Users/pwessel/miniconda3/bin:/Users/pwessel/miniconda3/condabin:/opt/local/bin:/opt/local/sbin:/Library/TeX/texbin:/opt/homebrew/opt/sphinx-doc/bin:.:/Users/pwessel/bin:/Users/pwessel/miniconda3/bin:/Users/pwessel/UH/RESOURCES/SOFTWARE/bin:/Users/pwessel/binptr:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/usr/X11R6/bin:/Users/pwessel/GMTdev/mbsystem/bin:/opt/homebrew/bin

so I also have /opt/local/bin/sphinx-build

@seisman
Copy link
Member Author

seisman commented Oct 18, 2023

It's likely that cmake found this one /opt/local/bin/sphinx-build.

When you run cmake .. -G Ninja, at the end of output, you'll see the Sphinx path:

-- Found Sphinx: /home/seisman/opt/miniconda/bin/sphinx-build

@PaulWessel
Copy link
Member

-- Found Sphinx: /Users/pwessel/miniconda3/bin/sphinx-build

@PaulWessel
Copy link
Member

Hm, works now, possibly the PR you did last night on the requirements.txt?

@seisman
Copy link
Member Author

seisman commented Oct 18, 2023

Good to know it works. The changes I did last night are unrelated.

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.

Remove the Sphinx themes/extensions from the repository?
3 participants