Skip to content

Commit 24159e1

Browse files
Merge pull request #1 from reactome/release/96
Release/96
2 parents 9db670e + 5245aea commit 24159e1

174 files changed

Lines changed: 33544 additions & 33613 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/validate.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Validate illustrations
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
validate:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Validate icons and EHLDs
14+
run: |
15+
docker run --rm \
16+
-v ${{ github.workspace }}/icons:/data/icons \
17+
-v ${{ github.workspace }}/ehld:/data/ehld \
18+
public.ecr.aws/reactome/illustration-validator:latest \
19+
java -jar ./target/illustration-validator-jar-with-dependencies.jar \
20+
-e false \
21+
-d /data/icons \
22+
-s /data/ehld

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ SVG icons and EHLD diagrams for [Reactome](https://reactome.org/) pathway diagra
77
- `icons/` - SVG icons and XML metadata files (R-ICO-XXXXXX.svg and .xml)
88
- `ehld/` - EHLD diagram SVGs (R-HSA-XXXXXX.svg)
99
- `download_illustrations.py` - Script to download icons and EHLDs from Figma and validate them
10-
- `references.txt` - Valid reference database names for the icon validator
11-
- `categories.txt` - Valid category names for the icon validator
10+
- `VERSION` - Current release version number
1211

1312
## Prerequisites
1413

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
96

categories.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

download_illustrations.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
3434
ICONS_DIR = os.path.join(SCRIPT_DIR, "icons")
3535
EHLD_DIR = os.path.join(SCRIPT_DIR, "ehld")
36-
REFERENCES_FILE = os.path.join(SCRIPT_DIR, "references.txt")
37-
CATEGORIES_FILE = os.path.join(SCRIPT_DIR, "categories.txt")
3836

3937
VALIDATOR_IMAGE = "public.ecr.aws/reactome/illustration-validator:latest"
4038

@@ -197,16 +195,7 @@ def download_ehlds(token):
197195
page_id = get_export_page_id(token, EHLD_FILE_KEY)
198196
print(f"Found '{EXPORT_PAGE_NAME}' page (id: {page_id})")
199197

200-
# EHLDs are direct children of the Export page (frames, depth=1 is enough)
201-
url = f"https://api.figma.com/v1/files/{EHLD_FILE_KEY}/nodes?ids={page_id}&depth=1"
202-
resp = requests.get(url, headers=figma_headers(token))
203-
resp.raise_for_status()
204-
page_data = resp.json()["nodes"][page_id]["document"]
205-
nodes = [
206-
{"id": c["id"], "name": c["name"].strip()}
207-
for c in page_data.get("children", [])
208-
if c["name"].strip().startswith("R-HSA-")
209-
]
198+
nodes = get_nodes_on_page(token, EHLD_FILE_KEY, page_id, "R-HSA-")
210199
print(f"Found {len(nodes)} EHLD diagrams")
211200
if not nodes:
212201
print("No EHLDs found!")
@@ -232,21 +221,12 @@ def validate(do_icons, do_ehlds):
232221
print("VALIDATING")
233222
print("=" * 60)
234223

235-
for f in [REFERENCES_FILE, CATEGORIES_FILE]:
236-
if not os.path.exists(f):
237-
print(f"Error: {f} not found. Cannot run validation.")
238-
return False
239-
240224
cmd = [
241225
"docker", "run", "--rm",
242-
"-v", f"{REFERENCES_FILE}:/app/references.txt",
243-
"-v", f"{CATEGORIES_FILE}:/app/categories.txt",
244226
]
245227

246228
validator_args = [
247229
"java", "-jar", "./target/illustration-validator-jar-with-dependencies.jar",
248-
"-r", "/app/references.txt",
249-
"-c", "/app/categories.txt",
250230
"-e", "false",
251231
]
252232

ehld/R-HSA-109582.svg

Lines changed: 1 addition & 6 deletions
Loading

ehld/R-HSA-1226099.svg

Lines changed: 2 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)