Skip to content

Commit

Permalink
Bumpy package version (#142)
Browse files Browse the repository at this point in the history
* Update pyproject.toml - Update version
* Update GH actions test to try fix broken install by use Mambaforge 
    * Documented work around in conda-incubator/setup-miniconda#274 in response to transient errors
* Update PR template
* Updated tests after OSM edits
  • Loading branch information
rosepearson committed Jan 16, 2023
1 parent 9265735 commit 6d5f13d
Show file tree
Hide file tree
Showing 7 changed files with 206 additions and 196 deletions.
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
DESCRIPTION OF PR:
- [ ] Make code change
- [ ] Update tests
- [ ] Update tests
- [ ] Update / create new tests
- [ ] Ensure these tests have the expected behavour
- [ ] Test locally and ensure tests are passing
- [ ] Ensure tests passing on GH Actions
- [ ] Update documentation
- [ ] Doc strings
- [ ] Wiki
- [ ] Update package version (if needed)
- [ ] Wiki
- [ ] Update package version (if needed)
17 changes: 12 additions & 5 deletions .github/workflows/linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
Expand All @@ -23,6 +23,7 @@ jobs:
with:
lfs: true


- name: Cache conda
uses: actions/cache@v2
env:
Expand All @@ -31,41 +32,47 @@ jobs:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.cache-name }}-${{ hashFiles('linux_environment.yml') }}


- name: Install package dependencies with setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
channels: conda-forge
channel-priority: true
activate-environment: geofabrics
environment-file: environment_linux.yml
auto-activate-base: false
channels: conda-forge
channel-priority: strict
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
python-version: ${{ matrix.python-version }}
mamba-version: "*"
- run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Install test dependencies
run: |
mamba install flake8 pytest
- name: Create .env file with API keys
env:
ENV_BASE64: ${{ secrets.ENV_BASE64 }}
run: |
echo import .env file from secrets and regenerate the file
echo $ENV_BASE64 | base64 -d > .env
- name: Run lint with flake8
run: |
# 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: Run tests with pytest
run: |
pytest
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "geofabrics"
version = "0.10.5"
version = "0.10.6"
description = "A package for creating geofabrics for flood modelling."
readme = "README.md"
authors = [{ name = "Rose pearson", email = "rose.pearson@niwa.co.nz" }]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ class ProcessorRiverBathymetryOsmTest(unittest.TestCase):
contained in processor.RiverBathymetryGenerator.
Tests run include:
1. test_river_polygon - Test that the expected river polygon is created
2. test_river_bathymetry - Test that the expected river bathymetry is created
3. test_fan - Test that the expected fan polygon and geometry are created
1. test_river_polygon_(linux/windows) - Test that the expected river polygon is
created
2. test_river_bathymetry_(linux/windows) - Test that the expected river
bathymetry is created
3. test_fan_(linux/windows) - Test that the expected fan polygon and geometry
are created
"""

@classmethod
Expand Down
Loading

0 comments on commit 6d5f13d

Please sign in to comment.