This repo provides automated edits for miscellaneous tasks maintaining data repositories. The editor is expected to perform edits in the following sequence:
- Auto generate directory structures:
- If
code
,data
, ordocs
folder is found, look in it for adistribution
folder - If the
distribution
folder underneathcode
,data
, ordocs
is empty, auto generates an emptytemp
file
- If
- Create a placeholder
measure_info.json
files:- Loop through each
**/distribution/
. If a*.csv.xz
is found, but ameasure_info.json
was not found in the same directory, create an empty placeholdermeasure_info_temp.json
- If a
measure_info.json
is found but is empty, rename it tomeasure_info_temp.json
- Loop through each
- Update existing
measure_info.json
files:- Search for
*.csv.xz
in the same directory, and check for a string match of the measure and the file name. If there is a match, appends the new elements into themeasure_info.json
- Checks the
measure_info_template.json
, if there are elements that do not have required keys, appends those keys with values equal to''
. Actual measures that need to be modified will be shown in the downstream tests
- Search for
- Remove all non-required columns:
- Iterate through each data file and strip all extra data to export to the public repositories
- Creates a
manifest.json
:- Creates or overrides a
manifest.json
at the root directory with the: hash, file size (bytes), and file path of each file by looping through all folders that match**/distribution/
- Creates or overrides a