Skip to content

Commit

Permalink
remove upper python version limit and add Windows CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
johntruckenbrodt authored Dec 19, 2024
1 parent cafa570 commit 1421996
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: conda build
on: [ push ]

jobs:
build:
build-linux:
runs-on: ubuntu-latest
services:
postgres:
Expand All @@ -19,7 +19,7 @@ jobs:
with:
auto-update-conda: true
python-version: '3.10'
- name: install ESA SNAP
- name: Install ESA SNAP
run: |
wget -nv https://download.esa.int/step/snap/10_0/installers/esa-snap_sentinel_linux-10.0.0.sh
bash esa-snap_sentinel_linux-10.0.0.sh -q -dir $GITHUB_ACTION_PATH/esa-snap
Expand All @@ -28,24 +28,19 @@ jobs:
echo "$CONDA/bin" >> $GITHUB_PATH
echo "$GITHUB_ACTION_PATH/esa-snap/bin" >> $GITHUB_PATH
echo "PROJ_DATA=$CONDA/share/proj" >> $GITHUB_ENV
- name: Install dependencies
- name: Install python packages
run: |
: # https://github.com/conda/conda/issues/13560#issuecomment-1992720842
conda install -y python=3.10
conda install -y python=3.10 flake8 pytest coverage
conda env update --file environment.yml --name base
- name: Lint with flake8
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install package
- name: Install pyroSAR
run: |
pip install .
- name: Test with pytest
run: |
conda install pytest coverage
coverage run -m pytest
env:
PGUSER: postgres
Expand All @@ -54,3 +49,39 @@ jobs:
uses: coverallsapp/github-action@v2
with:
github-token: ${{ github.token }}

build-windows:
runs-on: windows-latest
defaults:
run:
shell: cmd /C CALL {0}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: ps_test_dev
auto-update-conda: true
python-version: '3.12'
environment-file: environment-dev.yml
auto-activate-base: false
- uses: nyurik/action-setup-postgis@v2
with:
cached-dir: C:\downloads
- name: Install ESA SNAP
run: |
curl -O https://download.esa.int/step/snap/10_0/installers/esa-snap_sentinel_windows-10.0.0.exe
start /wait esa-snap_sentinel_windows-10.0.0.exe -q -dir C:\esa-snap
- name: Set paths and variables
run: |
echo %CONDA%\Scripts>> %GITHUB_PATH%
echo C:\esa-snap\bin>> %GITHUB_PATH%
echo PROJ_DATA=%CONDA%\share\proj>> %GITHUB_ENV%
- name: Install pyroSAR
run: |
pip install .
- name: Test with pytest
run: |
pytest
env:
PGUSER: postgres
PGPASSWORD: postgres
2 changes: 1 addition & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python>=3.8,<3.11
- python>=3.8
- progressbar2
- numpy<2.0
- spatialist>=0.12.1
Expand Down
2 changes: 1 addition & 1 deletion environment-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python>=3.8,<3.11
- python>=3.8
- matplotlib
- numpy<2.0
- sphinx<7.0 # https://github.com/readthedocs/sphinx_rtd_theme/issues/1463
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python>=3.8,<3.11 # https://github.com/kvesteri/sqlalchemy-utils/issues/716
- python>=3.8
- progressbar2
- numpy<2.0
- spatialist>=0.12.1
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel"]
[project]
name = "pyroSAR"
description = "a framework for large-scale SAR satellite data processing"
requires-python = ">=3.8,<3.11"
requires-python = ">=3.8"
license = { file = "LICENSE.txt" }
maintainers = [
{ name = "John Truckenbrodt", email = "[email protected]" }
Expand Down

0 comments on commit 1421996

Please sign in to comment.