Build system configuration
Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/build-system-configuration
Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder
npx -y skills add HolobiomicsLab/asb-skill-collections --skill build-system-configurationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when when you have a Python package with source modules that need to be documented, want to generate API stubs automatically from docstrings, and need to produce browsable HTML documentation for distribution or hosting (e.g., on ReadTheDocs).
The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.1 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Build System Configuration
Summary
Configure and execute a documentation build system using Sphinx to generate API stubs from source code and compile them into browsable HTML output. This skill ensures reproducible, automated generation of API documentation from live source modules.
When to use
When you have a Python package with source modules that need to be documented, want to generate API stubs automatically from docstrings, and need to produce browsable HTML documentation for distribution or hosting (e.g., on ReadTheDocs). Triggered by the presence of a Sphinx configuration, source modules, and a requirement for automated, version-controlled documentation builds.
When NOT to use
- Documentation already exists in compiled form (HTML, PDF) and does not need regeneration.
- Source code lacks docstrings or structured documentation; Sphinx-apidoc will produce empty or minimal stubs.
- Build environment lacks write permissions to the documentation directory or _build output path.
Inputs
- requirements.txt (Python dependency specification)
- Source module directory (e.g., ../dreams with .py files)
- Sphinx conf.py (build configuration)
- Tutorial or reference directories (optional external content)
- Sphinx source files (.rst files in documentation directory)
Outputs
- Generated API stub files (.rst) from sphinx-apidoc
- Compiled HTML documentation tree in _build/html/
- index.html (browsable entry point)
- Complete API reference with cross-linked pages
How to apply
First, install Python dependencies from a requirements.txt file using pip to ensure all Sphinx and build tools are available in the environment. Second, link external tutorial or reference directories into the documentation source tree using symbolic links (e.g., ln -s ../tutorials tutorials) so they are discoverable by the build process. Third, run sphinx-apidoc to scan the source module directory (e.g., ../dreams) and auto-generate reStructuredText stub files in the current documentation directory; this creates API documentation anchors from module docstrings. Finally, execute make html to invoke the Sphinx build system, which processes all source files and outputs compiled HTML documentation to _build/html/. Verify successful build by checking for the index.html file in the output directory and testing navigation in a browser.
Related tools
- pip (Installs Python dependencies (Sphinx, extensions, build tools) specified in requirements.txt into the active environment) — https://pip.pypa.io/
- Sphinx (Orchestrates the entire documentation build: sphinx-apidoc auto-generates API stubs from source docstrings, and make html compiles reStructuredText into browsable HTML output) — https://www.sphinx-doc.org/
- sphinx-apidoc (Scans a Python module directory and auto-generates reStructuredText (.rst) stub files for API documentation, extracting docstrings and module metadata) — https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html
- make (Executes the Makefile generated by Sphinx to invoke the html build target, processing all source files and generating the final HTML output)
Examples
pip install -r requirements.txt && ln -s ../tutorials tutorials && sphinx-apidoc -o . ../dreams && make html && open _build/html/index.html
Evaluation signals
- Exit code 0 from
pip install -r requirements.txtand successful import of sphinx and sphinx_apidoc in Python. - Symbolic link created successfully;
ls -lin documentation directory shows link target (e.g.,tutorials -> ../tutorials). - sphinx-apidoc generates .rst files in the target directory; verify with
ls *.rstand check file contents contain module docstring text. - make html completes without errors; _build/html/index.html exists and is valid HTML; no build warnings about missing modules or broken references.
- Browser can open _build/html/index.html and navigate between API pages; docstrings are rendered with proper formatting and cross-links.
Limitations
- Sphinx-apidoc only processes modules with docstrings; undocumented code produces minimal or empty stubs.
- Symbolic links may not work on all filesystems or operating systems (e.g., Windows without developer mode); alternative copy or path configuration may be required.
- Build time scales with module size and number of dependencies; very large packages may require incremental builds or parallel processing.
- API documentation is static at build time; dynamic or runtime-generated APIs are not captured by sphinx-apidoc.
- Cross-references between external packages require those packages to be installed or sphinx-inventory files to be available.
Evidence
- [other] Install Python dependencies from requirements.txt using pip. Create a symbolic link from the tutorials folder to the current documentation directory using ln -s. Generate API documentation stubs by running sphinx-apidoc to scan the ../dreams module and output documentation source files. Build HTML documentation using make html, which processes Sphinx source files and generates the browsable output in _build/html/.: "Install Python dependencies from requirements.txt using pip. Create a symbolic link from the tutorials folder to the current documentation directory using ln -s. Generate API documentation stubs by"
- [methods] pip install -r requirements.txt: "pip install -r requirements.txt"
- [methods] sphinx-apidoc -o . ../dreams && make html: "sphinx-apidoc -o . ../dreams && make html"
- [methods] open _build/html/index.html: "open _build/html/index.html"
- [other] The documentation build mechanism invokes sphinx-apidoc to generate API stubs from the ../dreams source directory into the current directory, then executes make html to compile the Sphinx documentation into browsable HTML files in the _build/html output directory.: "The documentation build mechanism invokes sphinx-apidoc to generate API stubs from the ../dreams source directory into the current directory, then executes make html to compile the Sphinx"