Skip to content

Commit

Permalink
Merge pull request #260 from microbiomedata/env_triad
Browse files Browse the repository at this point in the history
add PV terms from env triad to schema
  • Loading branch information
turbomam authored Nov 11, 2024
2 parents f156044 + 0be360a commit 5067032
Show file tree
Hide file tree
Showing 17 changed files with 14,387 additions and 11,326 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ update-linkml:
poetry add -D linkml@latest

all: site
site: clean schema-clean src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml \
site: clean schema-clean src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml ingest-triad \
gen-project gendoc project/json/nmdc_submission_schema.json

%.yaml: gen-project
Expand Down Expand Up @@ -124,7 +124,7 @@ test-schema:
$(RUN) gen-project ${GEN_PARGS} -d tmp $(SOURCE_SCHEMA_PATH)

test-python:
$(RUN) python -m unittest discover
$(RUN) pytest

lint:
$(RUN) linkml-lint $(SOURCE_SCHEMA_PATH)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
}
},
"cell_type": "code",
"source": "output_file = \"post_google_sheets_soil_env_medium.tsv\"",
"source": "output_file = \"post_google_sheets_soil_env_medium_scale.tsv\"",
"id": "4737c7dfdaa5400e",
"outputs": [],
"execution_count": 6
Expand Down
22 changes: 22 additions & 0 deletions project.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,28 @@ local/nmdc.yaml
--format yaml [email protected] > $@
- $(RUN) linkml-lint $@ > local/with_modifications.lint_report.txt


########### ENV Triad PV generation ##########
# Specify that 'ingest-triad' is a phony target, meaning it doesn't correspond to an actual file
.PHONY: ingest-triad
WATCHED_DIR := notebooks/environmental_context_value_sets
WATCHED_FILES := $(shell find $(WATCHED_DIR) -type f)

# Define an intermediate target to prevent re-triggering
.INTERMEDIATE: temp_target

# Main target to run ingestion commands, depending on the intermediate target
ingest-triad: temp_target

# Intermediate target that has all dependencies
temp_target: $(WATCHED_FILES) src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml
$(RUN) inject-env-triad-terms -f notebooks/environmental_context_value_sets/soil/env_local_scale/post_google_sheets_soil_env_local_scale.tsv -i src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml -o src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml
$(RUN) inject-env-triad-terms -f notebooks/environmental_context_value_sets/soil/env_medium/post_google_sheets_soil_env_medium_scale.tsv -i src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml -o src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml
$(RUN) inject-env-triad-terms -f notebooks/environmental_context_value_sets/soil/env_broad_scale/post_google_sheets_soil_env_broad_scale.tsv -i src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml -o src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml
touch temp_target

################################################

src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml: local/with_modifications.yaml project/thirdparty/GoldEcosystemTree.json
$(RUN) inject-gold-pathway-terms -g $(word 2,$^) -i $< -o $@
#cp $< $@
Expand Down
Loading

0 comments on commit 5067032

Please sign in to comment.