Skip to content

Start testing for documentation building#217

Merged
rprospero merged 17 commits into
masterfrom
test_docs_on_ci
Jul 16, 2026
Merged

Start testing for documentation building#217
rprospero merged 17 commits into
masterfrom
test_docs_on_ci

Conversation

@rprospero

@rprospero rprospero commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

The goal for this PR is to resolve #214 and both fix the warnings with the building of the docs and ensure via the CI that the warnings do not return.

The following changes are included in this PR:

  1. Hatch sphinx is configured to convert warnings into errors. As intended, this causes the CI to reject pull requests where the documentation produces warnings. The remaining changes involve fixing the existing warnings.
  2. Hatch now also uses scipy and matplotlib so sphinx can resolve references to those libraries
  3. absolute_temperature.py was removed, as it is part of the deprecated Accessor infrastructure and was not used anywhere.
  4. White space issues with the preformatted strings for the edit warnings in si.py and units.py
  5. Whitespace fixes for docstrings in metadata.py, manipulations.py, binning.py,
  6. Issues with the interplay between sphinx formatting and LaTeX formatting were handled in averaging.py and model_requirements.py. Specifically, sphinx use pipes for keyword substitution while LaTeX uses it for absolute value. Similarly, sphinx uses underscores for hyperlinking while LaTeX uses it for subscripts. I escaped the control characters for sphinx and they should be passed cleanly on to LaTeX, but this is the part of this PR that I'm the least happy with
  7. We make references to the File Converter, Image Viewer, and SANS Calculator in SasData, but those tools are part of SasView. Lines 36-46 of conf.py explicitly ignore error messages when these cannot be found.
  8. When a class contains a member named type, Sphinx seems to have trouble figuring out which class to reference (or whether to reference the builtin function type). Lines 48-54 of conf.py simplify sphinx's resolver so that it doesn't get confused about references to type. I'm also particularly happy about this solution, but it was the only method I could find short of renaming every class member and breaking the readers in SasView.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

The accessors framework is no longer present, so we don't need an absolute_temperature accessor
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

Lines aren't supposed to have unexpected indentation
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@rprospero
rprospero requested a review from llimeht July 13, 2026 14:29
Comment thread sasdata/data_util/averaging.py Outdated
"""
Calculate I(|Q|) by circularly averaging 2D data between 2 radial limits.
r"""
Calculate I($|Q|$) by circularly averaging 2D data between 2 radial limits.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this one be $I(|Q|)$?

Comment thread sasdata/quantities/si.py



DDDDDDDDDDDDD NNNNNNNN NNNNNNNN tttt

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised to see changes in this file - isn't it autogenerated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. On the refactor branch, I've reworked everything so that si.py and units.py don't need to be autogenerated, but I forget that that hadn't been ported over to master. I've made the appropriate changes to _autogen_warning.py and then regenerated si.py and units.py




DDDDDDDDDDDDD NNNNNNNN NNNNNNNN tttt

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly this file - are these changes expected, isn't this file autogenerated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, see above.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our agent can fix these. Install it.

No quality gates enabled for this code.

Quality Gate Profile: Custom Configuration
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@rprospero
rprospero merged commit 0c4f63f into master Jul 16, 2026
15 of 16 checks passed
@rprospero
rprospero deleted the test_docs_on_ci branch July 16, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Errors and warnings in when building documentation

2 participants