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

Silently create test_cache if it does not exist #578

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

Casper-Guo
Copy link
Contributor

If you are running tests locally and the test_cache directory hasn't been created before, enable_cache throws the following error:

NotADirectoryError: Cache directory does not exist! Please check for typos or create it first.

This is counter-intuitive as most contributors would have a cache enabled somewhere already.

Opening the PR to propose that this be handled silently (or with log output). The specific cache location might need to be changed to be consistent with the general fastf1 cache

@theOehrly
Copy link
Owner

I think it is fine to just create this local directory. So no need to use a different location for it.

But should we also add the "test_cache" folder to the .gitignore then? Else people might accidentally commit data from it.

@Casper-Guo
Copy link
Contributor Author

.gitignore ignores all directories ending in "cache" so this is already covered

@theOehrly
Copy link
Owner

Oh right, then this looks good.

@theOehrly theOehrly merged commit 719c321 into theOehrly:master Apr 29, 2024
9 of 10 checks passed
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