py-ewr 2.2.7__py3-none-any.whl → 2.2.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
py_ewr/evaluate_EWRs.py CHANGED
@@ -448,8 +448,9 @@ def get_index_date(date_index:Any)-> datetime.date:
448
448
  if type(date_index) == pd._libs.tslibs.period.Period:
449
449
  date_index_str = date_index.strftime('%Y-%m-%d')
450
450
  # For dates between the years 100 and 999 we need to add a 0 onto the date string so strptime doesnt break
451
- if ((int(date_index_str.split('-')[0]) >= 100) and (int(date_index_str.split('-')[0]) < 1000)):
452
- date_index_str = '0' + date_index_str
451
+ if len(date_index_str.split('-')[0]) < 4:
452
+ if ((int(date_index_str.split('-')[0]) >= 100) and (int(date_index_str.split('-')[0]) < 1000)):
453
+ date_index_str = '0' + date_index_str
453
454
  n = datetime.datetime.strptime(date_index_str, '%Y-%m-%d').date()
454
455
  return n
455
456
  if type(date_index) == str:
@@ -5171,4 +5172,4 @@ def calc_sorter(df_F:pd.DataFrame, df_L:pd.DataFrame, gauge:str, EWR_table:pd.Da
5171
5172
  location_results[PU_name] = PU_df
5172
5173
  location_events[PU_name] = PU_events
5173
5174
 
5174
- return location_results, location_events
5175
+ return location_results, location_events
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py_ewr
3
- Version: 2.2.7
3
+ Version: 2.2.9
4
4
  Summary: Environmental Water Requirement calculator
5
5
  Home-page: https://github.com/MDBAuth/EWR_tool
6
6
  Author: Martin Job
@@ -34,7 +34,7 @@ Requires-Dist: numpy <2
34
34
  [![PyPI](https://img.shields.io/pypi/v/py-ewr)](https://pypi.org/project/py-ewr/)
35
35
  [![DOI](https://zenodo.org/badge/342122359.svg)](https://zenodo.org/badge/latestdoi/342122359)
36
36
 
37
- ### **EWR tool version 2.2.7 README**
37
+ ### **EWR tool version 2.2.9 README**
38
38
 
39
39
  ### **Notes on recent version updates**
40
40
  - Including draft objective mapping files in the package (see below sub heading **Objective mapping** for more information). Objective mapping has been therefore pulled out of the parameter sheet
@@ -1,6 +1,6 @@
1
1
  py_ewr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  py_ewr/data_inputs.py,sha256=OLIxqq15yoEqLSRmBJP37erldUGRRvSNn2XwO8LKZA8,20080
3
- py_ewr/evaluate_EWRs.py,sha256=ahdcc6N37wc-e6-S6JSx6VFm9eNkef0JBPXz16-SAaU,231267
3
+ py_ewr/evaluate_EWRs.py,sha256=bAhFZTQZkoAE2eKgNIomm1LJdZ2HihoygUnXybtEdm4,231326
4
4
  py_ewr/io.py,sha256=Is0xPAzLx6-ylpTFyYJxMimkNVxxoTxUcknTk6bQbgs,840
5
5
  py_ewr/observed_handling.py,sha256=aVQYI8Qs-v5DZOA_r8bYluE3ilgM7Vjygs29jA6kpaA,17848
6
6
  py_ewr/scenario_handling.py,sha256=95HdNNPkY-w77hxnHRJxfzmn9fBu6OqHM5iyoQPwOXE,35498
@@ -13,8 +13,8 @@ py_ewr/parameter_metadata/ewr_calc_config.json,sha256=l1AgIRlf7UUmk3BNQ4r3kutU48
13
13
  py_ewr/parameter_metadata/obj2target.csv,sha256=DIcwrOyvNPhBdvplWb8GU-2Hu33NwYhrXenAbnRD-dM,1773425
14
14
  py_ewr/parameter_metadata/obj2yrtarget.csv,sha256=x-lvGTHMsXutSKfgN6_B0ujQueiu953lEk-_k8ybTNw,56681
15
15
  py_ewr/parameter_metadata/parameter_sheet.csv,sha256=Pm741CUDywFJ_Jd8LN41YcimKvne-ey-gJskI13wTIk,772287
16
- py_ewr-2.2.7.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
17
- py_ewr-2.2.7.dist-info/METADATA,sha256=yNiDURx97CzSTLq5BIHTYYv-Z4-j-RwdDSX_IJe9460,12521
18
- py_ewr-2.2.7.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
19
- py_ewr-2.2.7.dist-info/top_level.txt,sha256=n3725d-64Cjyb-YMUMV64UAuIflzUh2_UZSxiIbrur4,7
20
- py_ewr-2.2.7.dist-info/RECORD,,
16
+ py_ewr-2.2.9.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
17
+ py_ewr-2.2.9.dist-info/METADATA,sha256=tCty8mRuqb3xrgURdtZXlOpyaeu5CkL_-2I34lPlCSA,12521
18
+ py_ewr-2.2.9.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
19
+ py_ewr-2.2.9.dist-info/top_level.txt,sha256=n3725d-64Cjyb-YMUMV64UAuIflzUh2_UZSxiIbrur4,7
20
+ py_ewr-2.2.9.dist-info/RECORD,,
File without changes