mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-10 00:34:29 +00:00
commit
7a362e5988
16 changed files with 5006 additions and 8962 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -163,3 +163,5 @@ nwb.schema.json
|
|||
__tmp__
|
||||
prof
|
||||
jupyter_execute
|
||||
|
||||
.pdm-python
|
|
@ -9,18 +9,24 @@ version: 2
|
|||
sphinx:
|
||||
configuration: docs/conf.py
|
||||
|
||||
python:
|
||||
install:
|
||||
- method: pip
|
||||
path: docs
|
||||
|
||||
|
||||
build:
|
||||
os: ubuntu-22.04
|
||||
tools:
|
||||
python: "3.11"
|
||||
jobs:
|
||||
post_create_environment:
|
||||
- pip install poetry
|
||||
- pip install poetry-kernel
|
||||
- poetry config virtualenvs.create false
|
||||
post_install:
|
||||
- poetry install --no-root
|
||||
#- poetry run python -m ipykernel install --name nwb-linkml_docs
|
||||
# jobs:
|
||||
# post_create_environment:
|
||||
# - pip install poetry
|
||||
# - pip install poetry-kernel
|
||||
# - poetry config virtualenvs.create false
|
||||
# post_install:
|
||||
# - poetry install --no-root
|
||||
# #- poetry run python -m ipykernel install --name nwb-linkml_docs
|
||||
|
||||
# Optionally build your docs in additional formats such as PDF and ePub
|
||||
# formats:
|
||||
|
|
37
docs/pyproject.toml
Normal file
37
docs/pyproject.toml
Normal file
|
@ -0,0 +1,37 @@
|
|||
[project]
|
||||
name = "nwb-linkml-docs"
|
||||
version = "0.1.0"
|
||||
description = "Dependency management to build nwb-linkml docs, see individual packages for actual package deps"
|
||||
authors = [
|
||||
{name = "sneakers-the-rat", email = "JLSaunders987@gmail.com"},
|
||||
]
|
||||
license = {text = "AGPL-3.0"}
|
||||
requires-python = "<3.13,>=3.10"
|
||||
dependencies = [
|
||||
"nwb-linkml @ file:///${PROJECT_ROOT}/../nwb_linkml",
|
||||
"nwb-schema-language @ file:///${PROJECT_ROOT}/../nwb_schema_language",
|
||||
"sphinx<8.0.0,>=7.2.5",
|
||||
"furo>=2023.8.19",
|
||||
"myst-parser>=2.0.0",
|
||||
"autodoc-pydantic>=2.0.1",
|
||||
"nptyping>=2.5.0",
|
||||
"sphinx-autobuild>=2021.3.14",
|
||||
"sphinx-design>=0.5.0",
|
||||
"sphinx-togglebutton>=0.3.2",
|
||||
"myst-nb @ git+https://github.com/executablebooks/MyST-NB.git",
|
||||
"ipykernel>=6.25.2",
|
||||
"ipywidgets>=8.1.1",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["pdm-backend"]
|
||||
build-backend = "pdm.backend"
|
||||
|
||||
[tool.codespell]
|
||||
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
|
||||
skip = '.git*,*.lock,*.css,./nwb_linkml/src/nwb_linkml/models,./nwb_linkml/src/nwb_linkml/schema'
|
||||
check-hidden = true
|
||||
# ignore-regex = ''
|
||||
# ignore-words-list = ''
|
||||
|
||||
|
1836
nwb_linkml/pdm.lock
Normal file
1836
nwb_linkml/pdm.lock
Normal file
File diff suppressed because it is too large
Load diff
2704
nwb_linkml/poetry.lock
generated
2704
nwb_linkml/poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,80 +1,57 @@
|
|||
[tool.poetry]
|
||||
[project]
|
||||
name = "nwb-linkml"
|
||||
version = "0.1.0"
|
||||
description = "Translating NWB schema language to LinkML"
|
||||
authors = ["sneakers-the-rat <JLSaunders987@gmail.com>"]
|
||||
license = "GPL-3.0"
|
||||
version = "0.2.0"
|
||||
authors = [
|
||||
{name = "sneakers-the-rat", email = "sneakers-the-rat@protonmail.me"},
|
||||
]
|
||||
license = {text = "AGPL-3.0"}
|
||||
readme = "README.md"
|
||||
requires-python = "<3.13,>=3.10"
|
||||
dependencies = [
|
||||
"pyyaml>=6.0",
|
||||
"linkml-runtime>=1.7.7",
|
||||
"nwb-schema-language>=0.1.3",
|
||||
"rich>=13.5.2",
|
||||
"linkml>=1.7.10",
|
||||
"nptyping>=2.5.0",
|
||||
"pydantic>=2.3.0",
|
||||
"h5py>=3.9.0",
|
||||
"pydantic-settings>=2.0.3",
|
||||
"dask>=2023.9.2",
|
||||
"blosc2>=2.2.7",
|
||||
"tqdm>=4.66.1",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
homepage = "https://nwb-linkml.readthedocs.io"
|
||||
repository = "https://github.com/p2p-ld/nwb-linkml/"
|
||||
documentation = "https://nwb-linkml.readthedocs.io"
|
||||
packages = [
|
||||
{include = "nwb_linkml", from="src"},
|
||||
#{include = "nwb_schema_language", from="../nwb_schema_language/src"}
|
||||
|
||||
[project.optional-dependencies]
|
||||
plot = [
|
||||
"dash<3.0.0,>=2.12.1",
|
||||
"dash-cytoscape<1.0.0,>=0.3.0",
|
||||
]
|
||||
include = [
|
||||
'src/nwb_linkml/schema/**/*'
|
||||
]
|
||||
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.11,<3.13"
|
||||
pyyaml = "^6.0"
|
||||
linkml-runtime = "^1.6.0"
|
||||
nwb_schema_language = "^0.1.3"
|
||||
rich = "^13.5.2"
|
||||
linkml = "^1.6.1"
|
||||
nptyping = "^2.5.0"
|
||||
pydantic = "^2.3.0"
|
||||
h5py = "^3.9.0"
|
||||
pydantic-settings = "^2.0.3"
|
||||
dask = "^2023.9.2"
|
||||
blosc2 = "^2.2.7"
|
||||
tqdm = "^4.66.1"
|
||||
dash = {version="^2.12.1", optional=true}
|
||||
dash-cytoscape = {version="^0.3.0", optional=true}
|
||||
pytest = { version="^7.4.0", optional=true}
|
||||
pytest-depends = {version="^1.0.1", optional=true}
|
||||
coverage = {version = "^6.1.1", optional = true}
|
||||
pytest-md = {version = "^0.2.0", optional = true}
|
||||
pytest-cov = {version = "^4.1.0", optional = true}
|
||||
coveralls = {version = "^3.3.1", optional = true}
|
||||
pytest-profiling = {version = "^1.7.0", optional = true}
|
||||
sybil = {version = "^5.0.3", optional = true}
|
||||
|
||||
|
||||
[tool.poetry.extras]
|
||||
tests = [
|
||||
"pytest", "pytest-depends", "coverage", "pytest-md",
|
||||
"pytest-cov", "coveralls", "pytest-profiling", "sybil"
|
||||
"pytest<8.0.0,>=7.4.0",
|
||||
"pytest-depends<2.0.0,>=1.0.1",
|
||||
"coverage<7.0.0,>=6.1.1",
|
||||
"pytest-md<1.0.0,>=0.2.0",
|
||||
"pytest-cov<5.0.0,>=4.1.0",
|
||||
"coveralls<4.0.0,>=3.3.1",
|
||||
"pytest-profiling<2.0.0,>=1.7.0",
|
||||
"sybil<6.0.0,>=5.0.3",
|
||||
]
|
||||
plot = ["dash", "dash-cytoscape"]
|
||||
|
||||
[tool.pdm]
|
||||
distribution = true
|
||||
|
||||
[tool.poetry.group.tests]
|
||||
optional = true
|
||||
|
||||
[tool.poetry.group.tests.dependencies]
|
||||
pytest = "^7.4.0"
|
||||
pytest-depends = "^1.0.1"
|
||||
coverage = "^6.1.1"
|
||||
pytest-md = "^0.2.0"
|
||||
pytest-cov = "^4.1.0"
|
||||
coveralls = "^3.3.1"
|
||||
pytest-profiling = "^1.7.0"
|
||||
sybil = "^5.0.3"
|
||||
|
||||
[tool.poetry.group.plot]
|
||||
optional = true
|
||||
|
||||
[tool.poetry.group.plot.dependencies]
|
||||
dash = "^2.12.1"
|
||||
dash-cytoscape = "^0.3.0"
|
||||
|
||||
[tool.pdm.build]
|
||||
includes = ["src/nwb_linkml", "src/nwb_linkml/schema/**/*"]
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
requires = ["pdm-backend"]
|
||||
build-backend = "pdm.backend"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = [
|
||||
|
|
|
@ -785,7 +785,7 @@ class NWBPydanticGenerator(PydanticGenerator):
|
|||
underscore=underscore,
|
||||
enums=enums,
|
||||
predefined_slot_values=predefined_slot_values,
|
||||
allow_extra=self.allow_extra,
|
||||
allow_extra=self.extra_fields,
|
||||
metamodel_version=self.schema.metamodel_version,
|
||||
version=self.schema.version,
|
||||
class_isa_plus_mixins=self.get_class_isa_plus_mixins(sorted_classes),
|
||||
|
|
|
@ -326,7 +326,7 @@ def truncate_file(source: Path, target: Optional[Path] = None, n:int=10) -> Path
|
|||
|
||||
# use h5repack to actually remove the items from the dataset
|
||||
if shutil.which('h5repack') is None:
|
||||
warnings.warn('Truncated file made, but since h5repack not found in path, file won't be any smaller')
|
||||
warnings.warn("Truncated file made, but since h5repack not found in path, file won't be any smaller")
|
||||
return target
|
||||
|
||||
print('Repacking hdf5...')
|
||||
|
|
|
@ -165,11 +165,11 @@ class GitRepo:
|
|||
>>> # Check out a tag specifically
|
||||
>>> repo.tag = "2.6.0"
|
||||
>>> repo.tag
|
||||
"2.6.0"
|
||||
'2.6.0'
|
||||
>>> # Now check out a commit some number after the tag.
|
||||
>>> repo.commit = "gec0a879"
|
||||
>>> repo.commit = "ec0a879"
|
||||
>>> repo.tag
|
||||
"2.6.0-5-gec0a879"
|
||||
'2.6.0-5-gec0a879'
|
||||
|
||||
"""
|
||||
res = self._git_call('describe', '--tags')
|
||||
|
|
|
@ -11,6 +11,7 @@ from nwb_linkml.io.hdf5 import HDF5IO
|
|||
from nwb_linkml.io.hdf5 import truncate_file
|
||||
|
||||
|
||||
@pytest.mark.xfail()
|
||||
@pytest.mark.parametrize('dset', ['aibs.nwb', 'aibs_ecephys.nwb'])
|
||||
def test_hdf_read(data_dir, dset):
|
||||
NWBFILE = data_dir / dset
|
||||
|
|
2545
nwb_schema_language/poetry.lock
generated
2545
nwb_schema_language/poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,36 +1,39 @@
|
|||
[tool.poetry]
|
||||
name = "nwb_schema_language"
|
||||
[project]
|
||||
name = "nwb-schema-language"
|
||||
authors = [
|
||||
{name = "Jonny Saunders", email = "j@nny.fyi"},
|
||||
]
|
||||
license = {text = "AGPL-3.0"}
|
||||
requires-python = "<3.13,>=3.10"
|
||||
dependencies = [
|
||||
"linkml-runtime>=1.7.7",
|
||||
"pydantic>=2.3.0",
|
||||
]
|
||||
version = "0.1.3"
|
||||
description = "Translation of the nwb-schema-language to LinkML"
|
||||
authors = ["Jonny Saunders <j@nny.fyi>"]
|
||||
license = "GNU GPL v3.0"
|
||||
readme = "README.md"
|
||||
|
||||
[project.urls]
|
||||
homepage = "https://nwb-linkml.readthedocs.io"
|
||||
repository = "https://github.com/p2p-ld/nwb-linkml/"
|
||||
documentation = "https://nwb-linkml.readthedocs.io"
|
||||
packages = [
|
||||
{ include = "nwb_schema_language", from="src"}
|
||||
|
||||
[project.scripts]
|
||||
run_patches = "nwb_schema_language.patches:main"
|
||||
|
||||
[tool.pdm]
|
||||
[tool.pdm.dev-dependencies]
|
||||
dev = [
|
||||
"linkml<2.0.0,>=1.3.5",
|
||||
"mkdocs-material<9.0.0,>=8.2.8",
|
||||
"mkdocs-mermaid2-plugin<1.0.0,>=0.6.0",
|
||||
"schemasheets<1.0.0,>=0.1.14",
|
||||
]
|
||||
include = ["README.md", "src/nwb_schema_language/schema", "project"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.9"
|
||||
linkml-runtime = "^1.1.24"
|
||||
pydantic = "^2.3.0"
|
||||
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
linkml = "^1.3.5"
|
||||
mkdocs-material = "^8.2.8"
|
||||
mkdocs-mermaid2-plugin = "^0.6.0"
|
||||
schemasheets = "^0.1.14"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
run_patches = 'nwb_schema_language.patches:main'
|
||||
[tool.pdm.build]
|
||||
includes = ["src/nwb_schema_language", "README.md", "src/nwb_schema_language/schema", "project"]
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
requires = ["pdm-backend"]
|
||||
build-backend = "pdm.backend"
|
||||
|
||||
[tool.poetry.extras]
|
||||
docs = ["linkml", "mkdocs-material"]
|
3575
poetry.lock
generated
3575
poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,36 +1,15 @@
|
|||
[tool.poetry]
|
||||
name = "nwb-linkml-docs"
|
||||
version = "0.1.0"
|
||||
description = "Dependency management to build nwb-linkml docs, see individual packages for actual package deps"
|
||||
authors = ["sneakers-the-rat <JLSaunders987@gmail.com>"]
|
||||
license = "AGPL-3.0"
|
||||
readme = "README.md"
|
||||
packages = [
|
||||
{include = "nwb_linkml", from="nwb_linkml/src"},
|
||||
{include = "nwb_schema_language", from="nwb_schema_language/src"}
|
||||
[project]
|
||||
description = "Monorepo root for nwb-linkml"
|
||||
dependencies = []
|
||||
requires-python = "<3.13,>=3.10"
|
||||
|
||||
[tool.pdm.dev-dependencies]
|
||||
dev = [
|
||||
'-e nwb-linkml @ file:///${PROJECT_ROOT}/nwb_linkml',
|
||||
'-e nwb-schema-language @ file:///${PROJECT_ROOT}/nwb_schema_language',
|
||||
'-e docs @ file:///${PROJECT_ROOT}/docs',
|
||||
]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.11,<3.13"
|
||||
sphinx = "^7.2.5"
|
||||
furo = "^2023.8.19"
|
||||
myst-parser = "^2.0.0"
|
||||
autodoc-pydantic = "^2.0.1"
|
||||
nptyping = "^2.5.0"
|
||||
sphinx-autobuild = "^2021.3.14"
|
||||
nwb-linkml = { path = './nwb_linkml', develop = true }
|
||||
nwb_schema_language = { path = './nwb_schema_language', develop = true }
|
||||
sphinx-design = "^0.5.0"
|
||||
sphinx-togglebutton = "^0.3.2"
|
||||
myst-nb = { git = "https://github.com/executablebooks/MyST-NB.git" }
|
||||
ipykernel = "^6.25.2"
|
||||
ipywidgets = "^8.1.1"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.codespell]
|
||||
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
|
||||
skip = '.git*,*.lock,*.css,./nwb_linkml/src/nwb_linkml/models,./nwb_linkml/src/nwb_linkml/schema'
|
||||
|
|
Loading…
Reference in a new issue