Skip to content

Commit

Permalink
Merge branch 'release/6.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasgal committed Jun 13, 2017
2 parents 2bf7afd + d72c6c1 commit ac9d3fc
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 22 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ before_install:
- pip install -U pytest mock
- pip install -U statsmodels==0.8.0rc1
- pip install -U tables
- pip install -U h5py
- pip install -U tornado
- pip install matplotlib==2.0.0
- ls -al
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Unreleased changes
------------------


6.8.0 / 2017-06-13
------------------
* minor bugfixes
* git repository changed, ``km3pipe update develop`` is broken for
all versions below 6.8.0

6.7.1 / 2017-06-08
------------------
* ControlHost improvements
Expand Down
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mock
pytest
pytest-cov
pytest-flake8
twine
2 changes: 1 addition & 1 deletion docs/dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Enter the virtualenv::
Make a Fork of KM3Pipe
~~~~~~~~~~~~~~~~~~~~~~

Go to ``http://git.km3net.de/tgal/km3pipe`` and click on "Fork".
Go to ``http://git.km3net.de/km3py/km3pipe`` and click on "Fork".


Install in Developer Mode
Expand Down
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ To install the latest stable version:::

To get the development version, use:::

$ pip install git+http://git.km3net.de/tgal/km3pipe.git@develop
$ pip install git+http://git.km3net.de/km3py/km3pipe.git@develop


Updating
Expand Down
2 changes: 1 addition & 1 deletion docs/version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
KM3Pipe 6.7.1
KM3Pipe 6.8.0
=============
2 changes: 1 addition & 1 deletion km3pipe/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

log = logging.getLogger(__name__) # pylint: disable=C0103

version_info = (6, 7, 1, 'final', 0)
version_info = (6, 8, 0, 'final', 0)


def _get_version(version_info):
Expand Down
2 changes: 1 addition & 1 deletion km3pipe/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def runinfo(run_id, det_id, temporary=False):
def update_km3pipe(git_branch=''):
if git_branch == '' or git_branch is None:
git_branch = 'master'
os.system("pip install -U git+http://git.km3net.de/tgal/km3pipe.git@{0}"
os.system("pip install -U git+http://git.km3net.de/km3py/km3pipe.git@{0}"
.format(git_branch))


Expand Down
9 changes: 0 additions & 9 deletions km3pipe/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,3 @@
# Default values for time residuals
dt_window_l = -15 # ns
dt_window_h = +25 # ns

# taken from the LOI
orca_longitude = 42 + (48/60) # degree
orca_latitude = 6 + (2/60) # degree
orca_height = -2450 # m

arca_longitude = 36 + (16/60) # degree
arca_latitude = 10 + (6/60) # degree
arca_height = -3500 # m
16 changes: 12 additions & 4 deletions km3pipe/io/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import numpy as np
import pandas as pd
import tables as tb
import h5py

from km3pipe.logger import logging
from km3pipe.tools import insert_prefix_to_dtype
Expand All @@ -38,6 +37,7 @@ class H5Chain(object):
Parameters
----------
filenames: list(str), or dict(fname -> h5file)
verbose: bool [default: False]
Examples
--------
Expand All @@ -52,8 +52,9 @@ class H5Chain(object):
>>> reco = h5['/reco']
"""
def __init__(self, filenames):
def __init__(self, filenames, verbose=False):
self.filenames = filenames
self.verbose = verbose

def close(self):
pass
Expand All @@ -67,12 +68,19 @@ def __enter__(self):
def __getitem__(self, key):
dfs = []
for fname in self.filenames:
with h5py.File(fname, 'r') as h5:
if self.verbose:
print('opening ', fname)
with tb.File(fname, 'r') as h5:
try:
tab = h5[key][:]
tab = h5.get_node(key)[:]
except KeyError as ke:
log.error('{} does not exist in {}!'.format(key, fname))
raise ke
except tb.exceptions.NodeError as ne:
log.error('{} does not exist in {}!'.format(key, fname))
raise ne
if self.verbose:
print(tab.shape)
df = pd.DataFrame(tab)
dfs.append(df)
dfs = pd.concat(dfs, axis=0, ignore_index=True)
Expand Down
2 changes: 1 addition & 1 deletion km3pipe/srv.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def srv_event(token, hits, url=RBA_URL):
time = list(hits['time'])
tot = list(hits['tot'])
if isinstance(hits, HitSeries):
pos = [(h.pos.x, h.pos.y, h.pos.z) for h in hits]
pos = [(h.pos_x, h.pos_y, h.pos_z) for h in hits]
time = [h.time for h in hits]
tot = [h.tot for h in hits]

Expand Down
2 changes: 1 addition & 1 deletion km3pipe/tests/test_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
__status__ = "Development"


KM3PIPE_GIT = "http://git.km3net.de/tgal/km3pipe.git"
KM3PIPE_GIT = "http://git.km3net.de/km3py/km3pipe.git"


class TestDetx(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion km3pipe/utils/hdf2root.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def hdf2root(infile, outfile, verbose=False):
if arr.dtype.names is None:
dt = np.dtype((arr.dtype, [(leafname, arr.dtype)]))
arr = arr.view(dt)
tree = asrootpy(array2tree(arr, name=leaf._v_pathname))
treename = leaf._v_pathname.strip('/')
tree = asrootpy(array2tree(arr, name=treename))
tree.write()
rf.close()
h5.close()
Expand Down
3 changes: 2 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ git checkout develop
git push
git push --tags

set +e
git checkout svn
git merge master
git svn dcommit

svn copy "${KP_SVN}/git" "${SVN}/tag/v${VERSION}" -m "KM3Pipe Release ${VERSION}"

#
git checkout develop
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tool:pytest]
flake8-ignore = E265

0 comments on commit ac9d3fc

Please sign in to comment.