Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

working examples #17

Merged
merged 4 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"template": "https://github.com/linkml/linkml-project-cookiecutter",
"commit": "ef7ff16925321a2abdbaa5a2ba5db8aa83ebf24f",
"checkout": null,
"context": {
"cookiecutter": {
"project_name": "mixs-6-2-for-merge",
"__project_slug": "mixs_6_2_for_merge",
"github_org": "GenomicsStandardsConsortium",
"__source_path": "src/mixs_6_2_for_merge/schema/mixs_6_2_for_merge.yaml",
"project_description": "MIxS: the Minimum Information about any (X) Sequence standard",
"full_name": "Mark Andrew Miller",
"email": "[email protected]",
"__author": "Mark Andrew Miller <[email protected]>",
"license": "MIT",
"main_schema_class": "Checklist",
"create_python_classes": "Yes",
"use_schemasheets": "No",
"google_sheet_id": "1wVoaiFg47aT9YWNeRfTZ8tYHN8s8PAuDx5i2HUcDpvQ",
"google_sheet_tabs": "personinfo enums",
"__google_sheet_module": "personinfo_enums",
"github_token_for_pypi_deployment": "PYPI_PASSWORD",
"_template": "https://github.com/linkml/linkml-project-cookiecutter"
}
},
"directory": null
}
35 changes: 35 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Auto-deployment of mixs_6_2_for_merge Documentation
on:
push:
branches: [main]

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Set up Python 3.
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install Poetry.
uses: snok/[email protected]

- name: Install dependencies.
run: poetry install -E docs

- name: Build documentation.
run: |
mkdir -p docs
touch docs/.nojekyll
make gendoc
([ ! -f docs/about.md ] && cp src/docs/about.md docs/) || true
make mkd-gh-deploy

...
37 changes: 37 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Built from:
# https://docs.github.com/en/actions/guides/building-and-testing-python
# https://github.com/snok/install-poetry#workflows-and-tips
---
name: Build and test mixs_6_2_for_merge

on: [pull_request]

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]

steps:

- name: Check out repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/[email protected]

- name: Install dependencies
run: poetry install --no-interaction --no-root

- name: Install project
run: poetry install --no-interaction

- name: Run test suite
run: make test
40 changes: 40 additions & 0 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Publish Python Package

on:
release:
types: [created]

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install Poetry
run: |
pip install poetry
poetry self add "poetry-dynamic-versioning[plugin]"
# uses: snok/[email protected]
# with:
# virtualenvs-create: true
# virtualenvs-in-project: true

# - name: Install dependencies
# run: poetry install --no-interaction

- name: Build source and wheel archives
run: poetry build

- name: Publish distribution 📦 to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.idea
.idea/

/docs/
/project/docs/
/tmp/
Expand Down
8 changes: 8 additions & 0 deletions config.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LINKML_GENERATORS_PROJECT_ARGS=--config-file config.yaml

### Extra layer of configuration for Makefile beyond
### what 'gen-project --config-file config.yaml' provides.
### Uncomment and set environment variables as needed.

# LINKML_GENERATORS_MARKDOWN_ARGS=--no-mergeimports

41 changes: 41 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Configuration of generators (defaults illustrated)
---
generator_args:
excel:
mergeimports: true
owl:
mergeimports: true
metaclasses: true
type_objects: true
# throws 'Cannot handle metadata profile: rdfs'
# metadata_profile: rdfs
markdown:
mergeimports: true
graphql:
mergeimports: true
java:
mergeimports: true
metadata: true
jsonld:
mergeimports: true
jsonschema:
mergeimports: true
jsonldcontext:
mergeimports: true
python:
mergeimports: true
prefixmap:
mergeimports: true
proto:
mergeimports: true
shacl:
mergeimports: true
shex:
mergeimports: true
sqlddl:
mergeimports: true
typescript:
mergeimports: true
metadata: true

...
7 changes: 0 additions & 7 deletions examples/Checklist-001.yaml

This file was deleted.

25 changes: 25 additions & 0 deletions examples/MixsCompliantData-MimsSoil-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
mims_soil_data:
- collection_date: "2013-03-25T12:42:31+01:00"
depth: 1.234 units
elev: 1.234 units
env_broad_scale: term [ONTOLOGY:123]
env_local_scale: term [ONTOLOGY:123]
env_medium: term [ONTOLOGY:123]
geo_loc_name: "text: text, text"
lat_lon: 45.1 45.9
project_name: absolutely any text
samp_name: msd1
samp_taxon_id: Gut Metagenome [NCBITaxon:749906]
seq_meth: absolutely any text
- collection_date: "2013-03-25T12:42:31+01:00"
depth: 1.234 units
elev: 1.234 units
env_broad_scale: term [ONTOLOGY:123]
env_local_scale: term [ONTOLOGY:123]
env_medium: term [ONTOLOGY:123]
geo_loc_name: "text: text, text"
lat_lon: 45.1 45.9
project_name: absolutely any text
samp_name: msd2
samp_taxon_id: Gut Metagenome [NCBITaxon:749906]
seq_meth: absolutely any text
4 changes: 4 additions & 0 deletions project.Makefile
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
## Add your own custom Makefile targets here

# we won't need to rerun this once we agree that we are done with bulk updating
src/mixs_6_2_for_merge/schema/mixs_6_2_for_merge.yaml:
curl https://raw.githubusercontent.com/GenomicsStandardsConsortium/mixs6.2_release_candidate/main/generated-schema/mixs_6_2_rc.yaml > $@
7 changes: 0 additions & 7 deletions src/data/examples/Checklist-001.yaml

This file was deleted.

25 changes: 25 additions & 0 deletions src/data/examples/MixsCompliantData-MimsSoil-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
mims_soil_data:
- collection_date: "2013-03-25T12:42:31+01:00"
depth: 1.234 units
elev: 1.234 units
env_broad_scale: term [ONTOLOGY:123]
env_local_scale: term [ONTOLOGY:123]
env_medium: term [ONTOLOGY:123]
geo_loc_name: "text: text, text"
lat_lon: 45.1 45.9
project_name: absolutely any text
samp_name: msd1
samp_taxon_id: Gut Metagenome [NCBITaxon:749906]
seq_meth: absolutely any text
- collection_date: "2013-03-25T12:42:31+01:00"
depth: 1.234 units
elev: 1.234 units
env_broad_scale: term [ONTOLOGY:123]
env_local_scale: term [ONTOLOGY:123]
env_medium: term [ONTOLOGY:123]
geo_loc_name: "text: text, text"
lat_lon: 45.1 45.9
project_name: absolutely any text
samp_name: msd2
samp_taxon_id: Gut Metagenome [NCBITaxon:749906]
seq_meth: absolutely any text
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
undefined_slot:
- collection_date: "2013-03-25T12:42:31+01:00"
depth: 1.234 units
elev: 1.234 units
env_broad_scale: term [ONTOLOGY:123]
env_local_scale: term [ONTOLOGY:123]
env_medium: term [ONTOLOGY:123]
geo_loc_name: "text: text, text"
lat_lon: 45.1 45.9
project_name: absolutely any text
samp_name: msd1
samp_taxon_id: Gut Metagenome [NCBITaxon:749906]
seq_meth: absolutely any text
- collection_date: "2013-03-25T12:42:31+01:00"
depth: 1.234 units
elev: 1.234 units
env_broad_scale: term [ONTOLOGY:123]
env_local_scale: term [ONTOLOGY:123]
env_medium: term [ONTOLOGY:123]
geo_loc_name: "text: text, text"
lat_lon: 45.1 45.9
project_name: absolutely any text
samp_name: msd2
samp_taxon_id: Gut Metagenome [NCBITaxon:749906]
seq_meth: absolutely any text
25 changes: 25 additions & 0 deletions src/data/examples/valid/MixsCompliantData-MimsSoil-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
mims_soil_data:
- collection_date: "2013-03-25T12:42:31+01:00"
depth: 1.234 units
elev: 1.234 units
env_broad_scale: term [ONTOLOGY:123]
env_local_scale: term [ONTOLOGY:123]
env_medium: term [ONTOLOGY:123]
geo_loc_name: "text: text, text"
lat_lon: 45.1 45.9
project_name: absolutely any text
samp_name: msd1
samp_taxon_id: Gut Metagenome [NCBITaxon:749906]
seq_meth: absolutely any text
- collection_date: "2013-03-25T12:42:31+01:00"
depth: 1.234 units
elev: 1.234 units
env_broad_scale: term [ONTOLOGY:123]
env_local_scale: term [ONTOLOGY:123]
env_medium: term [ONTOLOGY:123]
geo_loc_name: "text: text, text"
lat_lon: 45.1 45.9
project_name: absolutely any text
samp_name: msd2
samp_taxon_id: Gut Metagenome [NCBITaxon:749906]
seq_meth: absolutely any text
Loading