From 9159afa987ed6b38a6517e71b4cd38c970beba53 Mon Sep 17 00:00:00 2001 From: gnzng Date: Tue, 25 Feb 2025 14:27:15 -0800 Subject: [PATCH] add github workflow using pip installation for python 3.8 - 3.12 --- .github/workflows/main.yml | 32 ++++++++++++++++++++++++++++++++ constraints.txt | 11 +++++++++++ requirements.txt | 2 +- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/main.yml create mode 100644 constraints.txt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6502b1d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,32 @@ +name: main + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + continue-on-error: true + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + pip install --upgrade pip + pip install -r requirements.txt + pip install -e . --no-deps + + - name: Run tests + run: pytest diff --git a/constraints.txt b/constraints.txt new file mode 100644 index 0000000..6afb860 --- /dev/null +++ b/constraints.txt @@ -0,0 +1,11 @@ +numpy>=1.0 +scipy>=1.0 +matplotlib>=2.0 # 2.0 introduces better colormaps which are used by default +pytorch>=1.9.0 #1.9.0 implements support for autograd on indexed complex tensors +h5py>=2.1 +python-dateutil +pytest +pooch +sphinx>=4.3.0 # Fixes a bug with bulleted lists +sphinx-argparse +sphinx_rtd_theme>=0.5.1 # Fixes a bug with bulleted lists diff --git a/requirements.txt b/requirements.txt index 6afb860..1c584c8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ numpy>=1.0 scipy>=1.0 matplotlib>=2.0 # 2.0 introduces better colormaps which are used by default -pytorch>=1.9.0 #1.9.0 implements support for autograd on indexed complex tensors +torch>=1.9.0 #1.9.0 implements support for autograd on indexed complex tensors h5py>=2.1 python-dateutil pytest