Skip to content

Commit 436e1b0

Browse files
committed
Update justfile
1 parent cae043a commit 436e1b0

1 file changed

Lines changed: 10 additions & 32 deletions

File tree

‎justfile‎

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,29 @@
11
# Mapping Commons Registry - Build & ETL
22

3-
# Schema download URLs
4-
SSSOM_SCHEMA_URL := "https://raw.githubusercontent.com/mapping-commons/sssom/refs/heads/master/src/sssom_schema/schema/sssom_schema.yaml"
5-
LINKMLMAP_SCHEMA_URL := "https://raw.githubusercontent.com/linkml/linkml-map/refs/heads/main/src/linkml_map/datamodel/transformer_model.yaml"
6-
FAIR_SCHEMA_URL := "https://raw.githubusercontent.com/mapping-commons/fair-mappings-schema/refs/heads/main/src/fair_mappings_schema/schema/fair_mappings_schema.yaml"
7-
83
# Default recipe: run the full ETL
94
default: all
105

11-
# Full ETL: setup, download schemas, transform data, ready to deploy
12-
all: setup schemas data
6+
# Full ETL: setup, transform data, ready to deploy
7+
all: setup data
138

149
# Install Python dependencies via uv
1510
setup:
1611
uv sync
1712

18-
# Download source schemas needed by linkml-map transforms
19-
schemas: setup
20-
mkdir -p tmp
21-
curl -sSL "{{SSSOM_SCHEMA_URL}}" -o tmp/sssom-schema.yaml
22-
curl -sSL "{{LINKMLMAP_SCHEMA_URL}}" -o tmp/linkml-map-schema.yaml
23-
curl -sSL "{{FAIR_SCHEMA_URL}}" -o tmp/fair-mappings-schema.yaml
24-
2513
# Run the ETL: fetch registries, transform SSSOM metadata to FAIR Mappings Schema
26-
data: schemas
14+
data: setup
2715
uv run python3 scripts/cli.py prepare-mapping-registry \
2816
mapping-server.yml \
29-
data/mapping-specifications.json \
30-
--sssom-transform transforms/sssom-to-fair.transformation.yaml \
31-
--sssom-schema tmp/sssom-schema.yaml \
32-
--linkmlmap-schema tmp/linkml-map-schema.yaml
17+
data/mapping-specifications.json
3318

34-
# Transform a single SSSOM instance (usage: just transform-sssom input.yaml output.yaml)
35-
transform-sssom input output: schemas
19+
# Transform a single file (usage: just transform input.yaml sssom output.yaml)
20+
transform input mapping_type output: setup
3621
uv run python3 scripts/cli.py transform-single \
37-
transforms/sssom-to-fair.transformation.yaml \
38-
tmp/sssom-schema.yaml \
39-
"mapping set" \
40-
{{input}} {{output}}
22+
{{input}} {{mapping_type}} {{output}}
4123

42-
# Transform a single LinkML-Map instance (usage: just transform-linkmlmap input.yaml output.yaml)
43-
transform-linkmlmap input output: schemas
44-
uv run python3 scripts/cli.py transform-single \
45-
transforms/linkmlmap-to-fair.transformation.yaml \
46-
tmp/linkml-map-schema.yaml \
47-
TransformationSpecification \
48-
{{input}} {{output}}
24+
# Validate the generated mapping specifications against the FAIR Mappings Schema
25+
validate: data
26+
uv run linkml-validate -s tmp/fair-mappings-schema.yaml data/mapping-specifications.json
4927

5028
# Serve the site locally for development
5129
serve:

0 commit comments

Comments
 (0)