Skip to content

Commit

Permalink
Merge branch 'dev' into herd_update
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 authored Dec 12, 2023
2 parents fd72d73 + b575e50 commit 186a839
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_external_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 0 # tags are required to determine the version

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11' # TODO update to 3.12 when optional reqs (e.g., oaklib) support 3.12

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fetch-depth: 0 # tags are required for versioneer to determine the version

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.12'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_all_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
fetch-depth: 0 # tags are required to determine the version

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

Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
fetch-depth: 0 # tags are required to determine the version

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
fetch-depth: 0 # tags are required to determine the version

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_hdmf_zarr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 0 # tags are required to determine the version

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10' # use 3.10 until hdmf-zarr updates versioneer.py which breaks on newer python

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_pynwb_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 0 # tags are required to determine the version

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.12'

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
fetch-depth: 0 # tags are required to determine the version

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

Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
fetch-depth: 0 # tags are required to determine the version

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

Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
fetch-depth: 0 # tags are required to determine the version

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.12'

Expand Down
14 changes: 13 additions & 1 deletion src/hdmf/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from abc import abstractmethod
from collections import OrderedDict
from copy import deepcopy
from typing import Type
from uuid import uuid4
from warnings import warn

Expand Down Expand Up @@ -746,7 +747,18 @@ def __smart_str_dict(d, num_indent):
out += '\n' + indent + right_br
return out

def set_data_io(self, dataset_name, data_io_class, **kwargs):
def set_data_io(self, dataset_name: str, data_io_class: Type[DataIO], **kwargs) -> None:
"""
Parameters
----------
dataset_name: str
Name of dataset to wrap in DataIO
data_io_class: Type[DataIO]
Class to use for DataIO, e.g. H5DataIO or ZarrDataIO
**kwargs:
kwargs are passed to the constructor of the DataIO class
"""
data = self.fields.get(dataset_name)
if data is None:
raise ValueError(f"{dataset_name} is None and cannot be wrapped in a DataIO class")
Expand Down

0 comments on commit 186a839

Please sign in to comment.