Fix get_parent same-time-tag bug in LineageClustering #1378
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # copied from https://github.com/XENONnT/straxen/blob/master/.github/workflows/pytest.yml | |
| # Test fuse 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 covering all our lines of | |
| # code with our tests. The results get uploaded to | |
| # coveralls.io/github/XENONnT/fuse | |
| name: Test package | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| env: | |
| HAVE_ACCESS_TO_SECRETS: ${{ secrets.RUNDB_API_URL }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ "ubuntu-latest" ] | |
| python-version: [ "3.10", "3.11" ] | |
| dependency-version: [ "latest", "lowest" ] | |
| test: [ 'coveralls' ] | |
| steps: | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install pytest coverage coveralls | |
| # Clone and install nestpy (same as your existing workflow) | |
| git clone https://github.com/NESTCollaboration/nestpy.git | |
| cd nestpy | |
| git checkout fb3804e | |
| git submodule update --init --recursive | |
| cd lib/pybind11 | |
| git fetch --tags | |
| git checkout v2.13.0 | |
| cd ../../ | |
| sed -i 's/cmake_minimum_required(VERSION 2.8.12)/cmake_minimum_required(VERSION 2.8.12...3.30)/' CMakeLists.txt | |
| pip install . | |
| cd .. | |
| rm -rf nestpy | |
| - name: Start MongoDB | |
| uses: supercharge/mongodb-github-action@1.10.0 | |
| with: | |
| mongodb-version: 4.4.1 | |
| - name: patch utilix file | |
| run: bash .github/scripts/create_readonly_utilix_config.sh | |
| env: | |
| 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 }} | |
| PYMONGO_URL: ${{ secrets.PYMONGO_URL }} | |
| PYMONGO_USER: ${{ secrets.PYMONGO_USER }} | |
| PYMONGO_PASSWORD: ${{ secrets.PYMONGO_PASSWORD }} | |
| PYMONGO_DATABASE: ${{ secrets.PYMONGO_DATABASE }} | |
| SCADA_URL: ${{ secrets.SCADA_URL }} | |
| SCADA_VALUE_URL: ${{ secrets.SCADA_VALUE_URL }} | |
| SCADA_USER: ${{ secrets.SCADA_USER }} | |
| SCADA_LOGIN_URL: ${{ secrets.SCADA_LOGIN_URL }} | |
| SCADA_PWD: ${{ secrets.SCADA_PWD }} | |
| - name: Install fuse (latest dependencies) | |
| if: matrix.dependency-version == 'latest' | |
| run: | | |
| pip install . | |
| - name: Install fuse (lowest strax + straxen) | |
| if: matrix.dependency-version == 'lowest' | |
| run: | | |
| pip install --no-cache-dir \ | |
| numpy==1.24.4 \ | |
| pandas==1.5.3 \ | |
| numba==0.58.1 | |
| pip install \ | |
| strax==1.6.0 \ | |
| straxen==2.2.3 | |
| pip install . | |
| - name: Show installed package versions | |
| run: | | |
| pip list | |
| - name: Test package and report to coveralls | |
| env: | |
| TEST_MONGO_URI: 'mongodb://localhost:27017/' | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| FUSE_TEST_SIMULATION_CONFIG: ${{ matrix.dependency-version == 'lowest' && 'sr1_dev' || 'sr2_dev' }} | |
| if: env.HAVE_ACCESS_TO_SECRETS != null | |
| run: | | |
| coverage run --source=fuse -m pytest --durations 0 -v | |
| coveralls --service=github | |
| coverage report | |
| - name: goodbye | |
| run: echo "tests done, bye bye" |