Skip to content

Commit f9eb96b

Browse files
authored
Merge pull request #24 from CBroz1/main
blackify
2 parents 7de5734 + 45c13a9 commit f9eb96b

File tree

6 files changed

+51
-33
lines changed

6 files changed

+51
-33
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
44

5-
## [unreleased]
5+
## [0.1.1] - 2022-05-10
66
### Added
77
+ NWB export
88
+ Shorten subject primary key to varchar(8)
9+
+ Adopted black formatting into code base
910

1011
## [0.1.0b0] - 2021-05-07
1112
### Added

element_animal/export/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .nwb import subject_to_nwb
1+
from .nwb import subject_to_nwb

element_animal/genotyping.py

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
schema = dj.schema()
88

99

10-
def activate(genotyping_schema_name, subject_schema_name=None,
11-
create_schema=True, create_tables=True, linking_module=None):
10+
def activate(
11+
genotyping_schema_name,
12+
subject_schema_name=None,
13+
create_schema=True,
14+
create_tables=True,
15+
linking_module=None,
16+
):
1217
"""
1318
activate(genotyping_schema_name, subject_schema_name=None,
1419
create_schema=True, create_tables=True, linking_module=None)
@@ -33,15 +38,22 @@ def activate(genotyping_schema_name, subject_schema_name=None,
3338
"""
3439
if isinstance(linking_module, str):
3540
linking_module = importlib.import_module(linking_module)
36-
assert inspect.ismodule(linking_module), "The argument 'dependency' must "\
37-
+ "be a module's name or a module"
38-
39-
subject.activate(subject_schema_name, create_schema=create_schema,
40-
create_tables=create_tables,
41-
linking_module=linking_module)
42-
schema.activate(genotyping_schema_name, create_schema=create_schema,
43-
create_tables=create_tables,
44-
add_objects=linking_module.__dict__)
41+
assert inspect.ismodule(linking_module), (
42+
"The argument 'dependency' must " + "be a module's name or a module"
43+
)
44+
45+
subject.activate(
46+
subject_schema_name,
47+
create_schema=create_schema,
48+
create_tables=create_tables,
49+
linking_module=linking_module,
50+
)
51+
schema.activate(
52+
genotyping_schema_name,
53+
create_schema=create_schema,
54+
create_tables=create_tables,
55+
add_objects=linking_module.__dict__,
56+
)
4557

4658

4759
@schema

element_animal/subject.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
schema = dj.schema()
77

88

9-
def activate(schema_name, *, create_schema=True, create_tables=True,
10-
linking_module=None):
9+
def activate(
10+
schema_name, *, create_schema=True, create_tables=True, linking_module=None
11+
):
1112
"""
1213
activate(schema_name, *, create_schema=True, create_tables=True,
1314
linking_module=None)
@@ -30,12 +31,16 @@ def activate(schema_name, *, create_schema=True, create_tables=True,
3031
"""
3132
if isinstance(linking_module, str):
3233
linking_module = importlib.import_module(linking_module)
33-
assert inspect.ismodule(linking_module), "The argument 'dependency' must "\
34-
+ "be a module's name or a module"
35-
36-
schema.activate(schema_name, create_schema=create_schema,
37-
create_tables=create_tables,
38-
add_objects=linking_module.__dict__)
34+
assert inspect.ismodule(linking_module), (
35+
"The argument 'dependency' must " + "be a module's name or a module"
36+
)
37+
38+
schema.activate(
39+
schema_name,
40+
create_schema=create_schema,
41+
create_tables=create_tables,
42+
add_objects=linking_module.__dict__,
43+
)
3944

4045

4146
@schema

element_animal/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""Package metadata."""
2-
__version__ = '0.1.0b0'
2+
__version__ = "0.1.1"

setup.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@
22
from setuptools import setup, find_packages
33
from os import path
44

5-
pkg_name = next(p for p in find_packages() if '.' not in p)
5+
pkg_name = next(p for p in find_packages() if "." not in p)
66
here = path.abspath(path.dirname(__file__))
77

8-
with open(path.join(here, 'README.md'), 'r') as f:
8+
with open(path.join(here, "README.md"), "r") as f:
99
long_description = f.read()
1010

11-
with open(path.join(here, 'requirements.txt')) as f:
11+
with open(path.join(here, "requirements.txt")) as f:
1212
requirements = f.read().splitlines()
1313

14-
with open(path.join(here, pkg_name, 'version.py')) as f:
14+
with open(path.join(here, pkg_name, "version.py")) as f:
1515
exec(f.read())
1616

1717
setup(
18-
name=pkg_name.replace('_', '-'),
18+
name=pkg_name.replace("_", "-"),
1919
version=__version__,
2020
description="DataJoint Element for Animal Management",
2121
long_description=long_description,
22-
long_description_content_type='text/markdown',
23-
author='DataJoint',
24-
author_email='[email protected]',
25-
license='MIT',
22+
long_description_content_type="text/markdown",
23+
author="DataJoint",
24+
author_email="[email protected]",
25+
license="MIT",
2626
url=f'https://github.com/datajoint/{pkg_name.replace("_", "-")}',
27-
keywords='neuroscience animal-management datajoint',
28-
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
27+
keywords="neuroscience animal-management datajoint",
28+
packages=find_packages(exclude=["contrib", "docs", "tests*"]),
2929
install_requires=requirements,
3030
)

0 commit comments

Comments
 (0)