Skip to content

Commit dde632e

Browse files
authored
Add diagrams for missing functions (#117)
* doc: flowchart documentation * doc: flowchart biotools * doc: upd flowchart citation * doc: flowchart name * doc: flowchart name opposite * doc: flowchart version * chore: remove todos
1 parent 042feab commit dde632e

File tree

7 files changed

+293
-8
lines changed

7 files changed

+293
-8
lines changed

docs/source/api_reference/_process_diagrams/bt2gh/citation.mmd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,16 @@ flowchart LR
4848
subgraph loop through bio.tools publications
4949
loop --> composing[["REF composing<br/>fetch publication metadata (EuropePMCIngestor) and transform (EuropePMCTransformer) to Publication"]]:::ref
5050
composing --> compose_ok{is composing successful?}
51-
compose_ok -->|no| loop
51+
compose_ok -->|no| check_done_loop{checked all bio.tools publications?}
5252
compose_ok -->|yes| is_preferred{is the bio.tools publication Primary?}
5353
is_preferred -->|no| add[append extracted publication to the publications list]
54-
add --> loop
54+
add --> check_done_loop
55+
check_done_loop -->|no| loop
5556
is_preferred -->|yes| add_preferred[append extracted publication to the primary publications list]
5657
add_preferred --> add
5758
end
5859

59-
loop --> combine[["combine and deduplicate the list of (extracted) bio.tools publications and the list of GitHub publications from cff"]]
60+
check_done_loop -->|yes| combine[["combine and deduplicate the list of (extracted) bio.tools publications and the list of GitHub publications from cff"]]
6061

6162
combine --> compose_base[["compose base top-level cff content from basic bio.tools metadata"]]
6263
compose_base --> keep_existing["keep existing non-empty values from cff"]
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
config:
3+
theme: base
4+
look: neo
5+
layout: elk
6+
elk:
7+
nodePlacementStrategy: NETWORK_SIMPLEX
8+
themeVariables:
9+
darkMode: true
10+
background: "#121212"
11+
primaryColor: "#005a7a"
12+
primaryBorderColor: "#121212"
13+
secondaryBorderColor: "#121212"
14+
edgeLabelBackground: transparent
15+
labelTextColor: "#5DD3FC"
16+
clusterBkg: transparent
17+
clusterBorder: "#5DD3FC"
18+
noteBkgColor: "#F47D22"
19+
noteBorderColor: "#F47D22"
20+
noteTextColor: "#fff"
21+
---
22+
flowchart LR
23+
classDef ref fill:#F47D22
24+
classDef notestyle fill:#F47D22
25+
classDef notestyle stroke:#F47D22
26+
classDef terminal fill:#1099c9
27+
classDef terminal stroke:#1099c9
28+
classDef success fill:#299967
29+
classDef success stroke:#299967
30+
31+
start([start]):::terminal
32+
nochange([no issue, exit]):::terminal
33+
subgraph GitHub entry
34+
gh_name[/GitHub name/]
35+
end
36+
subgraph bio.tools entry
37+
bt_name[/bio.tools name/]
38+
bt_id[/bio.tools ID/]
39+
end
40+
41+
start --> gh_name & bt_name & bt_id
42+
gh_name & bt_name & bt_id --> check_bt{is bio.tools entry None?}
43+
check_bt -->|yes| nochange
44+
check_bt -->|no| policy[["REF Policy: bio.tools ID over GitHub name but check equality by seeing if one string is a substring of another for GitHub name and bio.tools ID, for GitHub name and bio.tools name)"]]:::ref
45+
policy --> policy_check{does the policy decide to create an issue?}
46+
policy_check -->|no| nochange
47+
policy_check -->|yes| issue[create issue info: suggesting to update repository name from bio.tools metadata]
48+
issue --> return([return issue info]):::success
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
config:
3+
theme: base
4+
look: neo
5+
layout: elk
6+
elk:
7+
nodePlacementStrategy: NETWORK_SIMPLEX
8+
themeVariables:
9+
darkMode: true
10+
background: "#121212"
11+
primaryColor: "#005a7a"
12+
primaryBorderColor: "#121212"
13+
secondaryBorderColor: "#121212"
14+
edgeLabelBackground: transparent
15+
labelTextColor: "#5DD3FC"
16+
clusterBkg: transparent
17+
clusterBorder: "#5DD3FC"
18+
noteBkgColor: "#F47D22"
19+
noteBorderColor: "#F47D22"
20+
noteTextColor: "#fff"
21+
---
22+
flowchart LR
23+
classDef ref fill:#F47D22
24+
classDef notestyle fill:#F47D22
25+
classDef notestyle stroke:#F47D22
26+
classDef terminal fill:#1099c9
27+
classDef terminal stroke:#1099c9
28+
classDef success fill:#299967
29+
classDef success stroke:#299967
30+
31+
start([start]):::terminal
32+
nochange([no issue, exit]):::terminal
33+
subgraph GitHub entry
34+
gh_version[/GitHub latest version tag/]
35+
end
36+
subgraph bio.tools entry
37+
bt_versions[/bio.tools versions/]
38+
end
39+
conflict_newer@{ shape: braces, label: "log conflict" }
40+
conflict_exist@{ shape: braces, label: "log conflict" }
41+
style conflict_newer fill:#F47D22,stroke:#F47D22
42+
style conflict_exist fill:#F47D22,stroke:#F47D22
43+
44+
start --> gh_version & bt_versions
45+
gh_version & bt_versions --> check_bt{is bio.tools versions empty or None?}
46+
check_bt -->|yes| nochange
47+
check_bt -->|no| find_latest_bt[[find the latest bio.tools version]]
48+
find_latest_bt --> check_latest_bt{is the latest bio.tools version None?}
49+
check_latest_bt -->|yes| nochange
50+
check_latest_bt -->|no| check_latest_gh{is GitHub latest version tag None?}
51+
check_latest_gh -->|yes| conflict_exist
52+
conflict_exist --> issue_no_rel["create issue info: suggesting to create a first release to match bio.tools (latest) release"]
53+
issue_no_rel --> return([return issue info]):::success
54+
check_latest_gh -->|no| check_newer{are any of the bio.tools versions newer than GitHub latest version?}
55+
check_newer -->|no| nochange
56+
check_newer -->|yes| conflict_newer
57+
conflict_newer --> issue_newer["create issue info: suggesting to create a new release to match bio.tools (latest) release"]
58+
issue_newer --> return
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
config:
3+
theme: base
4+
look: neo
5+
layout: elk
6+
elk:
7+
nodePlacementStrategy: NETWORK_SIMPLEX
8+
themeVariables:
9+
darkMode: true
10+
background: "#121212"
11+
primaryColor: "#005a7a"
12+
primaryBorderColor: "#121212"
13+
secondaryBorderColor: "#121212"
14+
edgeLabelBackground: transparent
15+
labelTextColor: "#5DD3FC"
16+
clusterBkg: transparent
17+
clusterBorder: "#5DD3FC"
18+
noteBkgColor: "#F47D22"
19+
noteBorderColor: "#F47D22"
20+
noteTextColor: "#fff"
21+
---
22+
flowchart LR
23+
classDef ref fill:#F47D22
24+
classDef notestyle fill:#F47D22
25+
classDef notestyle stroke:#F47D22
26+
classDef terminal fill:#1099c9
27+
classDef terminal stroke:#1099c9
28+
classDef success fill:#299967
29+
classDef success stroke:#299967
30+
31+
start([start]):::terminal
32+
nochange([no change, exit]):::terminal
33+
subgraph GitHub entry
34+
gh_name[/GitHub repo name/]
35+
end
36+
subgraph bio.tools entry
37+
bt_id[/bio.tools ID/]
38+
end
39+
conflict_name@{ shape: braces, label: "log conflict" }
40+
conflict_exist@{ shape: braces, label: "log conflict" }
41+
style conflict_name fill:#F47D22,stroke:#F47D22
42+
style conflict_exist fill:#F47D22,stroke:#F47D22
43+
44+
start --> gh_name & bt_id
45+
gh_name & bt_id --> gh_check{is GitHub repo name None?}
46+
gh_check -->|yes| nochange
47+
gh_check -->|no| bt_contain_check{"is bio.tools ID NOT None AND bio.tools ID and GitHub name contain each other (one is a substring on another)?"}
48+
bt_contain_check -->|yes| nochange
49+
bt_contain_check -->|no| bt_not_contain_check{"is bio.tools ID NOT None AND bio.tools ID and GitHub name do NOT contain each other?"}
50+
bt_not_contain_check -->|yes| confliconflict_namect
51+
bt_not_contain_check -->|no| check_gh_in_bt[["check if the GitHub repo name already taken as a bio.tools ID (check bio.tools for existence)"]]
52+
conflict_name --> check_gh_in_bt
53+
check_gh_in_bt --> check_gh_taken{is GitHub repo name taken?}
54+
check_gh_taken -->|no| return_gh([return GitHub repo name]):::success
55+
check_gh_taken -->|yes| conflict_exist
56+
conflict_exist --> loop["for each number (suffix) from 1 to 99"]
57+
subgraph generate unique ID
58+
loop --> new_candidate["create a new cadidate ID by adding suffix to the GitHub name"]
59+
new_candidate --> check_candidaate_in_bt[["check if the candidate ID already taken as a bio.tools ID"]]
60+
check_candidaate_in_bt -->|yes| check_candidate_taken{is candidate ID taken?}
61+
check_candidate_taken -->|yes| check_all_nr{checked all suffixes?}
62+
check_all_nr -->|no| loop
63+
end
64+
check_all_nr -->|yes| return_candidate([return candidate ID]):::success
65+
check_candidate_taken -->|no| nochange
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
config:
3+
theme: base
4+
look: neo
5+
layout: elk
6+
elk:
7+
nodePlacementStrategy: NETWORK_SIMPLEX
8+
themeVariables:
9+
darkMode: true
10+
background: "#121212"
11+
primaryColor: "#005a7a"
12+
primaryBorderColor: "#121212"
13+
secondaryBorderColor: "#121212"
14+
edgeLabelBackground: transparent
15+
labelTextColor: "#5DD3FC"
16+
clusterBkg: transparent
17+
clusterBorder: "#5DD3FC"
18+
noteBkgColor: "#F47D22"
19+
noteBorderColor: "#F47D22"
20+
noteTextColor: "#fff"
21+
---
22+
flowchart LR
23+
classDef ref fill:#F47D22
24+
classDef notestyle fill:#F47D22
25+
classDef notestyle stroke:#F47D22
26+
classDef terminal fill:#1099c9
27+
classDef terminal stroke:#1099c9
28+
classDef success fill:#299967
29+
classDef success stroke:#299967
30+
31+
start([start]):::terminal
32+
nochange([no change, exit]):::terminal
33+
subgraph GitHub entry
34+
gh_url[/GitHub html url/]
35+
gh_has_wiki[/GitHub has wiki enabled/]
36+
gh_coc[/GitHub code of conduct/]
37+
gh_pages[/GitHub pages/]
38+
end
39+
subgraph bio.tools entry
40+
bt_docs[/bio.tools documentations/]
41+
end
42+
43+
start --> gh_url & gh_has_wiki & gh_coc & gh_pages & bt_docs
44+
gh_url & gh_has_wiki & gh_coc & gh_pages & bt_docs --> check_gh_entry{is GitHub entry None?}
45+
check_gh_entry -->|yes| nochange
46+
47+
check_gh_entry -->|no| check_wiki_exists[[check the existense of GitHub wiki repository and build its URL]]
48+
subgraph map wiki
49+
check_wiki_exists --> check_wiki{is wiki enabled on GitHub AND does wiki repo exist?}
50+
check_wiki -->|yes| check_wiki_in_bt{is wiki URL already included in bio.tools documentations?}
51+
check_wiki_in_bt -->|no| add_wiki[add wiki URL to the bio.tools documentations, assign type General]:::success
52+
end
53+
add_wiki --> coc_check{is code of conduct configured on GitHub and has a URL?}
54+
check_wiki_in_bt -->|yes| coc_check
55+
check_wiki -->|no| coc_check
56+
subgraph map code of conduct
57+
coc_check -->|yes| check_coc_in_bt{is code of conduct URL already included in bio.tools documentations?}
58+
check_coc_in_bt --> |no| add_coc[add code of conduct URL to the bio.tools documentations, assign type Code of conduct]:::success
59+
end
60+
add_coc --> pages_check{is cGitHub pages configured on GitHub and has a URL?}
61+
check_coc_in_bt --> |yes| pages_check
62+
coc_check -->|no| pages_check
63+
subgraph map GitHub pages
64+
pages_check -->|yes| check_pages_in_bt{is GitHub pages URL already included in bio.tools documentations?}
65+
check_pages_in_bt -->|no| add_pages[add GitHub pages URL to the bio.tools documentations, assign type General]:::success
66+
end
67+
add_pages --> return([return updated bio.tools documentations]):::success
68+
check_pages_in_bt -->|yes| return
69+
pages_check -->|no| return
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
config:
3+
theme: base
4+
look: neo
5+
layout: elk
6+
elk:
7+
nodePlacementStrategy: NETWORK_SIMPLEX
8+
themeVariables:
9+
darkMode: true
10+
background: "#121212"
11+
primaryColor: "#005a7a"
12+
primaryBorderColor: "#121212"
13+
secondaryBorderColor: "#121212"
14+
edgeLabelBackground: transparent
15+
labelTextColor: "#5DD3FC"
16+
clusterBkg: transparent
17+
clusterBorder: "#5DD3FC"
18+
noteBkgColor: "#F47D22"
19+
noteBorderColor: "#F47D22"
20+
noteTextColor: "#fff"
21+
---
22+
flowchart LR
23+
classDef ref fill:#F47D22
24+
classDef notestyle fill:#F47D22
25+
classDef notestyle stroke:#F47D22
26+
classDef terminal fill:#1099c9
27+
classDef terminal stroke:#1099c9
28+
classDef success fill:#299967
29+
classDef success stroke:#299967
30+
31+
start([start]):::terminal
32+
nochange([no change, exit]):::terminal
33+
subgraph GitHub entry
34+
gh_name[/GitHub name/]
35+
end
36+
subgraph bio.tools entry
37+
bt_name[/bio.tools name/]
38+
end
39+
40+
start --> gh_name & bt_name
41+
gh_name & bt_name --> check_gh{is GitHub name None?}
42+
check_gh -->|yes| nochange
43+
check_gh -->|no| policy[["REF Policy: GitHub name over bio.tools name (but check equality by seeing if one string is a substring of another)"]]:::ref
44+
policy --> return_resolved([return resolved]):::success

docs/source/api_reference/diagrams.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ Map publications
5757
Map documentation
5858
~~~~~~~~~~~~~~~~~~~~
5959

60-
TODO: add diagram here.
60+
.. mermaid:: _process_diagrams/gh2bt/documentation.mmd
6161

6262
Map biotools ID
6363
~~~~~~~~~~~~~~~~~~
6464

65-
TODO: add diagram here.
65+
.. mermaid:: _process_diagrams/gh2bt/biotools_id.mmd
6666

6767
Map name
6868
~~~~~~~~~~
6969

70-
TODO: add diagram here.
70+
.. mermaid:: _process_diagrams/gh2bt/name.mmd
7171

7272
Map homepage
7373
~~~~~~~~~~~~~~
@@ -124,7 +124,7 @@ Map topics
124124
Map version
125125
~~~~~~~~~~~~~~
126126

127-
TODO: add diagram here.
127+
.. mermaid:: _process_diagrams/bt2gh/version.mmd
128128

129129

130130
bio.tools → GitHub mapping for pull requests
@@ -136,7 +136,7 @@ in the form of pull requests.
136136
Map name
137137
~~~~~~~~~~
138138

139-
TODO: add diagram here.
139+
.. mermaid:: _process_diagrams/bt2gh/name.mmd
140140

141141
Map license
142142
~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)