-
Notifications
You must be signed in to change notification settings - Fork 224
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
Migrate Continuous Documentation from Vercel to Readthedocs #1859
Merged
Merged
Changes from 12 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7123f22
Remove vercel configuration files
weiji14 5b7a43c
Setup readthedocs configuration file
weiji14 23507e3
Merge branch 'main' into vercel_to_readthedocs
weiji14 d8d3609
Run pip install . in the readthedocs build environment
weiji14 4024311
Merge branch 'main' into vercel_to_readthedocs
seisman 2423151
Remove vercel configurations and add readthedocs configurations in MA…
seisman afe3910
Update doc/maintenance.md to trigger builds in PR
seisman 55a85e2
Set canonical URL by setting html_baseurl
seisman 28aa23f
Update contributing and maintenance guides
seisman 8e44ed7
Customize the pre_build step to generate API stub files
seisman bcdaae4
Merge branch 'main' into vercel_to_readthedocs
seisman d21acf9
Only install packages required for building docs
seisman 96e7aac
Move the docs environment file to the ci directory
seisman 95b9788
Merge branch 'main' into vercel_to_readthedocs
seisman cdadd37
Merge branch 'main' into vercel_to_readthedocs
seisman 41decc3
Merge branch 'main' into vercel_to_readthedocs
seisman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: pygmt | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
# Required dependencies | ||
- pip | ||
- gmt=6.3.0 | ||
- numpy>=1.19 | ||
- pandas | ||
- xarray | ||
- netCDF4 | ||
- packaging | ||
# Optional dependencies | ||
- geopandas | ||
# Development dependencies (general) | ||
- build | ||
- ipython | ||
- make | ||
# Dev dependencies (building documentation) | ||
- myst-parser | ||
- sphinx | ||
- sphinx-copybutton | ||
- sphinx-design | ||
- sphinx-gallery | ||
- sphinx_rtd_theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the version of Python and other tools you might need | ||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
python: "mambaforge-4.10" | ||
jobs: | ||
pre_build: # Generate api stub files before building | ||
- make -C doc api | ||
|
||
# Build documentation in the doc/ directory with Sphinx | ||
sphinx: | ||
configuration: doc/conf.py | ||
|
||
# If using Sphinx, optionally build your docs in additional formats such as PDF | ||
# formats: | ||
|
||
# Optionally declare the Python requirements required to build your docs | ||
conda: | ||
environment: .github/workflows/docs_environment.yml | ||
python: | ||
install: | ||
- method: pip | ||
path: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
.github/workflows
a good place to save these environment files?I believe we will also use it in
ci_docs.yml
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inspiration from xarray - https://github.com/pydata/xarray/tree/main/ci/requirements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds a good place to put all CI related files.
Ping @weiji14 for comments on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we would put all these 'docs' dependencies as an 'extras' in pyproject.toml/setup.py following https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies so that we could just
pip install .[docs]
. However, GMT would still need to come from conda-forge, unless #1853 becomes a thing 🙂There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, is the GMT C library needed to build the docs? Could we just mock it out? I recall @meghanrjones was able to use https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_mock_imports at xarray-contrib/xbatcher#62 (comment), though not sure if it works in this case. If it does work though, then my comment at https://github.com/GenericMappingTools/pygmt/pull/1859/files#r904531125 about using 'extras' would be the way to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's possible. We need to call the GMT C library to generate images (i.e.., all the images generated by sphinx-gallery).