Skip to content

Commit

Permalink
Merge tag 'v1.0.0' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
JoranAngevaare committed Sep 14, 2021
2 parents b345e92 + 029aef4 commit 5433e14
Show file tree
Hide file tree
Showing 43 changed files with 1,363 additions and 550 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.19.3
current_version = 1.0.0
files = setup.py straxen/__init__.py
commit = True
tag = True
3 changes: 3 additions & 0 deletions .github/scripts/filter_strax_from_requirements.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
echo `pwd`
cat requirements.txt | grep -v 'strax' &> requirements.txt
cat requirements.txt
11 changes: 0 additions & 11 deletions .github/scripts/preinstall_requirements.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/code_style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@master
with:
python-version: 3.6
python-version: 3.8
- name: Change __all__ exports for pyflake
run: |
bash .github/scripts/pre_pyflakes.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/contexts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.6'
python-version: '3.8'
- name: Checkout repo
uses: actions/checkout@v2
- name: Install python dependencies
Expand Down
65 changes: 0 additions & 65 deletions .github/workflows/coveralls.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pypi_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.6'
python-version: '3.8'
- name: Checkout repo
uses: actions/checkout@v2
- name: Install dependencies
Expand Down
72 changes: 60 additions & 12 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# Test straxen on each PR
# Test straxen on each PR.
# We run three types of tests:
# - Pytest -> these are the "normal" tests and should be run for all
# python versions
# - Coveralls -> this is to see if we are coverering all our lines of
# code with our tests. The results get uploaded to
# coveralls.io/github/XENONnT/straxen
# - pytest_no_database -> we want to make sure we can run the tests even
# if we don't have access to our datebase since this will e.g. happen
# when someone is pushing a PR from their own fork as we don't
# propagate our secrets there.

name: Test package

# Trigger this code when a new release is published
Expand All @@ -16,30 +27,49 @@ on:

jobs:
update:
name: Pytest
name: "${{ matrix.test }}_py${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: true
fail-fast: False
matrix:
# NB: For python 3.6 and 3.7 we are going to explicitly test without a database
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9]
test: ['coveralls', 'pytest', 'pytest_no_database']
# Only run coverage / no_database on py3.8
exclude:
- python-version: 3.7
test: coveralls
- python-version: 3.9
test: coveralls
- python-version: 3.7
test: pytest_no_database
- python-version: 3.9
test: pytest_no_database
steps:
# Setup and installation
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Checkout repo
uses: actions/checkout@v2
- name: Remove strax from reqs.
if: matrix.test == 'coveralls' && env.HAVE_ACCESS_TO_SECTETS != null
env:
HAVE_ACCESS_TO_SECTETS: ${{ secrets.RUNDB_API_URL }}
run: |
bash .github/scripts/filter_strax_from_requirements.sh
- name: Install requirements for tests and latest strax
run: |
pip install -r extra_requirements/requirements-tests.txt
pip install git+https://github.com/AxFoundation/strax.git
# Secrets and required files
- name: patch utilix file
# Since we skip this step for python 3.6 and 3.7, we are testing without the database
if: matrix.python-version == 3.8 || matrix.python-version == 3.9
# Patch this file if we want to have access to the database
if: matrix.test != 'pytest_no_database'
run: bash .github/scripts/create_readonly_utilix_config.sh
env:
# Rundb
# RunDB
RUNDB_API_URL: ${{ secrets.RUNDB_API_URL }}
RUNDB_API_USER_READONLY: ${{ secrets.RUNDB_API_USER_READONLY }}
RUNDB_API_PASSWORD_READONLY: ${{ secrets.RUNDB_API_PASSWORD_READONLY}}
Expand All @@ -55,14 +85,32 @@ jobs:
SCADA_PWD: ${{ secrets.SCADA_PWD }}
- name: Create pre-apply function file
# In case we do not have database. We need to make a local file for
# The pre_apply_function (see #559)
# The pre_apply_function (see #559).
env:
HAVE_ACCESS_TO_SECTETS: ${{ secrets.RUNDB_API_URL }}
if: env.HAVE_ACCESS_TO_SECTETS == null || matrix.python-version == 3.6 || matrix.python-version == 3.7
if: env.HAVE_ACCESS_TO_SECTETS == null || matrix.test == 'pytest_no_database'
run: |
bash .github/scripts/create_pre_apply_function.sh $HOME
# Run tests
- name: Test package
# This is running a normal test
if: matrix.test == 'pytest_no_database' || matrix.test == 'pytest'
run: |
pytest -v
- name: Coveralls
# Make the coverage report and upload
env:
NUMBA_DISABLE_JIT: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# We need to check if we had access to the secrets, otherwise coveralls
# will yield a low coverage because of the lack of interfacing with the
# database.
HAVE_ACCESS_TO_SECTETS: ${{ secrets.RUNDB_API_URL }}
if: matrix.test == 'coveralls' && env.HAVE_ACCESS_TO_SECTETS != null
run: |
python setup.py test -v
coverage run --source=straxen setup.py test -v
coveralls --service=github
# Done
- name: goodbye
run: echo goodbye
run: echo "tests done, bye bye"
35 changes: 35 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
1.0.0 / 2021-09-01
-------------------
major / minor:

- merge s2 without s1 (#645)
- First nVeto monitor plugin (#634)
- Peak event veto tagging (#618)
- Fix peaklet area bias (#601)
- Add lone hit information to merged S2s. (#623)


patches and fixes:

- Fix n_hits of peaks (#646)
- Update requirements for strax (#644)
- Modifications of nT simulation context (#602)
- Straxer for other packages (#595)
- [Bug fix] alt_s{i}_delay computation (#598)
- Bump version refactor code for cleanliness. (#597)
- Increase buffer size (#604)
- Stop testing py3.6 (#621)
- Remove online event monitor (#620)
- Add matplotlib to test requirements (#626)
- Fix rundb select runs with superruns (#627)
- Change EventInfo to save when explicit (#628)
- Update test data (#631)
- Allow database to not be initialized (#636)
- new plot_pmts (#637)
- Speed up event pattern fit (#625)
- kwargs for saver (#639)
- Add a plugin for external trigger run on nVeto calibration (#630)
- Fix veto event positions (#641)
- Use rucio from straxen & nest RucioRemote imports (#592)


0.19.3 / 2021-07-16
-------------------
- Rewrite EventBasics, set event level S1 tight coincidence (#569)
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ For installation instructions and usage information, please see the [straxen doc

[![Update context collection](https://github.com/XENONnT/straxen/workflows/Update%20context%20collection/badge.svg)](https://github.com/XENONnT/straxen/actions/workflows/contexts.yml)
[![Python style](https://github.com/XENONnT/straxen/actions/workflows/code_style.yml/badge.svg)](https://github.com/XENONnT/straxen/actions/workflows/code_style.yml)
[![Coveralls](https://github.com/XENONnT/straxen/actions/workflows/coveralls.yml/badge.svg?branch=master)](https://github.com/XENONnT/straxen/actions/workflows/coveralls.yml)
4 changes: 3 additions & 1 deletion bin/bootstrax
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ def new_context(cores=args.cores,
allow_lazy=False,
use_rucio=False,
max_messages=max_messages,
timeout=timeout)
timeout=timeout,
_rucio_path=None,
)
if not args.production:
# Keep the rundb but set it to readonly and local only, delete
# all other storage frontends except fo the test folder.
Expand Down

0 comments on commit 5433e14

Please sign in to comment.