Skip to content

Commit

Permalink
Update the docs building procedure
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
lubosmj committed Sep 9, 2024
1 parent 090a205 commit ca8ee0e
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 20 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions base/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -33,7 +31,6 @@ services:

ports:
- "{API_PORT}:{NGINX_PORT}"
- "{DOCS_PORT}:{NGINX_DOCS_PORT}"
depends_on:
- _base
volumes:
Expand Down
1 change: 0 additions & 1 deletion base/dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ py-spy
pydevd_pycharm
django-extensions
pulp-cli
pulp-cli-deb
4 changes: 0 additions & 4 deletions client/oci_env/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion compose.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ DEV_SOURCE_PATH=
# API_HOST=localhost
# API_PORT=5001
# API_PROTOCOL=http
# DOCS_PORT=12345
1 change: 0 additions & 1 deletion staging_docs/dev/guides/create-multiple-envs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ca8ee0e

Please sign in to comment.