Please check if your PR fulfills the following requirements:
[X] Tests for the changes have been added (for bug fixes / features)
[X] Docs have been reviewed and added / updated if needed (for bug fixes / features)
Some docs updates need to be made in the COAsT-site repo, in a separate PR. See contributing to documentation for details.
[ ] Build (./build.sh) was run locally and no errors reported. NB not sure about this requirement: GitActions test this
[X] Lint (pylint .) has passed locally and any fixes were made for failures. NB not sure about this requirement: GitActions test this with black
Pull request type
Please check the type of change your PR introduces:
[X] Bugfix
[X] Feature
[X] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Documentation content changes
[ ] Other (please describe):
What is the current behavior?
Some lint problems, deprec functions and not-standard Tidegauge objects
What is the new behavior?
I made the following changes in the code:
Standardized tide gauge objects (gesla, HLW, BODC) by ensuring consistent dimensions, coordinates, variables, and attributes. Renamed id_station to site_name and added the ssh variable. This is the standard:
Optimized methods in HLW, removing unnecessary loops in file opening.
There's an issue converting datetime from Europe/London to UTC because certain datetimes, like "25/10/2020 01:18," can be ambiguous (BST or not). While you previously encountered this with pytz without noticing, using pandas now highlights this ambiguity. I employed the pytz convention treating ambiguous datetimes as BST, but I'm uncertain if this is the optimal solution.
Updated tests, ensuring all pass successfully.
Revised notebooks and added an example in tidegauge validation on opening BODC files.
Flagged the deprecated method read_gesla_v3 and the class Process_data with a deprecation decorator. Updated the class name to camel case ("ProcessData").
Corrected linting issues in the code.
Checklist
[ ] Code compiles correctly
[ ] Created tests which fail without the change (if possible)
@jpolton , could you please take a look if everything is okay? Please see the comments that I included in the new behavior section of the first comment.
Pull request checklist
Please check if your PR fulfills the following requirements:
COAsT-site
repo, in a separate PR. See contributing to documentation for details../build.sh
) was run locally and no errors reported. NB not sure about this requirement: GitActions test thispylint .
) has passed locally and any fixes were made for failures. NB not sure about this requirement: GitActions test this withblack
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Some lint problems, deprec functions and not-standard Tidegauge objects
What is the new behavior?
I made the following changes in the code:
Optimized methods in HLW, removing unnecessary loops in file opening.
There's an issue converting datetime from Europe/London to UTC because certain datetimes, like "25/10/2020 01:18," can be ambiguous (BST or not). While you previously encountered this with pytz without noticing, using pandas now highlights this ambiguity. I employed the pytz convention treating ambiguous datetimes as BST, but I'm uncertain if this is the optimal solution.
Updated tests, ensuring all pass successfully.
Revised notebooks and added an example in tidegauge validation on opening BODC files.
Flagged the deprecated method
read_gesla_v3
and the classProcess_data
with a deprecation decorator. Updated the class name to camel case ("ProcessData").Corrected linting issues in the code.
Checklist
pip install . && pytest unit_testing/unit_test.py -s
)Does this introduce a breaking change?
Other information