ENH 5.3 - Implement Sphinx documentation with CI integration#15
Open
ENH 5.3 - Implement Sphinx documentation with CI integration#15
Conversation
6 tasks
- Add pandas, numpy, torch, scipy, scikit-learn to docs_requires - Ensures autodoc can import modules during documentation build - Fixes ModuleNotFoundError warnings in CI/CD build logs
- Add sphinx>=7.0.0, myst-parser>=4.0.0, sphinx_pdj_theme>=0.4.0 - Ensure all core dependencies (pandas, numpy, torch, scipy, scikit-learn) are in docs_requires - Fixes autodoc import failures in CI/CD documentation build
- Remove docs/_build, docs/_autosummary, and generated .rst files - Ensures fresh build without cache interference - Prevents stale documentation from being deployed - Applies to both docs.yml and python-package.yml workflows
- Add success() check to deploy-docs if condition - Ensures deployment only runs when build-docs completes successfully - Fixes skipped deployment issue
- Add debug logging to verify package installation and imports - Set PYTHONPATH explicitly for sphinx-apidoc and build steps - Add autodoc_mock_imports for problematic dependencies - Ensure dsipts package is properly accessible during documentation build - Should resolve empty API docs on server vs populated docs locally
Critical fix: - docs_requires now includes ALL core_requirements (not just subset) - Ensures pip install -e '.[docs]' installs pandas, numpy, torch, etc. - Simplified workflow with minimal verification step - Removed unnecessary mock imports since all deps are installed This fixes ModuleNotFoundError for pandas and other core dependencies during CI/CD autodoc generation.
CRITICAL FIX: - pyproject.toml was overriding setup.py with minimal docs dependencies - Updated docs extra to include ALL 27 dependencies (Sphinx + core packages) - Now pip install -e '.[docs]' will install pandas, numpy, torch, etc. - This was the root cause of ModuleNotFoundError in CI/CD The pyproject.toml takes precedence over setup.py for modern Python packaging.
- Remove redundant docs job from python-package.yml - Documentation building is handled by dedicated docs.yml workflow - Reduces duplicate CI/CD jobs and confusion - Simplifies workflow: test → build (no docs in between) - Keeps docs.yml as single source of truth for documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes:
Testing:
Notes: