diff --git a/.gitignore b/.gitignore index c659ce9a6..892caef59 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.o brainiak.egg-info +build .cache .coverage coverage.xml diff --git a/README.rst b/README.rst index bd063ee1b..2975ea4a1 100644 --- a/README.rst +++ b/README.rst @@ -104,21 +104,12 @@ steps:: pip install . -Building documentation ----------------------- +Documentation +------------- -The documentation will soon be available online. Until then, you can build it -yourself after installing the required tools:: +The documentation is available at:: - pip3 install -U sphinx sphinx_rtd_theme - -Then, assuming you're already in the ``brainiak`` folder, do:: - - cd docs - make - -This will generate HTML documentation in the ``_build/html`` folder within the -``docs`` folder. ``_build/html/index.html`` is the starting page. + https://pythonhosted.org/brainiak Contribute diff --git a/brainiak/factor_analysis/tfa.py b/brainiak/factor_analysis/tfa.py index 731277ec7..2dfe60228 100644 --- a/brainiak/factor_analysis/tfa.py +++ b/brainiak/factor_analysis/tfa.py @@ -35,7 +35,7 @@ from scipy.optimize import linear_sum_assignment from scipy.spatial import distance from ..utils.utils import from_tri_2_sym, from_sym_2_tri -import tfa_extension +from . import tfa_extension import numpy as np import math import gc diff --git a/examples/download-data.sh b/examples/functional_alignment/download-data.sh similarity index 100% rename from examples/download-data.sh rename to examples/functional_alignment/download-data.sh diff --git a/examples/functional_alignment/requirements.txt b/examples/functional_alignment/requirements.txt new file mode 100644 index 000000000..7f8a69f51 --- /dev/null +++ b/examples/functional_alignment/requirements.txt @@ -0,0 +1,2 @@ +matplotlib +notebook diff --git a/examples/srm_image_prediction_example.ipynb b/examples/functional_alignment/srm_image_prediction_example.ipynb similarity index 100% rename from examples/srm_image_prediction_example.ipynb rename to examples/functional_alignment/srm_image_prediction_example.ipynb diff --git a/examples/srm_image_prediction_example.py b/examples/functional_alignment/srm_image_prediction_example.py similarity index 100% rename from examples/srm_image_prediction_example.py rename to examples/functional_alignment/srm_image_prediction_example.py diff --git a/requirements-dev.txt b/requirements-dev.txt index 6c8c1dc27..3503c58b9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,5 @@ flake8 flake8-print -notebook pytest pytest-cov restructuredtext-lint diff --git a/setup.cfg b/setup.cfg index c643accec..f024f90d2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,3 @@ -[aliases] -test = pytest - [pytest] addopts = --junitxml=junit-results.xml diff --git a/setup.py b/setup.py index eb68c0ea2..b3b3cf79a 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import sys import setuptools -__version__ = '0.0.1' +__version__ = '0.1' assert sys.version_info >= (3, 4), ( "Please use Python version 3.4 or higher, " @@ -35,14 +35,13 @@ def __str__(self): ext_modules = [ Extension( - 'tfa_extension', + 'brainiak.factor_analysis.tfa_extension', ['brainiak/factor_analysis/tfa_extension.cpp'], include_dirs=[ # Path to pybind11 headers get_pybind_include(), get_pybind_include(user=True) ], - language='c++' ), ] @@ -80,7 +79,7 @@ def cpp_flag(compiler): class BuildExt(build_ext): """A custom build extension for adding compiler-specific options.""" c_opts = { - 'unix': ['-std=c++11'], + 'unix': ['-g0', '-fopenmp'], } if sys.platform == 'darwin': @@ -91,12 +90,14 @@ def build_extensions(self): ct = self.compiler.compiler_type opts = self.c_opts.get(ct, []) if ct == 'unix': - opts.append('-DVERSION_INFO="%s"' % self.distribution.get_version()) + opts.append('-DVERSION_INFO="%s"' % + self.distribution.get_version()) opts.append(cpp_flag(self.compiler)) if has_flag(self.compiler, '-fvisibility=hidden'): opts.append('-fvisibility=hidden') for ext in self.extensions: ext.extra_compile_args = opts + ext.extra_link_args = opts build_ext.build_extensions(self) setup( @@ -112,12 +113,12 @@ def build_extensions(self): author='Princeton Neuroscience Institute and Intel Corporation', author_email='bryn.keller@intel.com', url='https://github.com/IntelPNI/brainiak', - description='Scalable algorithms for advanced fMRI analysis', + description='Brain Imaging Analysis Kit', license='Apache 2', keywords='neuroscience, algorithm, fMRI, distributed, scalable', long_description=long_description, ext_modules=ext_modules, cmdclass={'build_ext': BuildExt}, - packages=find_packages(exclude=['doc', 'test']), + packages=find_packages(), zip_safe=False, )