UAL-RE / redata-commons

Commons code used by ReDATA codebases
MIT License
1 stars 2 forks source link

Update Sphinx compile issue after upgrading to Python 3.9 and related packages. #32

Closed yhan818 closed 2 years ago

yhan818 commented 2 years ago

Summary RTD https://readthedocs.org/projects/redata-commons/ build success at the workflow (using Python 3.8) under "Actions", but it failed in readthedocs.org website with the latest Pandas 1.4.3. This is a chain of actions from upgrading from Python 3.7 to Python 3.9. See https://github.com/UAL-RE/redata-commons/issues/23

Objectives Fix the build failure.

Proposal

Testing notes

yhan818 commented 2 years ago

Error logs: git clone --no-single-branch --depth 50 https://github.com/UAL-RE/redata-commons . git fetch origin --force --tags --prune --prune-tags --depth 50 pull/31/head:external-31 git checkout --force 4fe19289c1cb7c3978a1a3a17713d2c0055a1458 git clean -d -f -f python3.7 -mvirtualenv /home/docs/checkouts/readthedocs.org/user_builds/redata-commons/envs/31

Requirement already satisfied: sphinx>=3.0 in /home/docs/checkouts/readthedocs.org/user_builds/redata-commons/envs/31/lib/python3.7/site-packages (from -r docs/requirements.txt (line 1)) (5.0.2) Collecting sphinx-rtd-theme==0.5.1 Downloading sphinx_rtd_theme-0.5.1-py2.py3-none-any.whl (2.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 39.4 MB/s eta 0:00:00 Collecting sphinx-autodoc-typehints==1.11.1 Downloading sphinx_autodoc_typehints-1.11.1-py3-none-any.whl (8.7 kB) ERROR: Ignored the following versions that require a different python version: 1.4.0 Requires-Python >=3.8; 1.4.0rc0 Requires-Python >=3.8; 1.4.1 Requires-Python >=3.8; 1.4.2 Requires-Python >=3.8; 1.4.3 Requires-Python >=3.8 ERROR: Could not find a version that satisfies the requirement pandas==1.4.0 (from versions: 0.1, 0.2, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 0.19.2, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0, 0.21.1, 0.22.0, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4, 0.24.0, 0.24.1, 0.24.2, 0.25.0, 0.25.1, 0.25.2, 0.25.3, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5) ERROR: No matching distribution found for pandas==1.4.0

sphinx>=3.0 " /home/docs/checkouts/readthedocs.org/user_builds/redata-commons/envs/31/lib/python3.7/site-packages (from -r docs/requirements.txt (line 1)) (5.0.2)"

yhan818 commented 2 years ago

Need to update Sphinx configuration file? https://docs.readthedocs.io/en/stable/config-file/v2.html

yhan818 commented 2 years ago

Added .readthedocs.yaml file at the root level solved the issue.

yhan818 commented 2 years ago

Error logs: git clone --no-single-branch --depth 50 https://github.com/UAL-RE/redata-commons . git fetch origin --force --tags --prune --prune-tags --depth 50 pull/31/head:external-31 git checkout --force 4fe1928 git clean -d -f -f python3.7 -mvirtualenv /home/docs/checkouts/readthedocs.org/user_builds/redata-commons/envs/31

Requirement already satisfied: sphinx>=3.0 in /home/docs/checkouts/readthedocs.org/user_builds/redata-commons/envs/31/lib/python3.7/site-packages (from -r docs/requirements.txt (line 1)) (5.0.2) Collecting sphinx-rtd-theme==0.5.1 Downloading sphinx_rtd_theme-0.5.1-py2.py3-none-any.whl (2.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 39.4 MB/s eta 0:00:00 Collecting sphinx-autodoc-typehints==1.11.1 Downloading sphinx_autodoc_typehints-1.11.1-py3-none-any.whl (8.7 kB) ERROR: Ignored the following versions that require a different python version: 1.4.0 Requires-Python >=3.8; 1.4.0rc0 Requires-Python >=3.8; 1.4.1 Requires-Python >=3.8; 1.4.2 Requires-Python >=3.8; 1.4.3 Requires-Python >=3.8 ERROR: Could not find a version that satisfies the requirement pandas==1.4.0 (from versions: 0.1, 0.2, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 0.19.2, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0, 0.21.1, 0.22.0, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4, 0.24.0, 0.24.1, 0.24.2, 0.25.0, 0.25.1, 0.25.2, 0.25.3, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5) ERROR: No matching distribution found for pandas==1.4.0

sphinx>=3.0 " /home/docs/checkouts/readthedocs.org/user_builds/redata-commons/envs/31/lib/python3.7/site-packages (from -r docs/requirements.txt (line 1)) (5.0.2)"

It seems that the compile env is readthedocs.org default setting. The way to set up your own compile env is via .readthedocs.yaml file.