Skip to content

Refactor read modules#459

Merged
OnnoEbbens merged 23 commits intodevfrom
refactor_read_modules
Jun 16, 2025
Merged

Refactor read modules#459
OnnoEbbens merged 23 commits intodevfrom
refactor_read_modules

Conversation

@OnnoEbbens
Copy link
Collaborator

As discussed here: #47

refactor all get_.. functions in the read modules to:

  • download_..
  • optionally:
    • discretize_..
    • get_..

@OnnoEbbens
Copy link
Collaborator Author

OnnoEbbens commented May 8, 2025

@dbrakenhoff: this is a first attempt and not finished. I mainly created the PR to have a first idea on how the refactoring turns out. I won't work in this the coming weeks so feel free to add to this PR if you want.

@OnnoEbbens
Copy link
Collaborator Author

The aim of this PR is to make a more clear distinction in functions for downloading and discretization.

  1. Functions that download data start with: download_..
  2. Functions to discretize data spatially and temporally start with: discretize_..
  3. Functions that do both, start with: get_..

I implemented this for a few read modules already, a good example is the ahn module.

A lot of functions in the read modules will be renamed in this PR. @rubencalje, @bdestombe, @dbrakenhoff could you check if you agree with the new setup? Then I will finish it for all read modules soon.

More info in this issue: #47

Copy link
Collaborator

@dbrakenhoff dbrakenhoff left a comment

Choose a reason for hiding this comment

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

Some minor (nitpicky) comments here and there, but otherwise looks really nice. I think this is much clearer, and helps separating (down)loading data from converting it to model input.

Some function names get a bit longer unfortunately, but that's the price of clarity I think, and we have auto-complete for that :).

@github-project-automation github-project-automation bot moved this from Todo to In Progress in NHFLO Jun 12, 2025
@OnnoEbbens OnnoEbbens merged commit 0abbae2 into dev Jun 16, 2025
3 of 4 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in NHFLO Jun 16, 2025
@OnnoEbbens OnnoEbbens deleted the refactor_read_modules branch June 16, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants