Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make _find_input_files public #1618

Closed
wants to merge 2 commits into from

Conversation

znicholls
Copy link

@znicholls znicholls commented Jun 6, 2022

Description

Makes _find_input_files public. This is a super useful function and would be great if it was part of the 'public API' or at least well-documented and explicitly tested so that it can be used with confidence in other parts of the package (my particular interest is for #1572).

Link to documentation:


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.


To help with the number pull requests:

@znicholls
Copy link
Author

@sloosvel and @valeriupredoi it looks like you are the right ones to ask about this from my very basic git blame investigation. I just wanted to ask for your thoughts on a) the docstrings (suggestions of how to describe the variable argument would be super helpful) and b) how to test this, should I just basically copy tests/integration/test_data_finder.py::test_get_input_filelist, adapt for this slightly lower level function and then add other tests for my specific use cases?

@sloosvel
Copy link
Contributor

sloosvel commented Jun 7, 2022

I'm very sorry but I don't think I will be able to take a look at this right now, as I will be focusing on the PR that are open for the release!

@znicholls
Copy link
Author

Totally fine, this should definitely wait until after the release

@bouweandela
Copy link
Member

bouweandela commented Jun 7, 2022

@znicholls I'm also trying to add a nicer version of this to the public API, but it's still work in progress: #1609.

@znicholls
Copy link
Author

znicholls commented Jun 7, 2022 via email

@valeriupredoi
Copy link
Contributor

valeriupredoi commented Jun 17, 2022

@znicholls - cheers for this! Sorry for the radio silence, I just got back from holidays. I like the idea of making this public and importable/usable in the API - but I think we should have this integrated in a broader functionality e.g. a dry-run that tells the user how/where files are found, and if the files that are found are sufficient for a run etc, also optionally to have CMOR checks done on the data found, and logging issues found from there. By all means, this is a good start for that but I'd like to hear what @bouweandela thinks wrt #1609 before I come back here with more than thoughts&prayers 😁

@znicholls
Copy link
Author

@valeriupredoi all good, let's wait and see where #1609 lands before coming back to this. The dry run idea sounds awesome!

@znicholls
Copy link
Author

(Feel free to close if you don't like having draft PRs floating around)

@zklaus
Copy link

zklaus commented Jun 17, 2022

I for one love having draft PRs floating around. More if they have an (aspirational) milestone assigned.

@valeriupredoi
Copy link
Contributor

absolutely, me too! Draft is a word I like too (eg draft beer 🍺 )

@bouweandela
Copy link
Member

would be good to have a rough expected timeline for #1609

I will try really hard to get that into the next release. It is kind of working now, but there are still about 100 broken tests that need careful inspection and if necessary an update. And then it needs to be reviewed of course..

@valeriupredoi
Copy link
Contributor

can help! Test fixing and/or reviewing, lemme know 🍺

@bouweandela
Copy link
Member

#1609 grew into a very big change, so I'm breaking it up into smaller bits. Here is a pull request that adds the data finder functions to the public API: #1835

@bouweandela
Copy link
Member

This is now available as the function esmvalcore.local.find_files.

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.

5 participants