-
Notifications
You must be signed in to change notification settings - Fork 3
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
[WIP] Refactor software: step 1 #26
Conversation
This is a complete refactoring of routines. This is limited to relocating functions in appropriate sub-modules. This is NOT changing functions behavior (except for a few, missing the config dict to look for files).
Codecov Report
@@ Coverage Diff @@
## master #26 +/- ##
==========================================
- Coverage 91.38% 87.99% -3.40%
==========================================
Files 65 12 -53
Lines 3145 1957 -1188
==========================================
- Hits 2874 1722 -1152
+ Misses 271 235 -36
Continue to review full report at Codecov.
|
And also fixing these l#!!%$#%# path creation with "+" instead of a proper os.path.sep
also moved sel_calseries to configuration.py
I think "calc_piecewisefit" should also go into the calibration.py module |
Apart from the above suggested changes, this looks good to me |
About Refactoring
Refactoring the software can be done in 2 steps:
This PR is a proposition for step 1: a new structure of the library where functions are now organized into sub-modules.
New positioning of functions
Note that functions name are not changed !
pyowc/core
pyowc/data
pyowc/plot
pyowc/calibration.py: update_salinity_mapping, calc_piecewisefit
pyowc/configuration.py: load_configuration, set_calseries, print_cfg
pyowc/tests # Contain all the unit tests !
pyowc/utilities.py: change_dates, cal2dec, potential_vorticity, wrap_longitudes, sorter, spatial_correlation
Usage
With this structure, we have a more elegant:
Remains to be done