Skip to content

Commit

Permalink
examples work or are commented out
Browse files Browse the repository at this point in the history
  • Loading branch information
turbomam committed Sep 6, 2024
1 parent be73ee3 commit 038bd4e
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 40 deletions.
37 changes: 20 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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

Expand All @@ -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)
Expand All @@ -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 $@
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -27,6 +25,7 @@ Use the `make` command to generate project artefacts:

* `make all`: make everything
* `make deploy`: deploys site

</details>

## Credits
Expand Down
Empty file added examples/.gitignore
Empty file.
7 changes: 0 additions & 7 deletions examples/Person-001.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions project.Makefile
Original file line number Diff line number Diff line change
@@ -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 $@ \
Expand Down
7 changes: 0 additions & 7 deletions src/data/examples/Person-001.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions src/data/examples/invalid/Soil-missing_sample_name.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
depth: "123"
elev: "123"
project_name: abc

Empty file.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 038bd4e

Please sign in to comment.