Skip to content
This repository has been archived by the owner. It is now read-only.

Commit 1874fc9

Browse files
committed
Changes to release v0.4.1 on PyPI
1 parent d1ac81f commit 1874fc9

5 files changed

Lines changed: 99 additions & 80 deletions

File tree

MANIFEST.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,67 @@
1-
[Getting started](#getting-started) |
1+
[Getting Started](#getting-started) |
22
[Releases](#releases) |
33
[Status](#status)
44

55
# NeuroAnnotation Toolbox (NAT)
66

7-
Python package to use the annotations created with [NeuroCurator](https://github.com/BlueBrain/neurocurator), for example in a [Jupyter](https://jupyter.org/) notebook.
7+
Python module to use the annotations created with
8+
[NeuroCurator](https://github.com/BlueBrain/neurocurator), for example in a
9+
[Jupyter](https://jupyter.org/) notebook.
810

9-
This framework has been described in details in the following open-access paper: https://doi.org/10.3389/fninf.2017.00027.
11+
This framework has been described in details in the following open-access
12+
paper: https://doi.org/10.3389/fninf.2017.00027.
1013

11-
NAT provides the necessary functions and utilities to reliably annotate the neuroscientific literature, curate published values for modeling parameters, and save them in reusable corpora.
14+
NAT provides the necessary functions and utilities to:
15+
- reliably annotate the neuroscientific literature,
16+
- curate published values for modeling parameters,
17+
- save them in reusable corpora.
1218

1319
---
1420

15-
## Getting started
21+
## Getting Started
1622

17-
Install the latest version with:
18-
```
19-
pip install git+https://github.com/BlueBrain/nat
20-
```
23+
**Requirements:**
2124

22-
Install a specific version with:
23-
```
24-
pip install git+https://github.com/BlueBrain/nat.git@<tag>
25-
```
26-
(ex. '@v0.4.0')
25+
System side:
26+
27+
- [Git 1.7.0+](https://git-scm.com/downloads)
28+
- [ImageMagick 6](http://docs.wand-py.org/en/latest/guide/install.html)
2729

28-
NB: You don't need to install NAT to use a packaged executable of NeuroCurator.
30+
Python side:
31+
32+
- [Beautiful Soup 4](https://www.crummy.com/software/BeautifulSoup/)
33+
- [GitPython](https://gitpython.readthedocs.io)
34+
- [lxml](http://lxml.de)
35+
- [NumPy](http://www.numpy.org)
36+
- [pandas](https://pandas.pydata.org)
37+
- [parse](https://pypi.python.org/pypi/parse)
38+
- [Pyzotero](https://pyzotero.readthedocs.io)
39+
- [quantities](https://python-quantities.readthedocs.io)
40+
- [SciPy](https://www.scipy.org/scipylib/index.html)
41+
- [Wand](http://docs.wand-py.org)
42+
43+
**Installation:**
44+
45+
```bash
46+
pip install nat
47+
```
2948

3049
## Releases
3150

32-
In the [dedicated section](https://github.com/BlueBrain/nat/releases/), you can find:
33-
- the latest version,
34-
- the notable changes of each version.
51+
Versions and their notable changes are listed in the
52+
[releases section](https://github.com/BlueBrain/nat/releases/).
3553

3654
Releases are synchronized with the ones of NeuroCurator.
3755

3856
## Status
3957

4058
Created during 2016.
4159

42-
Ongoing reengineering in the branch _refactor-architecture_.
60+
Ongoing stabilization and reengineering in the branch _refactor-architecture_.
4361

4462
The branch _refactor-architecture_ is **not** intended to be used by end-users.
4563

4664
New features, bug fixes and improvements are done on the reengineered code sections.
4765

48-
When a reengineered code section is stable, it's merged into the branch _master_ and a release is published.
66+
When a reengineered code section is stable, it's merged into the branch
67+
_master_ and a release is published.

nat/zotero_wrap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ class ZoteroWrap:
1717
CACHE_REFERENCE_TYPES = "reference_types"
1818
CACHE_REFERENCE_TEMPLATES = "reference_templates"
1919

20-
def __init__(self, library_id, library_type, api_key, working_directory):
20+
def __init__(self, library_id, library_type, api_key, directory):
2121
cache_filename = "{}-{}-{}.pkl".format(library_id, library_type, api_key)
22-
self.cache_path = os.path.join(working_directory, cache_filename)
22+
self.cache_path = os.path.join(directory, cache_filename)
2323
# reference_types and reference_templates must have the same ordering.
2424
self.reference_types = []
2525
self.reference_templates = {}

setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.py

Lines changed: 58 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,66 @@
1-
from distutils.core import setup
1+
__authors__ = ["Pierre-Alexandre Fonta", "Christian O'Reilly"]
2+
__maintainer__ = "Pierre-Alexandre Fonta"
3+
24
import os
35

4-
PACKAGE = "nat"
5-
NAME = "nat"
6-
DESCRIPTION = open(os.path.join(os.path.dirname(__file__), "README.md")).read()
7-
AUTHOR = "Christian O'Reilly, Pierre-Alexandre Fonta"
8-
AUTHOR_EMAIL = "christian.oreilly@epfl.ch"
9-
VERSION = "0.4.0"
10-
REQUIRED = ["numpy", "parse", "metapub", "pyzotero", "GitPython", "pandas",
11-
"biopython", "beautifulsoup4", "quantities", "wand", "scipy"]
6+
from setuptools import setup
127

13-
def is_package(path):
14-
return (
15-
os.path.isdir(path) and
16-
os.path.isfile(os.path.join(path, '__init__.py'))
17-
)
8+
VERSION = "0.4.1"
189

19-
def find_packages(path, base="" ):
20-
""" Find all packages in path """
21-
packages = {}
22-
for item in os.listdir(path):
23-
dir = os.path.realpath(os.path.join(path, item))
24-
if is_package( dir ):
25-
if base:
26-
module_name = "%(base)s.%(item)s" % vars()
27-
else:
28-
module_name = item
29-
packages[module_name] = dir
30-
packages.update(find_packages(dir, module_name))
31-
return packages
10+
HERE = os.path.abspath(os.path.dirname(__file__))
3211

33-
packages=find_packages(os.path.join(os.path.dirname(os.path.realpath(__file__)), "."))
12+
# Get the long description from the README file.
13+
# Convert to rst with: pandoc --from=markdown --to=rst README.md -o README.rst.
14+
with open(os.path.join(HERE, "README.rst"), encoding="utf-8") as f:
15+
long_description = f.read()
3416

3517
setup(
36-
name=NAME,
37-
packages=packages.keys(),
38-
package_dir=packages,
39-
package_data={PACKAGE: ["additionsToOntologies.csv", "modelingDictionary.csv"]},
18+
name="nat",
4019
version=VERSION,
41-
description=DESCRIPTION,
42-
long_description=DESCRIPTION,
43-
author=AUTHOR,
44-
author_email=AUTHOR_EMAIL,
45-
maintainer=AUTHOR,
46-
maintainer_email=AUTHOR_EMAIL,
47-
license='LICENSE.txt',
48-
requires=REQUIRED,
49-
install_requires=REQUIRED,
50-
url="https://github.com/christian-oreilly/nat",
51-
classifiers=["Development Status :: 3 - Alpha",
52-
"Environment :: MacOS X", #"Environment :: Win32 (MS Windows)",
53-
"Environment :: X11 Applications",
54-
"Intended Audience :: Developers",
55-
"Intended Audience :: Science/Research",
56-
"License :: Free for non-commercial use",
57-
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
58-
"Natural Language :: English",
59-
"Programming Language :: Python :: 3.4",
60-
"Topic :: Scientific/Engineering"])
20+
description="Module to use the annotations created with NeuroCurator.",
21+
long_description=long_description,
22+
keywords="neuroscience annotation curation literature modeling parameters",
23+
url="https://github.com/BlueBrain/nat",
24+
author="Christian O'Reilly, Pierre-Alexandre Fonta",
25+
author_email="christian.oreilly@epfl.ch, pierre-alexandre.fonta@epfl.ch",
26+
# NB: 'If maintainer is provided, distutils lists it as the author in PKG-INFO'.
27+
# https://docs.python.org/3/distutils/setupscript.html#meta-data
28+
# maintainer="Pierre-Alexandre Fonta",
29+
# maintainer_email="pierre-alexandre@epfl.ch",
30+
license="GPLv3",
31+
packages=["nat"],
32+
python_requires=">=3", # unittest.mock needs Python 3.3+.
33+
install_requires=[
34+
"beautifulsoup4",
35+
"gitpython",
36+
"lxml",
37+
"numpy",
38+
"pandas",
39+
"parse",
40+
"pyzotero",
41+
"quantities",
42+
"scipy",
43+
"wand"
44+
],
45+
extras_require={
46+
"test": ["pytest", "pytest-cov", "pytest-lazy-fixture", "pytest-mock"]
47+
},
48+
package_data={
49+
"nat": ["data/*.csv"]
50+
},
51+
data_files=[("", ["LICENSE.txt"])],
52+
classifiers=[
53+
"Development Status :: 3 - Alpha",
54+
"Intended Audience :: Science/Research",
55+
"Intended Audience :: Developers",
56+
"Topic :: Scientific/Engineering",
57+
"Topic :: Software Development :: Libraries :: Python Modules",
58+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
59+
"License :: Free for non-commercial use",
60+
"Programming Language :: Python :: 3 :: Only",
61+
"Operating System :: MacOS",
62+
"Operating System :: POSIX :: Linux",
63+
"Operating System :: Microsoft :: Windows",
64+
"Natural Language :: English"
65+
]
66+
)

0 commit comments

Comments
 (0)