Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 20, 2024
1 parent 13c3ad3 commit 59a51ca
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 50 deletions.
2 changes: 1 addition & 1 deletion NEXTSTEPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ with information on where to find your NWB extension.
src: https://github.com/CodyCBakerPhD/ndx-microscopy
pip: https://pypi.org/project/ndx-microscopy/
license: MIT
maintainers:
maintainers:
- CodyCBakerPhD
```

Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ classDiagram
--------------------------------------
data : numeric, frame x height x width
--> unit : text
--------------------------------------
links
--------------------------------------
Expand All @@ -65,7 +65,7 @@ classDiagram
--> unit : text
depth_per_frame : numeric, length of frames
-- > unit : text, default="micrometers"
--------------------------------------
links
--------------------------------------
Expand All @@ -80,7 +80,7 @@ classDiagram
--------------------------------------
data : numeric, frame x height x width x depth
--> unit : text
--------------------------------------
links
--------------------------------------
Expand All @@ -96,7 +96,7 @@ classDiagram
description : text
origin_coordinates : numeric, length 3, optional
--> unit : text, default="micrometers"
--------------------------------------
attributes
--------------------------------------
Expand All @@ -111,7 +111,7 @@ classDiagram
--------------------------------------
grid_spacing : numeric, length 2, optional
--> unit : text, default="micrometers"
--------------------------------------
attributes
--------------------------------------
Expand All @@ -126,7 +126,7 @@ classDiagram
--------------------------------------
grid_spacing : numeric, length 2, optional
--> unit : text, default="micrometers"
--------------------------------------
attributes
--------------------------------------
Expand All @@ -140,7 +140,7 @@ classDiagram
datasets
--------------------------------------
description : text
--------------------------------------
attributes
--------------------------------------
Expand All @@ -164,10 +164,10 @@ classDiagram
exposure_time_in_s : numeric, optional
pulse_rate_in_Hz : numeric, optional
}
class Microscope{
<<Device>>
--------------------------------------
attributes
--------------------------------------
Expand Down
75 changes: 36 additions & 39 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,72 +1,69 @@
# -*- coding: utf-8 -*-

import os

from setuptools import setup, find_packages
from shutil import copy2

from setuptools import find_packages, setup

# load README.md/README.rst file
try:
if os.path.exists('README.md'):
with open('README.md', 'r') as fp:
if os.path.exists("README.md"):
with open("README.md", "r") as fp:
readme = fp.read()
readme_type = 'text/markdown; charset=UTF-8'
elif os.path.exists('README.rst'):
with open('README.rst', 'r') as fp:
readme_type = "text/markdown; charset=UTF-8"
elif os.path.exists("README.rst"):
with open("README.rst", "r") as fp:
readme = fp.read()
readme_type = 'text/x-rst; charset=UTF-8'
readme_type = "text/x-rst; charset=UTF-8"
else:
readme = ""
except Exception:
readme = ""

setup_args = {
'name': 'ndx-microscopy',
'version': '0.1.0',
'description': 'An example extension to demonstrate the TAB proposal for enhancements to optical physiology neurodata types.',
'long_description': readme,
'long_description_content_type': readme_type,
'author': 'Cody Baker and Alessandra Trapani',
'author_email': 'cody.baker@catalystneuro.com',
'url': '',
'license': 'MIT',
'install_requires': [
'pynwb>=1.5.0,<3',
'hdmf>=2.5.6,<4',
"name": "ndx-microscopy",
"version": "0.1.0",
"description": "An example extension to demonstrate the TAB proposal for enhancements to optical physiology neurodata types.",
"long_description": readme,
"long_description_content_type": readme_type,
"author": "Cody Baker and Alessandra Trapani",
"author_email": "cody.baker@catalystneuro.com",
"url": "",
"license": "MIT",
"install_requires": [
"pynwb>=1.5.0,<3",
"hdmf>=2.5.6,<4",
],
'packages': find_packages('src/pynwb', exclude=["tests", "tests.*"]),
'package_dir': {'': 'src/pynwb'},
'package_data': {'ndx_microscopy': [
'spec/ndx-microscopy.namespace.yaml',
'spec/ndx-microscopy.extensions.yaml',
]},
'classifiers': [
"packages": find_packages("src/pynwb", exclude=["tests", "tests.*"]),
"package_dir": {"": "src/pynwb"},
"package_data": {
"ndx_microscopy": [
"spec/ndx-microscopy.namespace.yaml",
"spec/ndx-microscopy.extensions.yaml",
]
},
"classifiers": [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License"
],
'keywords': [
'NeurodataWithoutBorders',
'NWB',
'nwb-extension',
'ndx-extension'
"License :: OSI Approved :: MIT License",
],
'zip_safe': False
"keywords": ["NeurodataWithoutBorders", "NWB", "nwb-extension", "ndx-extension"],
"zip_safe": False,
}


def _copy_spec_files(project_dir):
ns_path = os.path.join(project_dir, 'spec', 'ndx-microscopy.namespace.yaml')
ext_path = os.path.join(project_dir, 'spec', 'ndx-microscopy.extensions.yaml')
ns_path = os.path.join(project_dir, "spec", "ndx-microscopy.namespace.yaml")
ext_path = os.path.join(project_dir, "spec", "ndx-microscopy.extensions.yaml")

dst_dir = os.path.join(project_dir, 'src', 'pynwb', 'ndx_microscopy', 'spec')
dst_dir = os.path.join(project_dir, "src", "pynwb", "ndx_microscopy", "spec")
if not os.path.exists(dst_dir):
os.mkdir(dst_dir)

copy2(ns_path, dst_dir)
copy2(ext_path, dst_dir)


if __name__ == '__main__':
if __name__ == "__main__":
_copy_spec_files(os.path.dirname(__file__))
setup(**setup_args)
2 changes: 1 addition & 1 deletion spec/ndx-microscopy.namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ namespaces:
schema:
- namespace: core
- source: ndx-microscopy.extensions.yaml
version: 0.1.0
version: 0.1.0

0 comments on commit 59a51ca

Please sign in to comment.