mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-12 17:54:29 +00:00
starts
This commit is contained in:
parent
26242054e8
commit
a69388ffb5
6 changed files with 4177 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -158,3 +158,5 @@ cython_debug/
|
|||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
nwb.schema.json
|
||||
|
|
21
README.md
21
README.md
|
@ -1,2 +1,23 @@
|
|||
# translate-nwb
|
||||
Translating NWB schema language to linkml
|
||||
|
||||
The [nwb specification language](https://schema-language.readthedocs.io/en/latest/description.html)
|
||||
has several components
|
||||
|
||||
- Namespaces: subcollections of specifications
|
||||
- Groups:
|
||||
|
||||
We want to translate the schema to LinkML so that we can export to other schema formats,
|
||||
generate code for dealing with the data, and ultimately make it interoperable
|
||||
with other formats.
|
||||
|
||||
To do that, we need to map:
|
||||
- Namespaces: seem to operate like separate schema? Then within a namespace the
|
||||
rest are top-level objects
|
||||
- Inheritance: NWB has an odd inheritance system, where the same syntax is used for
|
||||
inheritance, mixins, type declaration, and inclusion.
|
||||
- `neurodata_type_inc` -> `is_a`
|
||||
- Groups:
|
||||
- Slots: Lots of properties are reused in the nwb spec, and LinkML lets us separate these out as slots
|
||||
- dims, shape, and dtypes: these should have been just attributes rather than put in the spec
|
||||
language, so we'll just make an Array class and use that.
|
4131
poetry.lock
generated
Normal file
4131
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
19
pyproject.toml
Normal file
19
pyproject.toml
Normal file
|
@ -0,0 +1,19 @@
|
|||
[tool.poetry]
|
||||
name = "translate-nwb"
|
||||
version = "0.1.0"
|
||||
description = "Translating NWB schema language to LinkML"
|
||||
authors = ["sneakers-the-rat <JLSaunders987@gmail.com>"]
|
||||
license = "GPL-3.0"
|
||||
readme = "README.md"
|
||||
packages = [{include = "translate_nwb"}]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.9"
|
||||
schema-automator = "^0.3.0"
|
||||
pydantic = "<2.0"
|
||||
pyyaml = "^6.0"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
0
translate_nwb/__init__.py
Normal file
0
translate_nwb/__init__.py
Normal file
4
translate_nwb/constants.py
Normal file
4
translate_nwb/constants.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
NWB_SCHEMA_REPO = "https://github.com/NeurodataWithoutBorders/nwb-schema/"
|
||||
JSON_SCHEMA = "nwb.schema.json"
|
||||
SCHEMA_DIR = 'core/'
|
||||
ROOT_NAMESPACE = 'core/nwb.namespace.yaml'
|
Loading…
Reference in a new issue