Skip to content

Commit

Permalink
Merging master branch to solve pynbody pip building problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Rey committed Feb 21, 2019
2 parents a8c08b2 + 357e0bc commit 56a55d1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
language: c
# use language: c to be able to use a matrix of python and numpy versions -- see https://github.com/rmcgibbo/mdtraj/blob/master/.travis.yml

sudo: false
sudo: false

# specify different versions of python and numpy
env:
Expand All @@ -22,12 +22,15 @@ before_install:
- conda update --yes conda

install:
- conda create --yes -n ${PYTHON}_${NUMPY_VERSION}_{$CYTHON_VERSION} python=$PYTHON numpy=$NUMPY_VERSION scipy matplotlib nose h5py pip webtest pyquery sphinx pygments pandas sqlalchemy cython=$CYTHON_VERSION pyramid pyramid_mako ipython
- source activate ${PYTHON}_${NUMPY_VERSION}_{$CYTHON_VERSION}
- conda create --yes -n ${PYTHON}_${NUMPY_VERSION} python=$PYTHON numpy=$NUMPY_VERSION scipy matplotlib nose h5py pip webtest pyquery sphinx pygments pandas sqlalchemy cython pyramid ipython
- pip install pyramid_mako # anaconda does not yet have pyramid_mako for py3.7
- source activate ${PYTHON}_${NUMPY_VERSION}
- python setup.py install
- python -c "import tangos" # ensure tangos can be imported without pynbody present
- pip install numpy==1.16.1
- pip install git+git://github.com/pynbody/pynbody.git
- git clone https://github.com/pynbody/pynbody.git
- cd pynbody
- python setup.py install
- cd ..
- pip install yt>=3.4.0


Expand Down
2 changes: 1 addition & 1 deletion docs/custom_input_handlers.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class MyHandler(tangos.input_handlers.HandlerBase):
def enumerate_objects(self, timestep_extension, object_typetag, min_halo_particles):
if object_typetag!="halo":
# we only know about objects called 'halo'
raise StopIteration
return

if timestep_extension=="my_timestep_1":
# suppose timestep 1 has 100 halos
Expand Down
2 changes: 1 addition & 1 deletion tangos/input_handlers/pynbody.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def enumerate_objects(self, ts_extension, object_typetag="halo", min_halo_partic
h = self._construct_halo_cat(ts_extension, object_typetag)
except:
logger.warn("Unable to read %ss using pynbody; assuming step has none", object_typetag)
raise StopIteration
return

logger.warn(" => enumerating %ss directly using pynbody", object_typetag)

Expand Down
2 changes: 1 addition & 1 deletion tangos/input_handlers/yt.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def match_objects(self, ts1, ts2, halo_min, halo_max, dm_only=False, threshold=0

def enumerate_objects(self, ts_extension, object_typetag="halo", min_halo_particles=config.min_halo_particles):
if object_typetag!="halo":
raise StopIteration
return
if self._can_enumerate_objects_from_statfile(ts_extension, object_typetag):
for X in self._enumerate_objects_from_statfile(ts_extension, object_typetag):
yield X
Expand Down

0 comments on commit 56a55d1

Please sign in to comment.