Skip to content

Commit

Permalink
Separate docs environment (#1600)
Browse files Browse the repository at this point in the history
* Separate env for docs
  • Loading branch information
mathbunnyru authored Feb 4, 2022
1 parent 68d640f commit f32be50
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Install Dev Dependencies
run: |
python -m pip install --upgrade pip
make -C main dev-env
make -C main install-dev-env
- name: Build Docker Images
run: make -C main build-all
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Install Dev Dependencies
run: |
python -m pip install --upgrade pip
make -C main dev-env
make -C main install-dev-env
- name: Build Docker Images
run: make -C main build-all-multi
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

- "docs/**"
- ".readthedocs.yaml"
- "requirements-dev.txt"
- "requirements-docs.txt"
push:
branches:
- main
Expand All @@ -17,7 +17,7 @@ on:

- "docs/**"
- ".readthedocs.yaml"
- "requirements-dev.txt"
- "requirements-docs.txt"
workflow_dispatch:

jobs:
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Install Dev Dependencies
run: |
python -m pip install --upgrade pip
make dev-env
make install-docs-env
- name: Build Documentation
run: make docs
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ sphinx:
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: requirements-dev.txt
- requirements: requirements-docs.txt
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,17 @@ dev/%: PORT?=8888
dev/%: ## run a foreground container for a stack
docker run -it --rm -p $(PORT):8888 $(DARGS) $(OWNER)/$(notdir $@)

dev-env: ## install libraries required to build docs and run tests
install-dev-env: ## install libraries required to build images and run tests
@pip install -r requirements-dev.txt



docs: ## build HTML documentation
sphinx-build docs/ docs/_build/

install-docs-env: ## install libraries required to build docs
@pip install -r requirements-docs.txt



hook/%: WIKI_PATH?=../wiki
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This can be achieved by using the generic task used to install all Python develo

```sh
# Install all development dependencies for the project
make dev-env
make install-dev-env
# It can also be installed directly
pip install pre-commit
```
Expand Down
2 changes: 1 addition & 1 deletion docs/maintaining/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Pushing `Run Workflow` button will trigger this process.
## Adding a New Core Image to Docker Hub

```{note}
In general, we do not add new core images and ask contributors to either create a [recipe](../using/recipes.md) or [community stack](../using/stacks.md).
In general, we do not add new core images and ask contributors to either create a [recipe](../using/recipes.md) or [community stack](../contributing/stacks.md).
```

When there's a new stack definition, do the following before merging the PR with the new stack:
Expand Down
3 changes: 0 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
docker
myst-parser
packaging
plumbum
pre-commit
pytest
requests
sphinx
sphinx-copybutton
tabulate
3 changes: 3 additions & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
myst-parser
sphinx
sphinx-copybutton

0 comments on commit f32be50

Please sign in to comment.