Skip to content

Add docstrings for Python helpers to improve hover docs#612

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/improve-doc-with-copilot
Draft

Add docstrings for Python helpers to improve hover docs#612
Copilot wants to merge 3 commits intomasterfrom
copilot/improve-doc-with-copilot

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 3, 2026

Issue: Functions lacked hoverable documentation, making behavior unclear in VS Code.

Changes:

  • Python utilities in Prog/parse_ham_mod.py, Analysis/convert_bins.py, and Analysis/fix-latt.py: Added concise docstrings for parser helpers, MPI dtype/len helpers, and lattice fix routines.
  • Test helpers in testsuite: Documented analysis/compare utilities, config generation helper, and energy fit function; renamed ambiguous loop vars to avoid built-in shadowing and clarify intent.

Example:

def _get_mpi_len(parameter):
    """Return the number of MPI elements that need to be broadcast."""
    if isinstance(parameter, list):
        return _get_mpi_len(parameter[0]) * len(parameter)
    ...
Original prompt

This section details on the original issue you should resolve

<issue_title>Copilot for documentation.</issue_title>
<issue_description>Improve doc with Copilot. </issue_description>

<agent_instructions>Go through the code routine by routine and generate a function wise doc string. I want to hover over the function in my VScode and understand directly what the hell they are doing. Got it man! </agent_instructions>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits March 3, 2026 16:32
Co-authored-by: fassaad <29425753+fassaad@users.noreply.github.com>
Co-authored-by: fassaad <29425753+fassaad@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve documentation with function-wise docstrings Add docstrings for Python helpers to improve hover docs Mar 3, 2026
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.

Copilot for documentation.

2 participants