diff --git a/.github/workflows/starfish-prod-ci.yml b/.github/workflows/starfish-prod-ci.yml index a9e78d33..591b7cb3 100644 --- a/.github/workflows/starfish-prod-ci.yml +++ b/.github/workflows/starfish-prod-ci.yml @@ -458,3 +458,29 @@ jobs: - name: Run Data Processing Example Test run: | make TESTING=1 iss_pipeline.py + + dartfish-pipeline-data-processing-example: + name: dartfish_pipeline.py Data Processing Example + needs: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Setup Python 3.9 + uses: actions/setup-python@v6 + with: + python-version: '3.9' + + - uses: actions/cache@v4 + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.OS }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/REQUIREMENTS-CI.txt') }} + + - name: Install Dependencies + run: | + make install-dev + pip install -r requirements/REQUIREMENTS-NAPARI-CI.txt + + - name: Run Data Processing Example Test + run: | + make dartfish_pipeline.py diff --git a/examples/pipelines/dartfish_pipeline.py b/examples/pipelines/dartfish_pipeline.py index 935a8220..0cdfe5df 100644 --- a/examples/pipelines/dartfish_pipeline.py +++ b/examples/pipelines/dartfish_pipeline.py @@ -16,11 +16,15 @@ from IPython import get_ipython import matplotlib import matplotlib.pyplot as plt +import sys -# equivalent to %gui qt and %matplotlib inline +# equivalent to using in a notebook cell: %matplotlib inline ipython = get_ipython() -ipython.run_line_magic("gui", "qt5") -ipython.run_line_magic("matplotlib", "inline") +if ipython is not None: + if 'ipykernel' in sys.modules: # running in Jupyter + ipython.run_line_magic('matplotlib', 'inline') + else: # terminal IPython + ipython.run_line_magic('matplotlib', 'qt5') matplotlib.rcParams["figure.dpi"] = 150