Skip to content

Commit

Permalink
🔧 Configure readthedocs documentation build (#13)
Browse files Browse the repository at this point in the history
Getting our documentation built on Readthedocs following https://jupyterbook.org/en/stable/publish/readthedocs.html. Also documenting how to build the docs locally.

* 🔧 Configure docs extras dependencies correctly

Turns out groups and extras can't be used together in pyproject.toml by poetry, see python-poetry/poetry#4897. Changed things around so that `pip install .[docs]` works!

* 🔧 Configure readthedocs build

Getting our documentation on Readthedocs! Following https://jupyterbook.org/en/stable/publish/readthedocs.html

* 🔥 Remove deploy-docs GitHub Actions workflow

Just use readthedocs. Sadly this means we can't skip docs build for files outside the docs/ folder anymore.

* 📝 Document how to run things locally

Sneaking in some extra notes on how people can clone the repo, setup a virtual environment, install dependencies and build the jupyter book docs!
  • Loading branch information
weiji14 committed Jun 7, 2022
1 parent 09e53a2 commit e4f8c96
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 183 deletions.
51 changes: 0 additions & 51 deletions .github/workflows/deploy-docs.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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-22.04
tools:
python: "3.9"
jobs:
pre_build:
# Generate the Sphinx configuration for this Jupyter Book so it builds.
# https://jupyterbook.org/en/stable/publish/readthedocs.html
- "jupyter-book config sphinx docs/"

python:
install:
- method: pip
path: .
extra_requirements:
- docs

sphinx:
builder: html
fail_on_warning: true
45 changes: 41 additions & 4 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ including some that don't require you to write a single line of code.

## 📝 Types of contributions

## Discussions 🎉
### Discussions 🎉

Discussions are where we have conversations.

If have a great new idea, or want to share something amazing with the community,
join us in [discussions](https://github.com/weiji14/zen3geo/discussions).

## Issues 🐞
### Issues 🐞

[Issues](https://docs.github.com/en/github/managing-your-work-on-github/about-issues)
are used to track tasks that contributors can help with.
Expand All @@ -22,7 +22,7 @@ search open issues to see if someone else has reported the same thing. If it's
something new, [open an issue](https://github.com/weiji14/zen3geo/issues/new/choose)!
We'll use the issue to have a conversation about the problem you want to fix.

## Pull requests 🛠️
### Pull requests 🛠️

A [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
is a way to suggest changes in our repository.
Expand All @@ -31,13 +31,14 @@ When we merge those changes, they should be deployed to the live site within a f
To learn more about opening a pull request in this repo,
see [Opening a pull request](#opening-a-pull-request) below.

## Translations 🌏
### Translations 🌏

人虽有南北之分,但佛性本无南北。

Yes, the source content in this repository is mostly written in English,
but we welcome folks from across the world! Please reach out if you have experience in translations and are interested in contributing!

---

## 👐 Opening a Pull Request

Expand Down Expand Up @@ -91,6 +92,42 @@ but we welcome folks from across the world! Please reach out if you have experie
will be notified about your great new addition and will get back to you on
the next steps.

---

## 🏠 Running things locally

This project uses [``poetry``](https://python-poetry.org/docs/master/) for
installing Python dependencies required in ``zen3geo``, as well as the
development and documentation-related dependencies.

### Cloning the repository ♊

```
git clone git@github.com:weiji14/zen3geo.git
cd zen3geo
```

### Setup virtual environment ☁️

```
mamba create --name zen3geo python=3.9
mamba activate
pip install poetry==1.2.0b1
poetry install
```

### Building documentation 📖

```
poetry install --extras=docs # or `pip install .[docs]`
jupyter-book build docs/
```

Then open ``docs/_build/html/index.html`` in your browser to see the docs.

---

## 🥳 And that's it!

You're now part of the zen3geo community ✨
Expand Down
Loading

0 comments on commit e4f8c96

Please sign in to comment.