Skip to content

Migrate Continuous Documentation from Vercel to Readthedocs #1859

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

Merged
merged 16 commits into from
Jul 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .readthedocs.yaml
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:
# - pdf

# Optionally declare the Python requirements required to build your docs
conda:
environment: ci/requirements/docs.yml
python:
install:
- method: pip
path: .
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
prune .dvc
prune .github*
prune ci
prune doc*
prune examples*
exclude .dvcignore
exclude .gitignore
exclude .readthedocs.yaml
exclude AUTHORSHIP.md
exclude CONTRIBUTING.md
exclude Makefile
exclude environment.yml
exclude package.json
exclude requirements.txt
exclude vercel.json
26 changes: 26 additions & 0 deletions ci/requirements/docs.yml
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
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

@weiji14 weiji14 Jul 11, 2022

Choose a reason for hiding this comment

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

Yeah, if we merge this PR first, will need to update bump_gmt_checklist.md directly in #1990 later.

- numpy>=1.20
- 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
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
.. |year| replace:: {year}
"""

html_baseurl = "https://pygmt.org/latest/"
html_last_updated_fmt = "%b %d, %Y"
html_title = "PyGMT"
html_short_title = "PyGMT"
Expand Down
4 changes: 2 additions & 2 deletions doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ download and install anything:
click on the "Propose changes" button to open a pull request.
7. The pull request will run the GMT automated tests and make a preview deployment.
You can see how your change looks in the PyGMT documentation by clicking the
"View deployment" button after the Vercel bot has finished (usually 5-10 minutes
after the pull request was created).
"Details" button of the "docs/readthedocs.org:pygmt-dev" status check,
after the building has finished (usually 10-15 minutes after the pull request was created).
8. We'll review your pull request, recommend changes if necessary, and then merge
them in if everything is OK.
9. Done!
Expand Down
9 changes: 3 additions & 6 deletions doc/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,10 @@ There are 11 configuration files located in `.github/workflows`:

## Continuous Documentation

We use the [Vercel for GitHub](https://github.com/apps/vercel) App to preview changes
We use the [ReadtheDocs](https://readthedocs.org/) service to preview changes
made to our documentation website every time we make a commit in a pull request.
The service has a configuration file `vercel.json`, with a list of options to
change the default behaviour at https://vercel.com/docs/configuration.
The actual script `package.json` is used by Vercel to install the necessary packages,
build the documentation, copy the files to a 'public' folder and deploy that to the web,
see https://vercel.com/docs/build-step.
The service has a configuration file `.readthedocs.yaml`, with a list of options
to change the default behaviour at https://docs.readthedocs.io/en/stable/config-file/index.html.


## Dependencies Policy
Expand Down
8 changes: 0 additions & 8 deletions package.json

This file was deleted.

6 changes: 0 additions & 6 deletions vercel.json

This file was deleted.