-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from VisLab/main
Added setup to allow unit tests to run on github
- Loading branch information
Showing
5 changed files
with
87 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[wheel] | ||
universal = 1 | ||
|
||
[flake8] | ||
max-line-length = 120 | ||
max-complexity = 17 | ||
exclude = | ||
.git, | ||
.tox, | ||
__pycache__, | ||
build/, | ||
dist/, | ||
docs/source/conf.py | ||
versioneer.py | ||
per-file-ignores = | ||
src/pynwb/tests/test_example_usage.py:T001 | ||
|
||
|
||
[metadata] | ||
description-file = README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
|
||
from setuptools import setup, find_packages | ||
from shutil import copy2 | ||
|
||
# load README.md/README.rst file | ||
try: | ||
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 = fp.read() | ||
readme_type = 'text/x-rst; charset=UTF-8' | ||
else: | ||
readme = "" | ||
except Exception: | ||
readme = "" | ||
|
||
setup_args = { | ||
'name': 'ndx-hed', | ||
'version': '0.1.0', | ||
'description': 'NWB extension for storing HED annotations in VectorData format.', | ||
'long_description': readme, | ||
'long_description_content_type': readme_type, | ||
'author': 'Ryan Ly, Kay Robbins', | ||
'author_email': '[email protected], [email protected]', | ||
'url': 'https://github.com/hed-standard/ndx-hed', | ||
'license': 'BSD 3-Clause', | ||
'install_requires': [ | ||
'pynwb>=1.1.2' | ||
], | ||
'packages': find_packages('src/pynwb'), | ||
'package_dir': {'': 'src/pynwb'}, | ||
'package_data': {'ndx_hed': [ | ||
'spec/ndx-hed.namespace.yaml', | ||
'spec/ndx-hed.extensions.yaml', | ||
]}, | ||
'classifiers': [ | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
], | ||
'zip_safe': False | ||
} | ||
|
||
|
||
def _copy_spec_files(project_dir): | ||
ns_path = os.path.join(project_dir, 'spec', 'ndx-hed.namespace.yaml') | ||
ext_path = os.path.join(project_dir, 'spec', 'ndx-hed.extensions.yaml') | ||
|
||
dst_dir = os.path.join(project_dir, 'src', 'pynwb', 'ndx_hed', '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__': | ||
_copy_spec_files(os.path.dirname(__file__)) | ||
setup(**setup_args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters