Skip to content

Support modern Python versions. #402

Support modern Python versions.

Support modern Python versions. #402

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install -e .[test,boost,uproot,rich]
- name: Install optional dependencies for tests
run: python -m pip install pandas
- name: Run tests
run: python -m pytest -s
- name: Run CLI
run: |
histoprint tests/data/1D.txt
histoprint tests/data/1D.txt -c 40 -l 40
histoprint tests/data/2D.txt
histoprint tests/data/3D.txt -s -l A -l B -l C -t "HISTOPRINT"
histoprint tests/data/3D.txt -s -f 0 -l A -f 2 -l C -C 'data[1] > 2.'
histoprint tests/data/3D.csv -s -f x -f z -C 'y > 2.'
wget --quiet http://scikit-hep.org/uproot3/examples/Event.root
histoprint -s Event.root -f T/event/fTracks/fTracks.fYfirst -f T/event/fTracks/fTracks.fYlast[:,0]
histoprint -s Event.root -f T/fTracks.fYfirst -f T/event/fTracks/fTracks.fYlast[:,0] -C 'fNtrack > 5'
histoprint -s Event.root -f htime
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --hook-stage manual