|
2 | 2 |
|
3 | 3 | These scripts can be used to get a cached list of the current repositories on OSBv2 and v2dev, and also keep them up to date with the contents of DANDI, ModelDB, BioModels etc. |
4 | 4 |
|
5 | | -0) A GitHub access token must be created so scripts using the python `github` package can be run. |
| 5 | +## Requirement |
6 | 6 |
|
7 | | - Save in `github.auth` locally. |
| 7 | +A GitHub access token must be created so scripts using the python `github` package can be run. |
| 8 | + |
| 9 | +Save in `github.auth` locally. |
8 | 10 |
|
9 | | -1) Update all current cached lists: |
| 11 | +## Update all current cached lists |
| 12 | + |
| 13 | +Run: |
| 14 | + |
| 15 | +``` |
| 16 | +./info_all.sh -q # Runs a quick check of contents of OSBv1, OSBv2, OSBv2dev, OSB repos on Github & DANDI Archive. |
| 17 | +./info_all.sh # Same as above, but with BioModels & ModelDB |
| 18 | +``` |
10 | 19 |
|
11 | | - ``` |
12 | | - ./info_all.sh -q # Runs a quick check of contents of OSBv1, OSBv2, OSBv2dev, OSB repos on Github & DANDI Archive. |
13 | | - ./info_all.sh # Same as above, but with BioModels & ModelDB |
14 | | - ``` |
| 20 | +Contents of these caches will be saved in JSON files in `cached_info/` |
15 | 21 |
|
16 | | - Contents of these caches will be saved in JSON files in `cached_info/` |
| 22 | +## Step by step guide to the individual caches |
17 | 23 |
|
18 | | -2) Check/update OSBv1 projects |
| 24 | +### 1) Checking/updating OSBv1 projects |
19 | 25 |
|
20 | | - The following command will regenerate the cached list of current OSBv1 projects using the OSBv1 API: |
| 26 | +The following command will regenerate the cached list of current OSBv1 projects using the [OSBv1 API](https://github.com/OpenSourceBrain/OSB_API): |
21 | 27 |
|
22 | | - ``` |
23 | | - python osbv1_info.py |
24 | | - ``` |
| 28 | +``` |
| 29 | +python osbv1_info.py |
| 30 | +``` |
25 | 31 |
|
26 | | - It saves the list to `cached_info/projects_v1.json`. |
| 32 | +It saves the list to `cached_info/projects_v1.json`. |
27 | 33 |
|
28 | | - If there has been a new project created on OSBv1 recently (and so the json cache has changed), which hasn't been added to v2/v2dev, run: |
| 34 | +If there has been a new project created on OSBv1 recently (and so the json cache has changed), which hasn't been added to v2/v2dev, run: |
29 | 35 |
|
30 | | - ``` |
31 | | - python loadosbv1.py -v2dev -dry # this does a dry run and prints info on which projects/repos it still needs to add |
32 | | - ``` |
| 36 | +``` |
| 37 | +python loadosbv1.py -v2dev -dry # this does a dry run and prints info on which projects/repos it still needs to add |
| 38 | +``` |
33 | 39 |
|
34 | | - Get an access token by logging in to http://v2dev.opensourcebrain.org, opening the Web Developer console, loading a page, copying the network access token (e.g. abcxxx123) and using this to add the repo via the api: |
| 40 | +Get an access token by logging in to http://v2dev.opensourcebrain.org, opening the Web Developer console, loading a page, copying the network access token (e.g. abcxxx123) and using this to add the repo via the api: |
35 | 41 |
|
36 | | - ``` |
37 | | - python loadosbv1.py abcxxx123 -v2dev # add new repos |
| 42 | +``` |
| 43 | +python loadosbv1.py abcxxx123 -v2dev # add new repos |
38 | 44 |
|
39 | | - python osb_info.py -v2dev # regenerate cached list of all OSBv2 repos |
40 | | - ``` |
| 45 | +python osb_info.py -v2dev # regenerate cached list of all OSBv2 repos |
| 46 | +``` |
41 | 47 |
|
42 | | - Then do the same using `-v2` instead of for `-v2dev` for the live version of OSBv2. |
| 48 | +Then do the same using `-v2` instead of for `-v2dev` for the live version of OSBv2 (it will be a different access token...). |
43 | 49 |
|
44 | | -3) Check/update the cached info for OSB projects on GitHub |
| 50 | +### 2) Checking/updating the cached info for OSB projects on GitHub |
45 | 51 |
|
46 | | - This will generate a cached list of all repositories under https://github.com/opensourcebrain into `cached_info/osb_gh.json`. Note: most (~2K) of these are forks of ModelDB GitHub repos, many of the rest are repos which were used on OSBv1. |
| 52 | +This will generate a cached list of all repositories under https://github.com/opensourcebrain into `cached_info/osb_gh.json`. Note: most (~2K) of these are forks of ModelDB GitHub repos, many of the rest are repos which were used on OSBv1. |
47 | 53 |
|
48 | | - ``` |
49 | | - python osb_gh_info.py |
50 | | - ``` |
| 54 | +``` |
| 55 | +python osb_gh_info.py |
| 56 | +``` |
51 | 57 |
|
0 commit comments