Skip to content

Commit

Permalink
Merge pull request #31 from ghga-de/dev in preparation of a release
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakunni3 authored Nov 26, 2021
2 parents a778b0c + cecc0c0 commit 9a3989f
Show file tree
Hide file tree
Showing 21 changed files with 7,338 additions and 2,030 deletions.
10 changes: 10 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Fixes issue (if applicable) #

## Proposed Changes

-
-
-

## Checks
- [ ] Builds locally
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SCHEMA_NAMES = $(patsubst $(SCHEMA_DIR)/%.yaml, %, $(SOURCE_FILES))

SCHEMA_NAME = ghga
SCHEMA_SRC = $(SCHEMA_DIR)/$(SCHEMA_NAME).yaml
TGTS = graphql jsonschema markdown shex owl csv graphql python rdf sql
TGTS = graphql jsonschema markdown shex owl csv graphql python pydantic rdf sql

# Optional arguments to supply to the generators
#For example, GEN_OPTS = --no-mergeimports
Expand Down Expand Up @@ -72,6 +72,15 @@ gen-python: $(patsubst %, target/python/%.py, $(SCHEMA_NAMES))
target/python/%.py: $(SCHEMA_DIR)/%.yaml tdir-python
gen-py-classes --no-mergeimports $(GEN_OPTS) $< > $@

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Pydantic classes
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

gen-pydantic: $(patsubst %, target/pydantic/%_models.py, $(SCHEMA_NAMES))
.PHONY: gen-pydantic
target/pydantic/%_models.py: $(SCHEMA_DIR)/%.yaml tdir-pydantic
gen-pydantic --no-mergeimports $(GEN_OPTS) $< > $@

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# GraphQL
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
33 changes: 12 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,24 @@ found in `src/schema/`.
Using the YAML, and the [LinkML framework](https://github.com/linkml/linkml),
we autogenerate vendor/technology specific artifacts like:

- JSON Schema
- [JSON Schema](artifacts/jsonschema)
- JSON Schema definitions of all classes and properties
- Python Dataclasses
- [Python Dataclasses](artifacts/python)
- Python Dataclasses for each defined class
- SQL DDL
- [Pydantic models](artifacts/pydantic)
- Pydantic models for each defined class
- [SQL DDL](artifacts/sql)
- SQL Data Definition Language to create SQL tables for all classes
- SQLAlchemy classes
- SQLAlchemy classes to map SQL tables and columns to each defined class
and slot, respectively
- GraphQL
- [SQLAlchemy classes](artifacts/sql)
- SQLAlchemy classes to map SQL tables and columns to each defined class and slot, respectively
- [GraphQL](artifacts/graphql)
- GraphQL types for each defined class
- ShEx
- [ShEx](artifacts/shex)
- Shape Expressions for each defined class
- RDF
- [RDF](artifacts/rdf)
- The model represented as RDF Turtle (TTL)
- OWL
- [OWL](artifacts/owl)
- The model in Web Ontology Language (OWL), serialized as RDF Turtle (TTL)
- CSV
- [CSV](artifacts/csv)
- A CSV summary of the model and its classes


Artifacts that are currently a work in progress:
- Protobuf
- Pydantic classes


## GHGA Metadata Schema Overview

![GHGA Metadata Schema](ghga-overview.png "GHGA Metadata Schema")

3 changes: 3 additions & 0 deletions artifacts/csv/ghga.csv
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ file,,
individual,,An Individual is a Person who is participating in a Study.
information_content_entity,,A generically dependent continuant that is about some thing.
investigation,,Investigation is the process of carrying out a plan or procedure so as to discover fact or information about the object of study.
library_preparation_protocol,,Information about the library preparation of an Experiment.
material_entity,,"A material entity is a physical entity that is spatially extended, exists as a whole at any point in time and has mass."
member,,Member of an Organization or a Committee.
named_thing,,"A databased entity, concept or class. This is a generic class that is the root of all the other classes."
Expand All @@ -39,7 +40,9 @@ protocol,,"A plan specification which has sufficient level of detail and quantit
publication,,"The Publication entity represents a publication. While a publication can be any article that is published, the minimum expectation is that the publication has a valid DOI."
research_activity,,A planned process executed in the performance of scientific research wherein systematic investigations are performed to establish facts and reach new conclusions about phenomena in the world.
sample,,"A sample is a limited quantity of something to be used for testing, analysis, inspection, investigation, demonstration, or trial use. A sample is prepared from a Biospecimen (isolate or tissue)."
sequencing_protocol,,Information about the sequencing of a sample.
study,,Studies are experimental investigations of a particular phenomenon. It involves a detailed examination and analysis of a subject to learn more about the phenomenon being studied.
submission,,A grouping entity that represents information about one or more entities. A submission can be considered as a set of inter-related (and inter-connected) entities that represent a data submission to GHGA.
technology,,A Technology is an abstraction that represents the instrument used for an assay. The Technology entity captures instrument-specific attributes that are relevant for an Experiment entity. The Technology entity may be further characterized by its children where each child has fields that are relevant to that particular technology.
user,,A user in GHGA.
workflow,,A Workflow is an abstraction that represents the workflow used to perform an analysis. The Workflow entity captures workflow-specific attributes that are relevant for an Analysis entity. The Workflow entity may be further characterized by its children where each child has fields that are relevant to that particular workflow.
Expand Down
Loading

0 comments on commit 9a3989f

Please sign in to comment.