astrochun / Metallicity_Stack_Commons

Set of common codes used in metallicity studies that use stacking techniques
MIT License
0 stars 1 forks source link

Missing API documentation in RTDs #102

Closed astrochun closed 3 years ago

astrochun commented 3 years ago

Issue with API documentation not being available. See this

Issue stems from docs/source/requirements.txt not containing chun_codes. This can be done via -e option. See this SO answer.

Fix is in hotfix/1.4.1

astrochun commented 3 years ago

Unfortunately, pip uses git to clone the repo, but the sphinxdocs/sphinx Docker image does not contain git. As such, it fails to build and gives the following error:

/usr/bin/docker run --name ecc344654c468b64d0bdb5a2c4f4_b71b3f --label 442333 --workdir /github/workspace --rm -e INPUT_DOCS-FOLDER -e INPUT_BUILD-COMMAND -e INPUT_PRE-BUILD-COMMAND -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/Metallicity_Stack_Commons/Metallicity_Stack_Commons":"/github/workspace" 442333:9368ecc344654c468b64d0bdb5a2c4f4 WARNING: The directory '/github/home/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting sphinx>=3.0 Downloading Sphinx-3.4.3-py3-none-any.whl (2.9 MB) Collecting sphinx-rtd-theme==0.5.1 Downloading sphinx_rtd_theme-0.5.1-py2.py3-none-any.whl (2.8 MB) Collecting sphinx-autodoc-typehints==1.11.1 Downloading sphinx_autodoc_typehints-1.11.1-py3-none-any.whl (8.7 kB) Obtaining chun_codes from git+https://github.com/astrochun/chun_codes.git#egg=chun_codes (from -r docs/requirements.txt (line 4)) Running command git clone -q https://github.com/astrochun/chun_codes.git /github/workspace/src/chun-codes Cloning https://github.com/astrochun/chun_codes.git to ./src/chun-codes ERROR: Error [Errno 2] No such file or directory: 'git' while executing command git clone -q https://github.com/astrochun/chun_codes.git /github/workspace/src/chun-codes ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH? WARNING: You are using pip version 20.0.2; however, version 21.0.1 is available. You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. [sphinx-action] Starting sphinx-action build. Running:

Building docs in docs/

There are a couple of ways to resolve this.

  1. Build the Docker image with git installed
  2. Publish chun_codes to PyPI
astrochun commented 3 years ago

There are a couple of ways to resolve this.

  1. Build the Docker image with git installed
  2. Publish `chun_codes1 to PyPI

Decided to go with option 2 since that was ultimately going to happen. This seem to compiled in CI build, so API documentation will be included.