OCHA-DAP / hdx-signals

HDX Signals
https://un-ocha-centre-for-humanitarian.gitbook.io/hdx-signals/
GNU General Public License v3.0
6 stars 0 forks source link

Create `runs` structure in the codebase #252

Open caldwellst opened 2 weeks ago

caldwellst commented 2 weeks ago

There is currently code that is run in GitHub Actions stored in src. This is probably okay for the new setup in src/indicators/{indicator_id}/__init__.R since we use the module setup properly with if (is.null(box::name())). We also want to have the __tests__ folder next to the indicator code.

But some files don't have any source code that can be used or tested, they are simply scripts to be run. backup_mailchimp.R for instance. check_signals_updates.R in another instance.

I would recommend putting those files instead into a runs folder or something that indicate they are runs to be used in GitHub Actions. Any script in GitHub Actions should call files there. We could then just rename src-static to runs-static, so the split is:

src: all source code and functions that can be imported as modules and used elsewhere runs: regular runs that need to occur, such as backing up Mailchimp, the future #193, and the audience analysis update. runs-static: runs that are only manually run when we think they need updating, a simple renaming of src-static.

Likely, everything that is in repo could now just go in runs or runs-static.