Skip to content

fix: declare the dependencies the shipped Sphinx extension imports - #39

Open
blaipr wants to merge 1 commit into
ctrliq:mainfrom
blaipr:fix/declare-docs-extra
Open

fix: declare the dependencies the shipped Sphinx extension imports#39
blaipr wants to merge 1 commit into
ctrliq:mainfrom
blaipr:fix/declare-docs-extra

Conversation

@blaipr

@blaipr blaipr commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

ascenderkit/cli/sphinx.py ships inside the package and imports docutils and sphinxcontrib.autoprogram, neither of which is a declared dependency or an extra. Installing the package and importing that module fails:

File ".../ascenderkit/cli/sphinx.py", line 3, in <module>
    from docutils.nodes import Text, paragraph
ModuleNotFoundError: No module named 'docutils'

The requirement was recorded in prose instead. ascenderkit/cli/docs/README.md told you to pip install sphinx sphinxcontrib-autoprogram by hand, which works until the list changes and the sentence does not.

Adds a docs extra with sphinx, sphinxcontrib-autoprogram and docutils, and points the README at pip install -e ".[docs]". docutils is listed explicitly even though sphinx pulls it in, for the same reason urllib3 is listed in install_requires: the code imports it by name, so it should not depend on arriving as somebody else's transitive.

Checked both directions: import ascenderkit.cli.sphinx raises ModuleNotFoundError from a clean install of the wheel, and after pip install ".[docs]" it gets past every import and reaches its own runtime requirement, "Please specify a valid CONTROLLER_HOST for a real (running) installation", which is the extension asking for a live server rather than a missing module.

Note for whoever merges: #37 moves extras_require into [project.optional- dependencies] in pyproject.toml, so whichever lands second needs this extra moved across with it.

@ciq-it-service-account

ciq-it-service-account commented Sep 12, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cigamit cigamit self-assigned this Sep 13, 2026
@cigamit cigamit added the documentation Improvements or additions to documentation label Sep 13, 2026
cigamit
cigamit previously approved these changes Sep 13, 2026
`ascenderkit/cli/sphinx.py` ships inside the package and imports `docutils` and
`sphinxcontrib.autoprogram`, neither of which is a declared dependency or an
extra. Installing the package and importing that module fails:

    File ".../ascenderkit/cli/sphinx.py", line 3, in <module>
        from docutils.nodes import Text, paragraph
    ModuleNotFoundError: No module named 'docutils'

The requirement was recorded in prose instead. `ascenderkit/cli/docs/README.md`
told you to `pip install sphinx sphinxcontrib-autoprogram` by hand, which works
until the list changes and the sentence does not.

Adds a `docs` extra with `sphinx`, `sphinxcontrib-autoprogram` and `docutils`,
and points the README at `pip install -e ".[docs]"`. `docutils` is listed
explicitly even though sphinx pulls it in, for the same reason `urllib3` is
listed among the dependencies: the code imports it by name, so it should not
depend on arriving as somebody else's transitive.

Checked both directions: `import ascenderkit.cli.sphinx` raises
`ModuleNotFoundError` from a clean install of the wheel, and after
`pip install ".[docs]"` it gets past every import and reaches its own runtime
requirement, "Please specify a valid CONTROLLER_HOST for a real (running)
installation", which is the extension asking for a live server rather than a
missing module.

The extra goes in `[project.optional-dependencies]` rather than setup.py's
`extras_require`, since ctrliq#37 moved the others across and landed first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation Needs Triage

Development

Successfully merging this pull request may close these issues.

3 participants