From ca8ee0eed6cdb472496e846f5b43f8c7c3dd77c0 Mon Sep 17 00:00:00 2001 From: Lubos Mjachky Date: Mon, 19 Aug 2024 13:26:13 +0200 Subject: [PATCH] Update the docs building procedure [noissue] --- .github/workflows/ci.yaml | 1 - README.md | 11 +++-------- base/compose.yaml | 3 --- base/dev_requirements.txt | 1 - client/oci_env/utils.py | 4 ---- client/setup.py | 2 +- compose.env.example | 1 - staging_docs/dev/guides/create-multiple-envs.md | 1 - 8 files changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8ad8417..567b59d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -67,7 +67,6 @@ jobs: cp oci_env/.github/assets/${TEST}_compose.env oci_env/compose.env cp oci_env/.github/assets/${TEST}_compose.env ${PWD}/custom.env echo "API_PORT=7210" >> ${PWD}/custom.env - echo "DOCS_PORT=12346" >> ${PWD}/custom.env echo "COMPOSE_PROJECT_NAME=my_2nd_project" >> ${PWD}/custom.env echo "SECOND_SERVICE_PORT=7002" >> ${PWD}/custom.env diff --git a/README.md b/README.md index 387354c..4eb6d0b 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,6 @@ DEV_SOURCE_PATH=pulpcore # These three values must be different from the api port, docs port and project name for any other # instances of the environment that are running to avoid conflicts. API_PORT=4002 -DOCS_PORT=12346 COMPOSE_PROJECT_NAME=test # If you want to use a different directory for your git checkouts you can set this @@ -205,15 +204,11 @@ address for the publicly facing network interface on the host. #### Building docs -First, navigate to `/src/{plugin}/docs` in the container and do the following: -``` -pip3 install -r ../doc_requirements.txt -make clean && make diagrams && make html -python3 -m http.server ${DOCS_PORT} -``` +Install the docs building utility from https://github.com/pulp/pulp-docs. -Then, visit `0.0.0.0:${DOCS_PORT}` in a web browser to preview the documentation. +Then, run `make docs` and `make servedocs`. You can install the utility and run these commands outside of oci-env. +The docs are served on the URL logged by the `make servedocs` step. ### Unit diff --git a/base/compose.yaml b/base/compose.yaml index cb0b641..6bc0376 100644 --- a/base/compose.yaml +++ b/base/compose.yaml @@ -23,8 +23,6 @@ services: - "API_HOST={API_HOST}" - "API_PORT={API_PORT}" - "API_PROTOCOL={API_PROTOCOL}" - - "DOCS_PORT={DOCS_PORT}" - - "NGINX_DOCS_PORT={NGINX_DOCS_PORT}" - "REMOTE_FIXTURES_ORIGIN={REMOTE_FIXTURES_ORIGIN}" - "NGINX_PORT={NGINX_PORT}" - "NGINX_SSL_PORT={NGINX_SSL_PORT}" @@ -33,7 +31,6 @@ services: ports: - "{API_PORT}:{NGINX_PORT}" - - "{DOCS_PORT}:{NGINX_DOCS_PORT}" depends_on: - _base volumes: diff --git a/base/dev_requirements.txt b/base/dev_requirements.txt index ca05815..0fd62b6 100644 --- a/base/dev_requirements.txt +++ b/base/dev_requirements.txt @@ -5,4 +5,3 @@ py-spy pydevd_pycharm django-extensions pulp-cli -pulp-cli-deb diff --git a/client/oci_env/utils.py b/client/oci_env/utils.py index 2227002..d9c9eca 100644 --- a/client/oci_env/utils.py +++ b/client/oci_env/utils.py @@ -100,10 +100,6 @@ def get_config(env_file): "API_HOST": "localhost", "API_PORT": "5001", - # A port dedicated for exposing generated docs - "DOCS_PORT": "12345", - "NGINX_DOCS_PORT": user_preferences.get("DOCS_PORT", "12345"), - # nginx port to run in the container. This defaults to 5001 if nothing is set or # the value of API_HOST if that is set. "NGINX_PORT": user_preferences.get("API_PORT", "5001"), diff --git a/client/setup.py b/client/setup.py index d78f03f..2f956d0 100644 --- a/client/setup.py +++ b/client/setup.py @@ -9,7 +9,7 @@ entry_points={ 'console_scripts': ['oci-env=oci_env.main:main'], }, - install_requires=[], + install_requires=["packaging"], packages=find_packages(exclude=["tests", "tests.*"]), long_description=long_description, long_description_content_type="text/markdown", diff --git a/compose.env.example b/compose.env.example index 745878d..cf7cf23 100644 --- a/compose.env.example +++ b/compose.env.example @@ -18,4 +18,3 @@ DEV_SOURCE_PATH= # API_HOST=localhost # API_PORT=5001 # API_PROTOCOL=http -# DOCS_PORT=12345 diff --git a/staging_docs/dev/guides/create-multiple-envs.md b/staging_docs/dev/guides/create-multiple-envs.md index 960262d..6d1c74e 100644 --- a/staging_docs/dev/guides/create-multiple-envs.md +++ b/staging_docs/dev/guides/create-multiple-envs.md @@ -14,7 +14,6 @@ DEV_SOURCE_PATH=pulpcore # These three values must be different from the api port, docs port and project name for any other # instances of the environment that are running to avoid conflicts. API_PORT=4002 -DOCS_PORT=12346 COMPOSE_PROJECT_NAME=test # If you want to use a different directory for your git checkouts you can set this