Skip to content

Narrow numpydoc cleanup to correctness-only docstring fixes - #2492

Draft
GernotMaier with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-numpydoc-issues
Draft

Narrow numpydoc cleanup to correctness-only docstring fixes#2492
GernotMaier with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-numpydoc-issues

Conversation

Copilot AI commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Release Candidate

This pull request should be opened from the branch <version>-rc, for example
v0.36.0-rc. It should be the final pull request before the release.

Docstring cleanup is now limited to correctness defects only: parameter/return mismatches and invalid type field formatting. This avoids broad documentation expansion while resolving the high-signal numpydoc failures.

  • Scope of change
    • Parameter/return contract fixes only
      • Added missing Parameters/Returns sections for public version helpers where docs did not match function signatures.
    • Malformed parameter entries corrected
      • Normalized invalid parameter declarations in Simulator docstrings to NumPy style (name : type).
    • No behavioral/code-path change
      • Runtime logic is unchanged; edits are docstring-only.
# before
simulation_software: choices: [sim_telarray, corsika, corsika_sim_telarray]

# after
simulation_software : str

Test-resource generation

This release might require updates to test resources in the simtools-tests repository when
simtools changes the output format or content of generated files.

If test resources must be updated:

  • Define a new test-resource version in the simtools-tests repository.
  • Update its workflow configuration to use the release-candidate simtools-prod image, including the required image variant and tag.
  • Generate the new resources with simtools-resources-test-generate and commit them to simtools-tests.
  • Run unit and integration tests with the new resources using --test_resources_path.

Release Preparation Checklist

  • New test resources are committed to simtools-tests, or no resource update is required.

  • All unit and integration tests pass.

  • The release-candidate pull request is confirmed as the final pull request before the release.

  • All notable changes documented in CHANGELOG.md using towncrier:

    towncrier build --yes --version v0.36.0

    Replace v0.36.0 with the final release version, not the release-candidate version.
    This updates the changelog using the fragments in the docs/changes directory.

  • CHANGELOG.md reviewed and confirmed complete.

  • New version added to docs/_static/switcher.json.

  • CITATION reviewed and updated if necessary.

  • Review requested from the simtools team.

  • Pull request approved and ready to merge to main.

After merging the release-candidate pull request

  • Create and push a release-candidate tag, for example v0.36.0-rc1.
  • Create the corresponding GitHub release and mark it as a pre-release. The build-simtools-prod workflow is
    configured for both candidate-tag pushes and published releases; verify the expected image before generating
    test resources.

Copilot AI linked an issue Aug 31, 2026 that may be closed by this pull request
Co-authored-by: GernotMaier <14001688+GernotMaier@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix numpydoc issues in documentation Narrow numpydoc cleanup to correctness-only docstring fixes Aug 31, 2026
Copilot AI requested a review from GernotMaier August 31, 2026 17:50
@GernotMaier
GernotMaier requested a lite review from Copilot August 31, 2026 18:00

Copilot AI left a comment

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.

Pull request overview

This PR narrows the numpydoc cleanup effort to correctness-only docstring fixes, focusing on aligning public docstrings with function signatures and NumPy-style parameter formatting without changing runtime behavior.

Changes:

  • Added missing Parameters/Returns sections for public version helpers in src/simtools/version.py.
  • Normalized malformed parameter declarations in Simulator docstrings to NumPy style (name : type) in src/simtools/simulator.py.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/simtools/version.py Adds/expands docstring sections to match helper function parameter/return contracts for version validation utilities.
src/simtools/simulator.py Fixes malformed parameter type declarations in docstrings; still needs minor docstring correctness tweaks for accepted values/types.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/simtools/simulator.py
Comment on lines +107 to 109
simulation_software : str
implemented are sim_telarray and CORSIKA or corsika_sim_telarray
(running CORSIKA and piping it directly to sim_telarray)
Comment thread src/simtools/simulator.py
Comment on lines +671 to 672
directory_for_grid_upload : str
Directory for the output files.
@ctao-sonarqube

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

numpydoc issues

3 participants