openmc-dev / data

Collection of scripts for managing data for OpenMC
https://openmc.org/data
MIT License
27 stars 29 forks source link

added url test idea #63

Closed shimwell closed 2 years ago

shimwell commented 2 years ago

This PR is just an idea for CI that could check that the urls we are downloading from still exist.

It makes use of the standard json data that I've been trying to roll out across the download scripts.

The tests/test_urls.py can be run with pytest that could become part of the CI

This doesn't download the large compressed files, it just checks that they exist.

If there is interest then this could be developed to test a few more scripts and I can add the CI github action files needed.

@AnderGray feedback welcome

AnderGray commented 2 years ago

I think simple tests like this would be useful to have. It's also good to have all of the urls in a standard file

shimwell commented 2 years ago

Nice, thanks for taking a look Ander.

Let me go ahead and add the next stage to this PR.

This is still just an idea but I want to show what can be done with Cron jobs in github actions

shimwell commented 2 years ago

Thanks for taking a look earlier @AnderGray

I've added the CI with the cron job.

You can see I've run this action manually once, but hopefully it will automatically run now. https://github.com/shimwell/data/actions

I also added a badge to the Readme, currently the badge is looking at my fork just to allow it to be green but I can change it to this repo if we do decide to develop this idea and merge it in.

shimwell commented 2 years ago

What do you think @paulromano shall I add to this minimal PR to include all the urls in all the release_details dictionaries, then the urls for all the nuclear data sources can be pinged occasionally to check they still exist?

shimwell commented 2 years ago

closing this PR as it has been implemented along with other changes on a fork, which I would be happy to merge in here if we ever want to