Skip to content

Stop printing all chunks in data prep scripts #289

Stop printing all chunks in data prep scripts

Stop printing all chunks in data prep scripts #289

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: # allow manual triggering
schedule:
- cron: "0 12 1 * *"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.14"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: |
uv sync --all-extras --group test --group data
- name: Test with pytest
run: uv run pytest -v
- name: Docstring doctest
run: uv run pytest --doctest-modules stringcalc -v
- name: Test code blocks
run: uv run pytest --codeblocks README.md docs -v
- name: Check type annotations
run: |
uv run mypy --non-interactive .
- name: Check data prep scripts still work
run: |
# Copy to temp location
mkdir -p stringcalc/data/_orig
cp stringcalc/data/*.csv stringcalc/data/_orig/
# Run scripts
for f in data/*.py; do
if [ $(basename $f) == "daddario_extract.py" ]; then continue; fi
uv run python $f
done
# Compare results to those in the repo
cd stringcalc/data
rc=0
for f in *.csv; do
echo $f
cmp _orig/$f $f || rc=$?
done
exit $rc
panel:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
stringcalc: ["local", "pypi"]
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: |
uv sync --group panel
- name: Install stringcalc (${{ matrix.stringcalc }})
run: |
if [ "${{ matrix.stringcalc }}" == "local" ]; then
:
elif [ "${{ matrix.stringcalc }}" == "pypi" ]; then
uv pip install stringcalc
else
exit 1
fi
- name: Run the app script
run: uv run python panel/app.py
- name: Check type annotations in app script
run: |
uv pip install mypy
uv run mypy --non-interactive panel/app.py
- name: Build app (pyodide)
run: |
uv run panel convert panel/app.py --to pyodide
mv ./app.html ./stringcalc-panel.html
- name: Upload built app
if: matrix.stringcalc == 'pypi'
uses: actions/upload-artifact@v7
with:
name: panel
path: stringcalc-panel.html
retention-days: 1