From 038bd4ec01ebf1643bdb254c5d56d519d90e31e2 Mon Sep 17 00:00:00 2001 From: "Mark A. Miller" Date: Fri, 6 Sep 2024 16:39:47 -0400 Subject: [PATCH] examples work or are commented out --- Makefile | 37 ++++++++++--------- README.md | 13 +++---- examples/.gitignore | 0 examples/Person-001.yaml | 7 ---- project.Makefile | 4 +- src/data/examples/Person-001.yaml | 7 ---- .../invalid/Soil-missing_sample_name.yaml | 4 ++ src/data/examples/probelm/invalid/.gitignore | 0 src/data/examples/probelm/valid/.gitignore | 0 .../valid/MimsSoil-data-001.yaml | 0 .../valid/MixsCompliantData-001.yaml | 0 .../{ => examples}/valid/Soil-data-001.yaml | 0 12 files changed, 32 insertions(+), 40 deletions(-) create mode 100644 examples/.gitignore delete mode 100644 examples/Person-001.yaml delete mode 100644 src/data/examples/Person-001.yaml create mode 100644 src/data/examples/invalid/Soil-missing_sample_name.yaml create mode 100644 src/data/examples/probelm/invalid/.gitignore create mode 100644 src/data/examples/probelm/valid/.gitignore rename src/data/{ => examples}/valid/MimsSoil-data-001.yaml (100%) rename src/data/{ => examples}/valid/MixsCompliantData-001.yaml (100%) rename src/data/{ => examples}/valid/Soil-data-001.yaml (100%) diff --git a/Makefile b/Makefile index 4dc7d36..2292c24 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ SRC = src DEST = project PYMODEL = $(SRC)/$(SCHEMA_NAME)/datamodel DOCDIR = docs -EXAMPLEDIR = examples +#EXAMPLEDIR = examples SHEET_MODULE = personinfo_enums SHEET_ID = $(LINKML_SCHEMA_GOOGLE_SHEET_ID) SHEET_TABS = $(LINKML_SCHEMA_GOOGLE_SHEET_TABS) @@ -54,8 +54,9 @@ GEN_TS_ARGS = ${LINKML_GENERATORS_TYPESCRIPT_ARGS} endif +# removed target gen-examples # basename of a YAML file in model/ -.PHONY: all clean setup gen-project gen-examples gendoc git-init-add git-init git-add git-commit git-status +.PHONY: all clean setup gen-project gendoc git-init-add git-init git-add git-commit git-status # note: "help" MUST be the first target in the file, # when the user types "make" they should get help info @@ -76,8 +77,9 @@ status: check-config @echo "Project: $(SCHEMA_NAME)" @echo "Source: $(SOURCE_SCHEMA_PATH)" +# removed target gen-examples # generate products and add everything to github -setup: check-config git-init install gen-project gen-examples gendoc git-add git-commit +setup: check-config git-init install gen-project gendoc git-add git-commit # install any dependencies required for building install: @@ -115,9 +117,9 @@ deploy: all mkd-gh-deploy compile-sheets: $(RUN) sheets2linkml --gsheet-id $(SHEET_ID) $(SHEET_TABS) > $(SHEET_MODULE_PATH).tmp && mv $(SHEET_MODULE_PATH).tmp $(SHEET_MODULE_PATH) -# In future this will be done by conversion -gen-examples: - cp src/data/examples/* $(EXAMPLEDIR) +## In future this will be done by conversion +#gen-examples: +# cp src/data/examples/* $(EXAMPLEDIR) # generates all project files @@ -140,7 +142,8 @@ ifneq ($(strip ${GEN_TS_ARGS}),) $(RUN) gen-typescript ${GEN_TS_ARGS} $(SOURCE_SCHEMA_PATH) >${DEST}/typescript/${SCHEMA_NAME}.ts endif -test: test-schema test-python test-examples +# removed target test-examples +test: test-schema test-python test-schema: $(RUN) gen-project ${CONFIG_YAML} -d tmp $(SOURCE_SCHEMA_PATH) @@ -158,17 +161,17 @@ else $(info Ok) endif -convert-examples-to-%: - $(patsubst %, $(RUN) linkml-convert % -s $(SOURCE_SCHEMA_PATH) -C Person, $(shell ${SHELL} find src/data/examples -name "*.yaml")) +#convert-examples-to-%: +# $(patsubst %, $(RUN) linkml-convert % -s $(SOURCE_SCHEMA_PATH) -C Person, $(shell ${SHELL} find src/data/examples -name "*.yaml")) -examples/%.yaml: src/data/examples/%.yaml - $(RUN) linkml-convert -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@ -examples/%.json: src/data/examples/%.yaml - $(RUN) linkml-convert -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@ -examples/%.ttl: src/data/examples/%.yaml - $(RUN) linkml-convert -P EXAMPLE=http://example.org/ -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@ - -test-examples: examples/output +#examples/%.yaml: src/data/examples/%.yaml +# $(RUN) linkml-convert -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@ +#examples/%.json: src/data/examples/%.yaml +# $(RUN) linkml-convert -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@ +#examples/%.ttl: src/data/examples/%.yaml +# $(RUN) linkml-convert -P EXAMPLE=http://example.org/ -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@ +# +#test-examples: examples/output examples/output: src/mixs_missing_value_sandbox/schema/mixs_missing_value_sandbox.yaml mkdir -p $@ diff --git a/README.md b/README.md index aa9a0d3..7bc3c9d 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ experimentation with formal representations of missing data -This repos starts off with a schema about people. It will be changed to a light subset of MIxS 6.2, with explicit handling of missing values. - ## Website [https://GenomicsStandardsConsortium.github.io/mixs-missing-value-sandbox](https://GenomicsStandardsConsortium.github.io/mixs-missing-value-sandbox) @@ -13,11 +11,11 @@ This repos starts off with a schema about people. It will be changed to a light * [examples/](examples/) - example data * [project/](project/) - project files (do not edit these) * [src/](src/) - source files (edit these) - * [mixs_missing_value_sandbox](src/mixs_missing_value_sandbox) - * [schema](src/mixs_missing_value_sandbox/schema) -- LinkML schema - (edit this) - * [datamodel](src/mixs_missing_value_sandbox/datamodel) -- generated - Python datamodel + * [mixs_missing_value_sandbox](src/mixs_missing_value_sandbox) + * [schema](src/mixs_missing_value_sandbox/schema) -- LinkML schema + (edit this) + * [datamodel](src/mixs_missing_value_sandbox/datamodel) -- generated + Python datamodel * [tests/](tests/) - Python tests ## Developer Documentation @@ -27,6 +25,7 @@ Use the `make` command to generate project artefacts: * `make all`: make everything * `make deploy`: deploys site + ## Credits diff --git a/examples/.gitignore b/examples/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/examples/Person-001.yaml b/examples/Person-001.yaml deleted file mode 100644 index 617ff08..0000000 --- a/examples/Person-001.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# Example data object ---- -entries: - - id: example:Person001 - name: foo bar - primary_email: foo.bar@example.com - age_in_years: 33 diff --git a/project.Makefile b/project.Makefile index c447d74..8eb029d 100644 --- a/project.Makefile +++ b/project.Makefile @@ -1,13 +1,13 @@ RUN=poetry run -src/data/valid/MixsCompliantData-001-report.txt: src/data/valid/MixsCompliantData-001.yaml \ +src/data/valid/MixsCompliantData-001-report.txt: src/data/examples/valid \ src/mixs_missing_value_sandbox/schema/mixs_missing_value_sandbox.yaml $(RUN) linkml-validate \ --schema $(word 2,$^) \ --target-class $(shell echo $(basename $(notdir $(word 1,$^))) | cut -d'-' -f1) \ $(word 1,$^) > $@ -src/data/valid/MixsCompliantData-001.tsv: src/data/valid/MixsCompliantData-001.yaml \ +src/data/valid/MixsCompliantData-001.tsv: src/data/examples/valid \ src/mixs_missing_value_sandbox/schema/mixs_missing_value_sandbox.yaml $(RUN) linkml-convert --schema $(word 2,$^) \ --output $@ \ diff --git a/src/data/examples/Person-001.yaml b/src/data/examples/Person-001.yaml deleted file mode 100644 index 617ff08..0000000 --- a/src/data/examples/Person-001.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# Example data object ---- -entries: - - id: example:Person001 - name: foo bar - primary_email: foo.bar@example.com - age_in_years: 33 diff --git a/src/data/examples/invalid/Soil-missing_sample_name.yaml b/src/data/examples/invalid/Soil-missing_sample_name.yaml new file mode 100644 index 0000000..f5c6a5c --- /dev/null +++ b/src/data/examples/invalid/Soil-missing_sample_name.yaml @@ -0,0 +1,4 @@ +depth: "123" +elev: "123" +project_name: abc + diff --git a/src/data/examples/probelm/invalid/.gitignore b/src/data/examples/probelm/invalid/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/src/data/examples/probelm/valid/.gitignore b/src/data/examples/probelm/valid/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/src/data/valid/MimsSoil-data-001.yaml b/src/data/examples/valid/MimsSoil-data-001.yaml similarity index 100% rename from src/data/valid/MimsSoil-data-001.yaml rename to src/data/examples/valid/MimsSoil-data-001.yaml diff --git a/src/data/valid/MixsCompliantData-001.yaml b/src/data/examples/valid/MixsCompliantData-001.yaml similarity index 100% rename from src/data/valid/MixsCompliantData-001.yaml rename to src/data/examples/valid/MixsCompliantData-001.yaml diff --git a/src/data/valid/Soil-data-001.yaml b/src/data/examples/valid/Soil-data-001.yaml similarity index 100% rename from src/data/valid/Soil-data-001.yaml rename to src/data/examples/valid/Soil-data-001.yaml