-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: large refactoring #303
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
6b492cb
to
e44e455
Compare
Report
Test results
|
5827e23
to
6e25f0c
Compare
pre-commit.ci autofix |
7170579
to
100fae0
Compare
The goal here is to properly expose the public api and hide icclom internals in a ``_core`` package.
Added ruff rules. Added sphinx extensions.
Make use of autodoc to generate dynamically the doc for the generated functions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request to resolve #184
doc/source/references/release_notes.rst
.Describe the changes you made
Goal 1: Add DCSC indices
This pull request add the indices required for DRIAS in a new StandardIndexRegistry
DcscIndexRegistry
.Additionally, a new parameter
offset
has been added toThreshold
class andbuild_threshold
function.This allows to easily compute indices such as count days where tasmax is 5 deg_C above normal :
Todo:
icclim will perform a unit conversion if needed.
The following indices were added:
Goal 2: Refactor to improve maintainability
context: by adding the DCSC indices many issues within the code base were exposed thus this PR includes to improve this situation.
Issues
--> Use of github copilot to help generating those.
--> Use autoapi to generate it once
--> Enable additional ruff rules and add type hints
--> Add a clone method to the relevant classes
extract_icclim_funs
script is far from easy to augment when creating new StandardIndex registries (like the DCSC one)--> refactor the script to ease maintenance of it.
--> Inspired by numpy 2.0
_core
module, segregate the private API inicclim._core
and expose the public API in icclim module