Skip to content

Commit 0fc83e6

Browse files
committed
rename example files to comply with linkml valid example file nomenclature
1 parent e4ba82e commit 0fc83e6

File tree

3 files changed

+18
-49
lines changed

3 files changed

+18
-49
lines changed

Makefile

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ LINKML_DIR = $(SRC_DIR)/linkml
3434
JSONSCHEMA_DIR = $(SRC_DIR)/jsonschema
3535
PYTHON_DIR = $(SRC_DIR)/cdm_schema
3636
# sample data
37-
SAMPLE_DATA_DIR = sample_data
37+
SAMPLE_DATA_DIR = test/data
3838

3939
# unused
4040
SHEET_MODULE = $(LINKML_SCHEMA_GOOGLE_SHEET_MODULE)
@@ -161,12 +161,6 @@ lint-validate: ## validate the schema; warnings or errors result in a non-zero
161161
lint-validate-no-warn: ## validate the schema; warnings do not result in a non-zero exit code
162162
$(RUN) linkml-lint --ignore-warnings --validate $(LINKML_DIR)
163163

164-
test-sample-data: ## validate sample data against LinkML schema
165-
$(RUN) linkml-validate -s $(LINKML_SCHEMA_FILE) sample_data/**/**/*.json
166-
167-
test-sample-data-jsonschema: ## validate sample data against JSONschema
168-
$(RUN) check-jsonschema --schemafile $(JSONSCHEMA_DIR)/$(SCHEMA_BASE_NAME).schema.json --verbose sample_data/**/**/*.json
169-
170164
check-config:
171165
ifndef LINKML_SCHEMA_NAME
172166
$(error **Project not configured**:\n\n - See '.env.public'\n\n)
@@ -184,27 +178,15 @@ examples/%.json: $(SAMPLE_DATA_DIR)/%.yaml
184178
examples/%.ttl: $(SAMPLE_DATA_DIR)/%.yaml
185179
$(RUN) linkml-convert -P EXAMPLE=http://example.org/ -s $(LINKML_SCHEMA_FILE) -C $(SCHEMA_ROOT) $< -o $@
186180

187-
test-examples: examples/output
188181

189-
examples/output: src/$(SCHEMA_NAME)/schema/$(SCHEMA_NAME).yaml
190-
mkdir -p $@
182+
test-examples:
191183
$(RUN) linkml-run-examples \
192-
--output-formats json \
184+
--input-formats yaml \
193185
--output-formats yaml \
194-
--counter-example-input-directory $(SAMPLE_DATA_DIR)/invalid \
195-
--input-directory $(SAMPLE_DATA_DIR)/valid \
196-
--output-directory $@ \
197-
--schema $< > $@/README.md
198-
199-
uv run linkml-run-examples \
200-
--input-formats json \
201-
--input-formats yaml \
202-
--output-formats json \
203-
--output-formats yaml \
204-
--counter-example-input-directory tests/data/invalid \
205-
--input-directory tests/data/valid \
206-
--output-directory examples/output \
207-
--schema {{source_schema_path}} > examples/output/README.md
186+
--counter-example-input-directory tests/data/invalid \
187+
--input-directory tests/data/valid \
188+
--output-directory examples/output \
189+
--schema $(LINKML_SCHEMA_FILE) > examples/output/README.md
208190

209191
serve: mkd-serve ## Test documentation locally
210192

tests/data/valid/feature.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
feature_id: "CDM:f47ac10b-58cc-4372-a567-0e02b2c3d479"
2+
hash: "5d41402abc4b2a76b9719d911017c592"
3+
start: 125000
4+
end: 175000
5+
strand: positive
6+
type: "SO:0001006"
7+
source_database: "RefSeq"
8+
cds_phase: "0"
9+
e_value: 1.2e-15
10+
p_value: 0.001
11+

tests/data/valid/prophage-genome-feature.yaml

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

0 commit comments

Comments
 (0)