Skip to content

Commit ec7660e

Browse files
committed
fix makefile
1 parent 27f3384 commit ec7660e

File tree

2 files changed

+25
-682
lines changed

2 files changed

+25
-682
lines changed

Makefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,28 @@ integration-tests:
1414

1515
docs:
1616
cd docs && $(RUN) make html
17+
18+
# Clean up intermediate schema files
19+
schema-clean:
20+
@echo "Cleaning up intermediate schema files..."
21+
rm -f kgx/schema/kgx_merged.yaml kgx/schema/kgx_final.yaml kgx/schema/derived_kgx_schema.yaml
22+
rm -f kgx/schema/transformations/full_transform.transform.yaml
23+
24+
# Merge imported schemas (biolink-model) into a single file
25+
schema-merge: schema-clean
26+
@echo "Merging schemas..."
27+
poetry run gen-linkml --mergeimports --format yaml kgx/schema/kgx.yaml -o kgx/schema/kgx_merged.yaml
28+
29+
# Generate transformation specification
30+
schema-transform: schema-merge
31+
@echo "Generating transformation specification..."
32+
poetry run python kgx/schema/scripts/generate_transform.py kgx/schema/kgx_merged.yaml kgx/schema/transformations/full_transform.transform.yaml
33+
34+
# Apply transformation to create final schema
35+
schema-apply: schema-transform
36+
@echo "Applying transformation..."
37+
poetry run linkml-map derive-schema -T kgx/schema/transformations/full_transform.transform.yaml -o kgx/schema/kgx_complete.yaml kgx/schema/kgx_merged.yaml
38+
39+
# Complete schema build process
40+
schema: schema-apply
41+
@echo "Schema build complete. Final schema is at kgx/schema/kgx_complete.yaml"

0 commit comments

Comments
 (0)