Skip to content

Commit

Permalink
gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 committed Dec 12, 2023
1 parent ae6494b commit 12132dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/gallery/plot_external_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def __init__(self, **kwargs):
# the underlying data structures accordingly.

data = Data(name="species", data=['Homo sapiens', 'Mus musculus'])
data.parent = file
herd.add_ref(
file=file,
container=data,
Expand Down Expand Up @@ -157,6 +158,7 @@ def __init__(self, **kwargs):
genotypes = DynamicTable(name='genotypes', description='My genotypes')
genotypes.add_column(name='genotype_name', description="Name of genotypes")
genotypes.add_row(id=0, genotype_name='Rorb')
genotypes.parent = file
herd.add_ref(
file=file,
container=genotypes,
Expand Down Expand Up @@ -288,7 +290,6 @@ def __init__(self, **kwargs):

# Let's create a new instance of :py:class:`~hdmf.common.resources.HERD`.
herd = HERD()
file = HERDManagerContainer(name='file')

data = Data(
name='data_name',
Expand All @@ -297,6 +298,7 @@ def __init__(self, **kwargs):
dtype=[('species', 'U14'), ('age', 'i4'), ('weight', 'f4')]
)
)
data.parent = file

herd.add_ref(
file=file,
Expand All @@ -318,8 +320,7 @@ def __init__(self, **kwargs):
# :py:func:`~hdmf.common.resources.HERD.add_ref_termset` has many optional fields,
# giving the user a range of control when adding references. Let's see an example.
herd = HERD()
terms = TermSet(term_schema_path='example_term_set.yaml')
file = HERDManagerContainer(name='file')
terms = TermSet(term_schema_path='docs/gallery/example_term_set.yaml')

herd.add_ref_termset(file=file,
container=species,
Expand All @@ -340,8 +341,7 @@ def __init__(self, **kwargs):
# :py:class:`~hdmf.term_set.TermSet` or remove them from the dataset.

herd = HERD()
terms = TermSet(term_schema_path='example_term_set.yaml')
file = HERDManagerContainer(name='file')
terms = TermSet(term_schema_path='docs/gallery/example_term_set.yaml')

herd.add_ref_termset(file=file,
container=species,
Expand Down

0 comments on commit 12132dc

Please sign in to comment.