[Bug] - PRJ PERIODS with year 0000 cannot be parsed
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
The failure happens in the PRJ PERIODS parser before the _process_time(time, yearfirst=False).replace(year=1899) call, so start with _process_time and the code that reads PERIODS entries from the PRJ file. Reproduce with a PERIODS line using year 0000 and confirm the ValueError from datetime. Done means that input parses and produces a year-1899 timestamp, with a test covering it.
Written by the indexing model from the issue text.
Description
The iMOD PRJ parser cannot read valid iMOD PERIODS entries using year 0000.
This raises:
ValueError: year must be in 1..9999, not 0
The parser does replaces period years with 1899 using:
_process_time(time, yearfirst=False).replace(year=1899)
However, parsing fails before this replacement is reached.
Expected behavior:
PERIODS entries with year 0000 should be accepted and normalized to year 1899
- Dominant language
- Python
- Stars
- 41
- Forks
- 11
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 13
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Deltares/imod-python
-
Deltares enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Deltares/imod-python#1843 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Deltares/imod-python#1684 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 Half a day Newbie friendliness 50/100
Deltares/imod-python#1939 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] - Weekly user acceptance test broken because of some missing kotlin configPossibly taken @JoerivanEngelen claimed this 4 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 56/100
Deltares/imod-python#1934 · 1 assignee ·
Maintainers usually reply within 1 day
-
Deltares enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Deltares/imod-python#1927 ·
Maintainers usually reply within 1 day
All issues in Deltares/imod-python
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aws-samples/sample-per-model-bedrock#261 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
pwncollege/dojo#1188 ·
Maintainers usually reply within 1 day
-
bug launcher packaging
Difficulty 1/5 Under an hour Newbie friendliness 88/100
tenstorrent/tt-studio#1426 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
python-attrs/cattrs#796 ·
Maintainers usually reply within 1 day