@@ -54,7 +54,7 @@ _default: _status
54
54
setup : _check-config _git-init install _git-add && _setup_part2
55
55
git commit -m " Initialise git with minimal project" -a
56
56
57
- _ setup_part2 : _gen -project _gendoc
57
+ _ setup_part2 : gen -project _gendoc
58
58
git add .
59
59
git commit -m " Add generated docs and project artefacts" -a
60
60
@@ -63,9 +63,19 @@ _setup_part2: _gen-project _gendoc
63
63
install :
64
64
poetry install
65
65
66
+ # Updates project template and LinkML package
67
+ [group (' project management' )]
68
+ update : _update-template _update-linkml
69
+
70
+ # Clean all generated files
71
+ [group (' project management' )]
72
+ clean : _clean_project
73
+ rm -rf tmp
74
+ rm -rf {{ docdir}} / *
75
+
66
76
# (Re-)Generate project and documentation locally
67
77
[group (' model development' )]
68
- site : _gen -project _gendoc
78
+ site : gen -project _gendoc
69
79
70
80
# Deploy documentation site to Github Pages
71
81
[group (' deployment' )]
@@ -85,15 +95,22 @@ lint:
85
95
[group (' model development' )]
86
96
testdoc : _gendoc _serve
87
97
88
- # Updates project template and LinkML package
89
- [group (' project management' )]
90
- update : _update-template _update-linkml
91
-
92
- # Clean all generated files
93
- [group (' project management' )]
94
- clean : _clean_project
95
- rm -rf tmp
96
- rm -rf {{ docdir}} / *
98
+ # Generate project files including Python data model
99
+ [group (' model development' )]
100
+ gen-project : _compile_sheets
101
+ poetry run gen-project {{ config_yaml}} -d {{ dest}} {{ source_schema_path}}
102
+ mv {{ dest}} / *.py {{ pymodel}}
103
+ poetry run gen-pydantic {{ gen_pydantic_args}} {{ source_schema_path}} > {{ pymodel}} / {{ schema_name}} _pydantic.py
104
+ @ if [ ! ${{ gen_java_args}} ]; then \
105
+ poetry run gen-java {{ gen_java_args}} --output-directory {{ dest}} / java/ {{ source_schema_path}} || true ; \
106
+ fi
107
+ @ if [ ! ${{ gen_owl_args}} ]; then \
108
+ mkdir -p {{ dest}} / owl && \
109
+ poetry run gen-owl {{ gen_owl_args}} {{ source_schema_path}} > {{ dest}} / owl/ {{ schema_name}} .owl.ttl || true ; \
110
+ fi
111
+ @ if [ ! ${{ gen_ts_args}} ]; then \
112
+ poetry run gen-typescript {{ gen_ts_args}} {{ source_schema_path}} > {{ dest}} / typescript/ {{ schema_name}} .ts || true ; \
113
+ fi
97
114
98
115
# ============== Migrations recipes for Copier ==============
99
116
@@ -138,22 +155,6 @@ _compile_sheets:
138
155
mv {{ sheet_module_path}} .tmp {{ sheet_module_path}} ; \
139
156
fi
140
157
141
- # Generate project files
142
- _ gen-project : _compile_sheets
143
- poetry run gen-project {{ config_yaml}} -d {{ dest}} {{ source_schema_path}}
144
- mv {{ dest}} / *.py {{ pymodel}}
145
- poetry run gen-pydantic {{ gen_pydantic_args}} {{ source_schema_path}} > {{ pymodel}} / {{ schema_name}} _pydantic.py
146
- @ if [ ! ${{ gen_java_args}} ]; then \
147
- poetry run gen-java {{ gen_java_args}} --output-directory {{ dest}} / java/ {{ source_schema_path}} || true ; \
148
- fi
149
- @ if [ ! ${{ gen_owl_args}} ]; then \
150
- mkdir -p {{ dest}} / owl && \
151
- poetry run gen-owl {{ gen_owl_args}} {{ source_schema_path}} > {{ dest}} / owl/ {{ schema_name}} .owl.ttl || true ; \
152
- fi
153
- @ if [ ! ${{ gen_ts_args}} ]; then \
154
- poetry run gen-typescript {{ gen_ts_args}} {{ source_schema_path}} > {{ dest}} / typescript/ {{ schema_name}} .ts || true ; \
155
- fi
156
-
157
158
# Test schema generation
158
159
_ test-schema :
159
160
poetry run gen-project {{ config_yaml}} -d tmp {{ source_schema_path}}
0 commit comments