-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate_metadata.py
30 lines (22 loc) · 1.24 KB
/
generate_metadata.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
Running this will parse all excel files into bundles output into the folder: 'projects/{project_uuid}/bundle'.
This is currently set to loop over two sets of excel files.
One is the set of 6 original project excel files in "data". These have project_0.json and cell_suspension_0.json
files included that were downloaded from dss prod to check against.
The second is the set of 71 raw excel files with no comparison in the dss yet (these need to be checked). These
also have slightly different formatting (all seem to be missing a "funders" section... and a few are missing the
"publications" section).
Editing 'upload=False' to 'upload=True' with upload to dss dev if you are credentialed to do so.
Otherwise it will just parse the excel files and generate all of the matrix and json files necessary for upload.
"""
from copy_static_project import populate_all_static_projects
from create_project import (
run,
)
from util import get_target_spreadsheets
xlsxs = get_target_spreadsheets().values()
for i, xlsx in enumerate(xlsxs):
print(f'\n% Progress: {i + 1}/{len(xlsxs)} projects ({xlsx.name}).\n'
f'===========================================================')
run(xlsx=str(xlsx))
populate_all_static_projects(file_pattern='*.json')