Skip to content

Commit cb996b5

Browse files
committed
Update build order and add more logging
1 parent 7060a02 commit cb996b5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/exports.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
python-version: 3.9
1818
- name: Create local changes
1919
run: |
20-
pip install -e .[html]
2120
pip install indra
21+
pip install -e .[html]
2222
python update_resources.py
2323
python -m famplex.html
2424
- name: Commit files

famplex/html/api.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def get_identifier(namespace: str, name: str) -> str:
6363
@click.option('--debug-links', is_flag=True)
6464
def html(directory: str, debug_links: bool):
6565
"""Export FamPlex as a static HTML site."""
66+
click.echo(f'outputting to {directory}')
67+
6668
fplx_ids = load_entities()
6769

6870
descriptions = {
@@ -71,7 +73,7 @@ def html(directory: str, debug_links: bool):
7173
}
7274

7375
xrefs = defaultdict(set)
74-
for namespace, identifier, fplx_id in tqdm(load_equivalences()):
76+
for namespace, identifier, fplx_id in tqdm(load_equivalences(), desc='loading equivalences'):
7577
xrefs[fplx_id].add((namespace, identifier, get_name(namespace, identifier)))
7678

7779
grounding_map = load_grounding_map()
@@ -83,7 +85,7 @@ def html(directory: str, debug_links: bool):
8385

8486
incoming_relations = defaultdict(set)
8587
outgoing_relations = defaultdict(set)
86-
for ns1, id1, rel, ns2, id2 in tqdm(load_relations()):
88+
for ns1, id1, rel, ns2, id2 in tqdm(load_relations(), desc='loading relations'):
8789
if ns1 == 'FPLX':
8890
if ns2 == 'HGNC':
8991
id2, name2 = get_identifier(ns2, id2), id2
@@ -119,7 +121,7 @@ def html(directory: str, debug_links: bool):
119121
with open(os.path.join(directory, 'index.html'), 'w') as file:
120122
print(index_html, file=file)
121123

122-
for _, row in tqdm(terms_df.iterrows(), total=len(terms_df.index)):
124+
for _, row in tqdm(terms_df.iterrows(), total=len(terms_df.index), desc='writing terms'):
123125
subdirectory = os.path.join(directory, row.identifier)
124126
os.makedirs(subdirectory, exist_ok=True)
125127
term_html = term_template.render(

0 commit comments

Comments
 (0)