-
Notifications
You must be signed in to change notification settings - Fork 4
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
PiMixin: Enable support for ignoring provided forecast dates #1656
base: master
Are you sure you want to change the base?
Conversation
workflows: add work flow based on the gitlab ci workflow
Use the correct workflow status badge in the README.md.
Provide some information on the migration from gitlab to github and how to update the git remote url.
Update readme
Update the autogenereted versioneer.py and _version.py files with the latest versioneer package. This makes versioneer compatible with python 3.12.
Remove the upper limit on numpy and scipy versions. The older versions are no longer compatible with python 3.12.
Fix string-to-datetime/float conversions in loading csv files for latest numpy version. With the latest numpy.genfromtxt, strings are not always passed to converters in byte format but sometimes in plain text format.
Fix the except clause when model transferring a model failed due to an incompatible cache file. Raise the error only when no cache file was used.
Use -999 instead of nan when missing values are indicated by -999.
Include tests using python 3.12.
Move the cross reference just above the section name, instead of in the middle of the section. Sphinx expects references to be just above sections/figures/tables.
Update install instructions for Python 3.12. Installing rtc-tools with Python 3.12 requires installation of setuptools.
Use np.genfromtxt instead of np.recfromcsv, since the latter is deprecated.
Remove the deprecated function get_html_theme_path.
Upgrade for python 3 12
Remove gitlab CI/CD yaml file, since the repository has moved to github.
Replace gitlab references with github references where applicable.
Replace gitlab with github reference for downloading examples.
fix: Typo in examples
Remove gitlab references
An exception is raised if forecast dates were provided and they are not all equal. This option allows users to ignore provided forecast dates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option is basically equivalent to preprocessing xml files by removing all forecast_date elements. I would suggest to rename the option as ignore_forecast_date.
My main concern is if this is the correct place to apply preprocessing on xml files. Unfortunately, I don't know if there are alternative ways to achieve this through fews, fews-io, or some other library.
@@ -44,6 +44,9 @@ class PIMixin(IOMixin): | |||
#: Check consistency of timeseries | |||
pi_validate_timeseries = True | |||
|
|||
#: Read forecast date from timeseries_import | |||
pi_read_forecast_date = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also describe this var in the class docstring.
@@ -101,6 +105,7 @@ def read(self): | |||
self.timeseries_export_basename, | |||
binary=self.pi_binary_timeseries, | |||
pi_validate_times=False, | |||
pi_read_forecast_date=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we use self.pi_read_forecast_date here as well?
@@ -41,6 +41,9 @@ class PIMixin(IOMixin): | |||
#: Check consistency of timeseries | |||
pi_validate_timeseries = True | |||
|
|||
#: Read forecast date from timeseries_import | |||
pi_read_forecast_date = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please describe this var in the class docstring.
@@ -103,6 +107,7 @@ def read(self): | |||
self.timeseries_export_basename, | |||
binary=self.pi_binary_timeseries, | |||
pi_validate_times=False, | |||
pi_read_forecast_date=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we use here self.pi_read_forecast_date as well?
Hi @jackvreeken Could you please review this PR? |
03367be
to
240ff5d
Compare
An exception is raised if forecast dates were provided and they are not all equal. This option allows users to ignore provided forecast dates.