Skip to content

Commit

Permalink
Add Makefile, tests, and fix libtyssue_core import
Browse files Browse the repository at this point in the history
  • Loading branch information
hadim committed Jun 22, 2015
1 parent 9ffc182 commit a345cc3
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 20 deletions.
14 changes: 0 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ option(BUILD_SHARED_LIBS "Build shared library" ON)
## Build Option: when active headers will be installed in the CMAKE_INSTALL_PREFIX/include directory
option(INSTALL_HEADERS "Installs the header files" ON)

## Build option: enable test set.
option(ENABLE_TESTS "Build test set." ON)

## Build Option: build executable for the examples
option(BUILD_EXAMPLES "Build examples." ON)

## Build Option: build documentation
option(BUILD_DOC "Build documentation." ON)

Expand Down Expand Up @@ -67,14 +61,6 @@ add_subdirectory("${CMAKE_SOURCE_DIR}/src")

##############################################################################

if(ENABLE_TESTS)
# add_subdirectory("${CMAKE_SOURCE_DIR}/tests")
endif(ENABLE_TESTS)

if(BUILD_EXAMPLES)
# add_subdirectory("${CMAKE_SOURCE_DIR}/examples")
endif(BUILD_EXAMPLES)

if(BUILD_DOC)
# add_subdirectory("${CMAKE_SOURCE_DIR}/doc")
endif(BUILD_DOC)
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sudo dpkg -i sparsehash_2.0.2-1_amd64.deb
### Create a virtual environment with `conda`

```bash
conda create -n tyssue python=3.4 numpy scipy
conda create -n tyssue python=3.4 numpy scipy vispy matplotlib nose
## activate the new environment
source activate tyssue
```
Expand Down
45 changes: 45 additions & 0 deletions src/setup.py.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
from setuptools import setup
from setuptools import find_packages

DISTNAME = 'tyssue'
DESCRIPTION = 'tyssue is stronger than Arnold Schwarzenegge'
LONG_DESCRIPTION = 'tyssue is going to conquer the world soon '
MAINTAINER = 'Guillaume Gay'
MAINTAINER_EMAIL = 'gllm.gay@gmail.com'
URL = 'https://github.com/CellModels/tyssue'
LICENSE = 'BSD 3-Clause'
DOWNLOAD_URL = 'https://github.com/CellModels/tyssue.git'
VERSION = '${Tyssue_VERSION}'

if __name__ == "__main__":

setup(
name=DISTNAME,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
url=URL,
license=LICENSE,
download_url=DOWNLOAD_URL,
version=VERSION,

classifiers=["Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Image Recognition",
"Topic :: Scientific/Engineering :: Medical Science Apps",
],

packages=find_packages('${CMAKE_CURRENT_SOURCE_DIR}'),
package_dir={'': '${CMAKE_CURRENT_SOURCE_DIR}'},
zip_safe=False
)
2 changes: 1 addition & 1 deletion src/tyssue/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .core import objects
from .core import objects
5 changes: 3 additions & 2 deletions src/tyssue/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import sys
sys.path.append("/home/hadim/local/conda/envs/tyssue/lib/")
import os

import libtyssue_core as core
ld_library_path = os.path.dirname(os.path.dirname(os.__file__))
sys.path.append(ld_library_path)

from .objects import Epithelium, Vertex, Edge, Face, Volume, Cell, test_import
from libtyssue_core import make_hexagon
2 changes: 1 addition & 1 deletion src/tyssue/core/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
def test_import():
planet = core.World()
planet.set('howdy')
print(planet.greet())
return planet.greet()


class Epithelium(core.Epithelium):
Expand Down
Empty file.
3 changes: 3 additions & 0 deletions src/tyssue/core/tests/test_objects.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
def test_world_import():
import tyssue
assert tyssue.core.test_import() == "howdy"
3 changes: 2 additions & 1 deletion src/tyssue/draw/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import vispy_draw, mpl_draw
from . import vispy_draw
from . import mpl_draw

0 comments on commit a345cc3

Please sign in to comment.