diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2213398c1bd..6ad45cb2015 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,10 +7,10 @@ name: tests on: push: branches: - - "*" + - '*' pull_request: branches: - - "*" + - '*' types: - opened - reopened @@ -25,17 +25,18 @@ on: default: false env: - CACHE_NUMBER: 0 # increase to reset cache manually - PYTEST_FLAGS: --tardis-refdata=${{ github.workspace }}/tardis-refdata --tardis-regression-data=${{ github.workspace }}/tardis-regression-data --cov=tardis --cov-report=xml --cov-report=html --cov-append + CACHE_NUMBER: 0 # increase to reset cache manually + PYTEST_FLAGS: --tardis-refdata=${{ github.workspace }}/tardis-refdata --tardis-regression-data=${{ github.workspace }}/tardis-regression-data --cov=tardis --cov-report=xml --cov-report=html --cov-append CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} defaults: run: shell: bash -l {0} - + concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true + jobs: tests: @@ -46,11 +47,11 @@ jobs: fail-fast: false matrix: label: [osx-arm64, linux-64] - continuum: ["not", ""] - rpacket_tracking: ["not", ""] + continuum: ['not', ''] + rpacket_tracking: ['not', ''] exclude: - - continuum: "" - rpacket_tracking: "" + - continuum: '' + rpacket_tracking: '' include: - label: osx-arm64 os: macos-latest @@ -64,34 +65,29 @@ jobs: - name: Setup LFS uses: ./.github/actions/setup_lfs - + - name: Setup environment uses: ./.github/actions/setup_env with: os-label: ${{ matrix.label }} - + - name: Install package editable if: ${{ !inputs.pip_git }} run: | pip install -e . --user - + - name: Install package git if: ${{ inputs.pip_git }} run: | pip install git+https://github.com/tardis-sn/tardis.git@master - - name: Install qgridnext - if: ${{ !inputs.pip_git }} - run: | - pip install qgridnext - - name: Run tests - run: pytest tardis ${{ env.PYTEST_FLAGS }} -m "${{ matrix.continuum }} continuum and ${{ matrix.rpacket_tracking }} rpacket_tracking" - + run: pytest tardis ${{ env.PYTEST_FLAGS }} -m "${{ matrix.continuum }} continuum and ${{ matrix.rpacket_tracking }} rpacket_tracking" + - name: Refdata Generation tests - run: pytest tardis ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum and ${{ matrix.rpacket_tracking }} rpacket_tracking" + run: pytest tardis ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum and ${{ matrix.rpacket_tracking }} rpacket_tracking" if: contains(github.event.pull_request.labels.*.name, 'run-generation-tests') || github.ref == 'refs/heads/master' - + - run: mv .coverage .coverage.${{ strategy.job-index }} - uses: actions/upload-artifact@v4 @@ -100,7 +96,7 @@ jobs: path: | .coverage* !.coveragerc - + combine_coverage_reports: needs: [tests] if: github.repository_owner == 'tardis-sn' @@ -114,16 +110,16 @@ jobs: # will download all artifacts(in this case all are coverage reports) - uses: actions/download-artifact@v4 - with: + with: path: . merge-multiple: true - + - name: Combine coverage reports run: | coverage combine coverage xml coverage html - + - name: Print report run: coverage report diff --git a/tardis/visualization/widgets/line_info.py b/tardis/visualization/widgets/line_info.py index 6250d6a22dd..7c125264fd2 100644 --- a/tardis/visualization/widgets/line_info.py +++ b/tardis/visualization/widgets/line_info.py @@ -5,6 +5,7 @@ from astropy import units as u import numpy as np import pandas as pd +import qgrid from plotly import graph_objects as go from plotly.callbacks import BoxSelector import ipywidgets as ipw diff --git a/tardis/visualization/widgets/util.py b/tardis/visualization/widgets/util.py index a0aab021107..c354ebbf38d 100644 --- a/tardis/visualization/widgets/util.py +++ b/tardis/visualization/widgets/util.py @@ -1,7 +1,7 @@ """Utility classes and functions for widgets.""" import logging -import qgridnext +import qgrid import ipywidgets as ipw import asyncio @@ -95,7 +95,7 @@ def create_table_widget( ) # Create the table widget using qgrid - return qgridnext.show_grid( + return qgrid.show_grid( data, grid_options=grid_options, column_options=column_options, diff --git a/tardis_env3.yml b/tardis_env3.yml index 4d3f564e2f5..8882a45d094 100644 --- a/tardis_env3.yml +++ b/tardis_env3.yml @@ -4,6 +4,7 @@ channels: - conda-forge dependencies: + # WARNING: any change to this section must be applied to the conda-forge # package recipe at https://github.com/conda-forge/tardis-sn-feedstock @@ -37,8 +38,7 @@ dependencies: - matplotlib-base - ipywidgets - plotly - - pip: - - qgridnext + - qgrid # --- Packages not required for conda-forge recipe --- @@ -74,3 +74,4 @@ dependencies: # Other - git-lfs +