Ingenjorsarbete-For-Klimatet / ifk-smhi

SMHI climate data client.
https://ingenjorsarbeteforklimatet.se/ifk-smhi/
MIT License
8 stars 1 forks source link

Metobs integration test hard-codes date #45

Closed docNord closed 1 year ago

docNord commented 1 year ago

In the Metobs integration test, the date range is explicitly hard-coded when downloading data from Karesuando (the header when reading corrected-archive, which is compared using string comparison, is changed in the data file monthly), causing a monthly recurring bug.

@mgcth can you have a look at this?

mgcth commented 1 year ago

Great that you found it!

mgcth commented 1 year ago

Writing here for documentation, but see #43, too.

@docNord, for tests to pass, we could have a {{ date }} key in the head string and do

head = head.replace("{{ date }}", datetime.date.today().strftime("%Y-%m") + "-01")