Skip to content

Commit

Permalink
Merge pull request #319 from geneontology/json-export
Browse files Browse the repository at this point in the history
Shex for Standard Annotations
  • Loading branch information
tmushayahama authored Aug 23, 2024
2 parents 1b44cff + 9a5d31f commit dab8c67
Show file tree
Hide file tree
Showing 54 changed files with 3,584 additions and 2,048 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gen-project-linkml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- name: Check out repository
uses: actions/checkout@v2

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

#----------------------------------------------
# install & configure poetry
Expand Down
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

Using RDF Shapes to define the schema of Gene Ontology Causal Activity Models


# Schema

See [shapes/go-cam-shapes.shex](shapes/go-cam-shapes.shex)
Expand Down
138 changes: 138 additions & 0 deletions python/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
6 changes: 3 additions & 3 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ f-%: tests/data/f-%.ttl
python ./gocam_validator.py $< && exit -1 || echo FAILED AS EXPECTED

gen-python:
rm -f shex_json_linkml.py && gen-python schema/shex_json_linkml.yaml > shex_json_linkml.py
rm -f shex_json_linkml.py && gen-python schema/shex_term_metadata_json_linkml.yaml > shex_term_metadata_json_linkml.py

#gen-pydantic:
# rm -f shex_json_linkml.py && gen-pydantic schema/shex_json_linkml.yaml > shex_json_linkml.py

gen-jsonschema:
rm -f target/jsonschema/shex_json_linkml.json && gen-json-schema schema/shex_json_linkml.yaml > target/jsonschema/shex_json_linkml.json
rm -f target/jsonschema/shex_terms_metadata_json_linkml.json && gen-json-schema schema/shex_terms_metadata_json_linkml.yaml > target/jsonschema/shex_terms_metadata_json_linkml.json

gen-typescript:
rm -f target/typescript/shex_json_linkml.ts && gen-typescript schema/shex_json_linkml.yaml > target/typescript/shex_json_linkml.ts
rm -f target/typescript/shex_terms_metadata_json_linkml.ts && gen-typescript schema/shex_terms_metadata_json_linkml.yaml > target/typescript/shex_terms_metadata_json_linkml.ts

linkml: gen-python gen-jsonschema gen-typescript

Expand Down
Loading

0 comments on commit dab8c67

Please sign in to comment.