Skip to content

Check WDPA url also a month forward#811

Merged
fneum merged 7 commits intomasterfrom
fix/retrieve-wdpa
Dec 29, 2023
Merged

Check WDPA url also a month forward#811
fneum merged 7 commits intomasterfrom
fix/retrieve-wdpa

Conversation

@euronion
Copy link
Copy Markdown
Contributor

Closes #807

Changes proposed in this Pull Request

Checklist

  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in all of config.default.yaml.
  • Changes in configuration options are also documented in doc/configtables/*.csv.
  • A release note doc/release_notes.rst is added.

@euronion
Copy link
Copy Markdown
Contributor Author

@ekatef FYI :)

@euronion euronion enabled auto-merge (squash) December 21, 2023 17:41
@euronion
Copy link
Copy Markdown
Contributor Author

I believe the windows failure is due to an issue with progressbar. There was a recently released bugfix which is not yet in our cached environment.... It should be fixed next year by rerunning the windows CI

next_monthyear = (datetime.now() + timedelta(30)).strftime("%b%Y")

# Test prioritised: current month -> previous -> next
for bYYYY in [current_monthyear, prev_monthyear, next_monthyear]:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on the same note, if config["enable"]["retrieve"] is false, then bYYYY doesnt exist in add_electricity.smk maybe we can add the same code there ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

Generally, the downloaded file should drop the month in the filename. This is because otherwise, a new month would trigger the whole workflow to re-execute and invalidate all existing (intermediate) results.

I will prepare a separate pull request.

@fneum fneum disabled auto-merge December 29, 2023 09:46
@fneum fneum merged commit 40b7cc1 into master Dec 29, 2023
@fneum fneum deleted the fix/retrieve-wdpa branch December 29, 2023 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants