Skip to content

Commit

Permalink
DynamicEnums and Schemasheets integration (#923)
Browse files Browse the repository at this point in the history
* first

* schemamaker

* schemasheets support integration

* schemasheets files for term set test

* unit test for schemasheets integration

* test

* add oaklib to termset

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* dynamic

* dynamic

* example for dyanmic term set unit test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* leverage oaklib to expand enums dyanmically

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* unit test for enum expansion method

* dynamic

* join error

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test

* correct prefix for cell ontology

* test skips/pyproject

* ruff

* pyproject

* fix test for enum expander

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* pyproject

* Update pyproject.toml

* Update requirements-opt.txt

* ruff

* Update pyproject.toml

* Update requirements-opt.txt

* Update requirements-min.txt

* Update requirements-doc.txt

* gallery

* yaml

* Update pyproject.toml

* value error

* quote

* Update requirements-min.txt

* Update requirements-opt.txt

* Update requirements-doc.txt

* except

* gallery

* gallery

* gallery

* ruff

* tests

* tests

* windows path resolution in termset

* fix linting errors in test_term_set

* normalize paths for cross OS tests fix

* normalize paths in missed test_enum_expander()

* notebook

* notebook

* name convention

* name convention

* Update CHANGELOG.md

* Update plot_term_set.py

* Update plot_term_set.py

* Update CHANGELOG.md

* test reqs

* test reqs

* pyproject

* gallery

* gallery

* gallery

* gallery

* gallery

* gallery

* gallery

* revert

* dynamic document clarify

* Update docs/gallery/plot_term_set.py

Co-authored-by: Oliver Ruebel <oruebel@users.noreply.github.com>

* Update src/hdmf/term_set.py

Co-authored-by: Oliver Ruebel <oruebel@users.noreply.github.com>

* Update src/hdmf/term_set.py

Co-authored-by: Oliver Ruebel <oruebel@users.noreply.github.com>

* Update src/hdmf/term_set.py

Co-authored-by: Oliver Ruebel <oruebel@users.noreply.github.com>

* fixes from review

* Update src/hdmf/term_set.py

---------

Co-authored-by: Sujay Patil <sujaysanjeev.patil@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Oliver Ruebel <oruebel@users.noreply.github.com>
  • Loading branch information
4 people authored Aug 13, 2023
1 parent be52652 commit 8376a6a
Show file tree
Hide file tree
Showing 25 changed files with 4,597 additions and 27 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# HDMF Changelog


## HDMF 3.9.0 (Upcoming)

### New features and minor improvements
- Increase raw data chunk cache size for reading HDF5 files from 1 MiB to 32 MiB. @bendichter, @rly [#925](https://github.com/hdmf-dev/hdmf/pull/925)
- Increase default chunk size for `GenericDataChunkIterator` from 1 MB to 10 MB. @bendichter, @rly [#925](https://github.com/hdmf-dev/hdmf/pull/925)
- Added the magic `__reduce__` method as well as two private semi-abstract helper methods to enable pickling of the `GenericDataChunkIterator`. @codycbakerphd [#924](https://github.com/hdmf-dev/hdmf/pull/924)
- Added Dynamic Enumerations and Schemasheets support to `TermSet`. @mavaylon1 [#923](https://github.com/hdmf-dev/hdmf/pull/923)

## HDMF 3.8.1 (July 25, 2023)

Expand Down
42 changes: 42 additions & 0 deletions docs/gallery/example_dynamic_term_set.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
id: https://w3id.org/linkml/examples/nwb_dynamic_enums
title: dynamic enums example
name: nwb_dynamic_enums
description: this schema demonstrates the use of dynamic enums

prefixes:
linkml: https://w3id.org/linkml/
CL: http://purl.obolibrary.org/obo/CL_

imports:
- linkml:types

default_range: string

# ======================== #
# CLASSES #
# ======================== #
classes:
BrainSample:
slots:
- cell_type

# ======================== #
# SLOTS #
# ======================== #
slots:
cell_type:
required: true
range: NeuronTypeEnum

# ======================== #
# ENUMS #
# ======================== #
enums:
NeuronTypeEnum:
reachable_from:
source_ontology: obo:cl
source_nodes:
- CL:0000540 ## neuron
include_self: false
relationship_types:
- rdfs:subClassOf
Loading

0 comments on commit 8376a6a

Please sign in to comment.