Skip to content

Commit

Permalink
Fix error message with cal pos nuc
Browse files Browse the repository at this point in the history
Test more ROOT versions
Run newer black version
  • Loading branch information
janmayer committed Apr 28, 2021
1 parent 2c62b18 commit cce6074
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compile-without-helpers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Install dependencies
shell: bash -l {0}
run: conda install root='6.18.04'
run: conda install root='6.24.0'

- name: Build
shell: bash -l {0}
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,24 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# Notes:
# - '6.18.00', '6.18.04', '6.20.0' take too long to install via conda (>1h instead of ~5min)
# - '6.22.00', '6.22.02' are incompatible
# - 6.22.4 missing from https://anaconda.org/conda-forge/root/files
python-version: [3.6, 3.7, 3.8]
root-version: ['6.16.00', '6.18.00', '6.18.04', '6.20.0', '6.20.2', '6.20.4', '6.20.6']
root-version: ['6.16.00', '6.20.2', '6.20.4', '6.20.6', '6.22.6', '6.22.8', '6.24.0']
exclude:
- python-version: 3.8
root-version: '6.16.00'
- python-version: 3.8
root-version: '6.18.00'
include:
- python-version: 3.9
root-version: '6.22.6'
- python-version: 3.9
root-version: '6.22.8'
- python-version: 3.9
root-version: '6.24.0'
fail-fast: false

steps:
Expand All @@ -37,4 +48,4 @@ jobs:

- name: Post Coverage
uses: codecov/codecov-action@v1
if: matrix.python-version == 3.8 && matrix.root-version == '6.18.04'
if: matrix.python-version == 3.8 && matrix.root-version == '6.24.0'
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# HDTV Changelog

## 21.04
- Fix error with errormessage in cal pos nuc (@jmayer)
- Test more ROOT versions
- Test Python 3.9

## 20.12
- Fix performance degradation with ROOT 6.20. and higher (fixes #6) (@jmayer)
- Fix compatibility with unreleased ROOT Versions 6.19.x (@jmayer)
Expand Down
2 changes: 1 addition & 1 deletion hdtv/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def info(self):
g = self.gates[i]
s += "%d - %d " % (g.p1.pos_cal, g.p2.pos_cal)
if not i == len(self.gates):
"and "
"and"
return s


Expand Down
4 changes: 2 additions & 2 deletions hdtv/plugins/EnergyCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def MatchPeaksAndEnergies(peaks, energies, sigma):
accordance.append(pair[i])

if len(accordance) < 4:
hdtv.ui.msg(accordance)
hdtv.ui.warning("Only a few (peak,energy) pairs are found.")
# hdtv.ui.msg(accordance)
hdtv.ui.warning("Only few (peak,energy) pairs found. Try with a larger --sigma")

return accordance

Expand Down
2 changes: 1 addition & 1 deletion hdtv/plugins/textInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def pager(self, html, end="\n"):
@bindings.add("c-c")
@bindings.add("q")
def _(event):
" Quit. "
"Quit."
event.app.exit()

application = Application(
Expand Down

0 comments on commit cce6074

Please sign in to comment.