Skip to content

Commit caa1467

Browse files
committed
Update readme with more info
1 parent 3d351cd commit caa1467

File tree

2 files changed

+40
-29
lines changed

2 files changed

+40
-29
lines changed

libraries/client/README.md

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,56 @@
22

33
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.
44

5-
0) A GitHub access token must be created so scripts using the python `github` package can be run.
5+
## Requirement
66

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.
810

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+
```
1019

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/`
1521

16-
Contents of these caches will be saved in JSON files in `cached_info/`
22+
## Step by step guide to the individual caches
1723

18-
2) Check/update OSBv1 projects
24+
### 1) Checking/updating OSBv1 projects
1925

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):
2127

22-
```
23-
python osbv1_info.py
24-
```
28+
```
29+
python osbv1_info.py
30+
```
2531

26-
It saves the list to `cached_info/projects_v1.json`.
32+
It saves the list to `cached_info/projects_v1.json`.
2733

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:
2935

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+
```
3339

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:
3541

36-
```
37-
python loadosbv1.py abcxxx123 -v2dev # add new repos
42+
```
43+
python loadosbv1.py abcxxx123 -v2dev # add new repos
3844
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+
```
4147

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...).
4349

44-
3) Check/update the cached info for OSB projects on GitHub
50+
### 2) Checking/updating the cached info for OSB projects on GitHub
4551

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.
4753

48-
```
49-
python osb_gh_info.py
50-
```
54+
```
55+
python osb_gh_info.py
56+
```
5157

libraries/client/info_all.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ ruff check *.py
1414

1515
# Update the cached info for OSBv1
1616
python osbv1_info.py
17+
if [ "$quick" == 0 ]; then
18+
echo "Testing OSBv1 loading on v2dev..."
19+
python loadosbv1.py -v2dev -dry
20+
fi
1721

1822
# Update the cached info for OSB projects on GitHub
1923
python osb_gh_info.py
@@ -27,6 +31,7 @@ python osb_info.py -v2
2731
if [ "$quick" == 0 ]; then
2832

2933
python loadddandi.py -dry
34+
3035
python biomodels_info.py
3136

3237
python modeldb_info.py

0 commit comments

Comments
 (0)