From f32be5097a55ab9085fc9409e93b738819a32a5b Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Fri, 4 Feb 2022 15:45:26 +0300 Subject: [PATCH] Separate docs environment (#1600) * Separate env for docs --- .github/workflows/docker-amd64.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/sphinx.yml | 6 +++--- .readthedocs.yaml | 2 +- Makefile | 5 ++++- docs/contributing/lint.md | 2 +- docs/maintaining/tasks.md | 2 +- requirements-dev.txt | 3 --- requirements-docs.txt | 3 +++ 9 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 requirements-docs.txt diff --git a/.github/workflows/docker-amd64.yml b/.github/workflows/docker-amd64.yml index c95ad8b29e..b853e4a48e 100644 --- a/.github/workflows/docker-amd64.yml +++ b/.github/workflows/docker-amd64.yml @@ -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 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 232625e485..be1d1eb02a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -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 diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 2ceca229a4..617bafe42f 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -7,7 +7,7 @@ on: - "docs/**" - ".readthedocs.yaml" - - "requirements-dev.txt" + - "requirements-docs.txt" push: branches: - main @@ -17,7 +17,7 @@ on: - "docs/**" - ".readthedocs.yaml" - - "requirements-dev.txt" + - "requirements-docs.txt" workflow_dispatch: jobs: @@ -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 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 678760a9fd..406a33fa0d 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -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 diff --git a/Makefile b/Makefile index d7ad2de755..4406e785e5 100644 --- a/Makefile +++ b/Makefile @@ -132,7 +132,7 @@ 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 @@ -140,6 +140,9 @@ dev-env: ## install libraries required to build docs and run tests 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 diff --git a/docs/contributing/lint.md b/docs/contributing/lint.md index 1c22417e20..c5862bc432 100644 --- a/docs/contributing/lint.md +++ b/docs/contributing/lint.md @@ -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 ``` diff --git a/docs/maintaining/tasks.md b/docs/maintaining/tasks.md index f490bc2aca..eb569b4c1a 100644 --- a/docs/maintaining/tasks.md +++ b/docs/maintaining/tasks.md @@ -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: diff --git a/requirements-dev.txt b/requirements-dev.txt index 73ca5eb8d4..23cb6bcc58 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,10 +1,7 @@ docker -myst-parser packaging plumbum pre-commit pytest requests -sphinx -sphinx-copybutton tabulate diff --git a/requirements-docs.txt b/requirements-docs.txt new file mode 100644 index 0000000000..ba6908eefc --- /dev/null +++ b/requirements-docs.txt @@ -0,0 +1,3 @@ +myst-parser +sphinx +sphinx-copybutton