Skip to content

Commit

Permalink
Revert "Move to qgridnext (#2814)"
Browse files Browse the repository at this point in the history
This reverts commit 260207c.
  • Loading branch information
andrewfullard authored Sep 10, 2024
1 parent 260207c commit 02bc2d1
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 29 deletions.
46 changes: 21 additions & 25 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ name: tests
on:
push:
branches:
- "*"
- '*'
pull_request:
branches:
- "*"
- '*'
types:
- opened
- reopened
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -100,7 +96,7 @@ jobs:
path: |
.coverage*
!.coveragerc
combine_coverage_reports:
needs: [tests]
if: github.repository_owner == 'tardis-sn'
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions tardis/visualization/widgets/line_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tardis/visualization/widgets/util.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Utility classes and functions for widgets."""

import logging
import qgridnext
import qgrid
import ipywidgets as ipw
import asyncio

Expand Down Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions tardis_env3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -37,8 +38,7 @@ dependencies:
- matplotlib-base
- ipywidgets
- plotly
- pip:
- qgridnext
- qgrid

# --- Packages not required for conda-forge recipe ---

Expand Down Expand Up @@ -74,3 +74,4 @@ dependencies:

# Other
- git-lfs

0 comments on commit 02bc2d1

Please sign in to comment.