Repository navigation
Expand file tree
/
Copy pathjustfile-mac
More file actions
51 lines (38 loc) · 1.53 KB
/
Copy pathjustfile-mac
File metadata and controls
51 lines (38 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
set shell := ["bash", "-c"]
# Lists `just` recipes
default:
just --list
# set working-directory := "."
src_schema_path := "./src/basalt_schema/schema/basalt_schema.yaml"
# doc_gen_overlay: adds uuid/numeric type stubs for doc rendering only
# kept alongside other doc-gen artefacts in src/doc_templates/
doc_overlay_path := "./src/doc_templates/doc_gen_overlay.yaml"
dst_schema_path := "./project"
gen-schema:
uv run python util/sqlalchemygen.py {{src_schema_path}} > {{dst_schema_path}}/schema.py
uv run python util/fix_encoding.py {{dst_schema_path}}/schema.py
gen-models:
uv run python util/pydanticgen.py {{src_schema_path}} > {{dst_schema_path}}/models.py
uv run python util/fix_encoding.py {{dst_schema_path}}/models.py
gen-project: gen-schema gen-models
gen-doc:
uv run python util/gen_doc.py ./src/basalt_schema/schema/basalt_schema.yaml docs/elements/
mkdir -p docs/files
cp visuals/schema-explorer.html docs/files/schema-explorer.html
clean-doc:
rm -f docs/elements/*.md
regen-doc: clean-doc gen-doc
serve-doc:
uv run mkdocs serve
# deprecating
# gen-enums:
# # gen-pydantic ../src/basalt_schema/schema/enums.yaml > enums.py
# # python fix_encoding.py enums.py
[working-directory: '../src/basalt_schema/schema/']
render:
@echo "Broken - expect failure"
linkml generate dbml -s basalt_schema.yaml -o pg.dbml
dbml-renderer -i pg.dbml -o pg.svg
gen-pydantic:
python pydanticgen.py ../src/basalt_schema/schema/basalt_schema.yaml > models.py
python fix_encoding.py models.py