Skip to content

[DOC] migrate nhits and quantile docstrings to numpydocstyle#2111

Merged
phoeenniixx merged 2 commits intosktime:mainfrom
amruth6002:docs/numpydocstyle-migration
Mar 10, 2026
Merged

[DOC] migrate nhits and quantile docstrings to numpydocstyle#2111
phoeenniixx merged 2 commits intosktime:mainfrom
amruth6002:docs/numpydocstyle-migration

Conversation

@amruth6002
Copy link
Contributor

@amruth6002 amruth6002 commented Feb 28, 2026

Reference Issues/PRs

Addresses #2066 (partially, for N-HiTS and Quantile metrics).

What does this implement/fix? Explain your changes.

This PR migrates the docstrings in the following files from Google style to numpydocstyle as part of the broader documentation standardization effort:

  • pytorch_forecasting/models/nhits/_nhits.py
  • pytorch_forecasting/metrics/quantile.py

Changes made include updating Args: to Parameters, Returns: to Returns, and adopting the correct NumPy docstring formatting (e.g., adding ---------- dividers and proper indentation) as per the issue requirements.

Did you add any tests for the change?

  • No, but I ran the pre-commit hooks locally (ruff format, ruff check, etc.) and all files passed the styling requirements.

Any other comments?

PR checklist

  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI, test framework, [ENH] - adding or improving code, [DOC] - writing or improving documentation or docstrings.
  • Added/modified tests
  • Used pre-commit hooks when committing to ensure that code is compliant with hooks. Install hooks with pre-commit install.
    To run hooks independent of commit, execute pre-commit run --all-files

@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@602ee15). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2111   +/-   ##
=======================================
  Coverage        ?   86.63%           
=======================================
  Files           ?      165           
  Lines           ?     9732           
  Branches        ?        0           
=======================================
  Hits            ?     8431           
  Misses          ?     1301           
  Partials        ?        0           
Flag Coverage Δ
cpu 86.63% <ø> (?)
pytest 86.63% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

:py:class:`~pytorch_forecasting.data.timeseries.TimeSeriesDataSet`.
Parameters
----------
x : dict of {str : torch.Tensor}
Copy link
Member

Choose a reason for hiding this comment

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

should it be Dict[str, torch.Tensor]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the numpydocstyle standard for dictionaries is technically dict of {key_type: value_type}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but if we need to change it to square bracket i will do it, should i?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i changed it could you please review.

@phoeenniixx phoeenniixx changed the title docs: migrate nhits and quantile docstrings to numpydocstyle [DOC] migrate nhits and quantile docstrings to numpydocstyle Mar 1, 2026
@phoeenniixx phoeenniixx added the documentation Improvements or additions to documentation label Mar 1, 2026
@amruth6002 amruth6002 requested a review from phoeenniixx March 1, 2026 17:50
Copy link
Member

@phoeenniixx phoeenniixx left a comment

Choose a reason for hiding this comment

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

Thanks

@phoeenniixx phoeenniixx merged commit 593f3b0 into sktime:main Mar 10, 2026
36 checks passed
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants