Skip to content

Commit

Permalink
Merge pull request #317 from DeepSenseCA/rel_1.1.1
Browse files Browse the repository at this point in the history
REL: Release version 1.1.1
  • Loading branch information
scottclowe authored Nov 17, 2022
2 parents d9167e3 + 7ce5e9b commit 07f5d1f
Show file tree
Hide file tree
Showing 38 changed files with 1,759 additions and 1,304 deletions.
14 changes: 14 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
coverage:
status:
project:
default:
# Commits pushed to main should not make the overall
# project coverage decrease by more than 1%
target: auto
threshold: 1%
patch:
default:
# Be tolerant on slight code coverage diff on PRs to limit
# noisy red coverage status on github PRs.
target: auto
threshold: 1%
185 changes: 185 additions & 0 deletions .github/workflows/build-release-candidate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# Build wheels and executables for Windows

name: build release candidate

on:
push:
branches:
# Release branches.
# Examples: "v1", "v3.0", "v1.2.x", "1.5.0", "1.2rc0"
# Expected usage is (for example) a branch named "v1.2.x" which contains
# the latest release in the 1.2 series.
- 'v[0-9]+'
- 'v?[0-9]+.[0-9x]+'
- 'v?[0-9]+.[0-9]+.[0-9x]+'
- 'v?[0-9]+.[0-9]+.[0-9]+.[0-9x]+'
- 'v?[0-9]+.[0-9x]+rc[0-9]*'
tags:
# Run whenever any tag is created
- '**'
pull_request:
branches:
# Release branches
- 'v[0-9]+'
- 'v?[0-9]+.[0-9x]+'
- 'v?[0-9]+.[0-9]+.[0-9x]+'
- 'v?[0-9]+.[0-9]+.[0-9]+.[0-9x]+'
- 'v?[0-9]+.[0-9x]+rc[0-9]*'
release:
# Run on a new release
types: [created, edited, published]

jobs:
build-executable:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
python-version: ["3.7"]
frozen: ["frozen"]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}

defaults:
run:
shell: cmd

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: System information
run: python .github/workflows/system_info.py

- name: Install common dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install --upgrade setuptools twine
python -m pip install flake8
- name: Install frozen dependencies
if: ${{ matrix.frozen }}
run: |
python -m pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
python -m pip install -r frozen_requirements.txt
- name: Install package
run: python -m pip install .[dev,test]

- name: Uninstall typing (for pyinstaller)
# Otherwise we get the following error on Python 3.7:
# The 'typing' package is an obsolete backport of a standard library package and
# is incompatible with PyInstaller. Please `pip uninstall typing` then try again.
run: pip uninstall -y typing

- name: Sanity check with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings
python -m flake8 . --count --exit-zero --statistics
- name: Debug environment
run: python -m pip freeze

- name: Test with pytest
run: |
python -m pytest --cov=echofilter --cov-report term --cov-report xml --cov-config .coveragerc --junitxml=testresults.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
env_vars: OS,PYTHON
name: Python ${{ matrix.python-version }} on ${{ runner.os }}

- name: Build wheels
run: |
python setup.py sdist bdist_wheel
- name: Compile echofilter inference exe
run: |
pyinstaller bin\inference.py ^
--name echofilter ^
--add-data echofilter\checkpoints.yaml;. ^
--icon images/deepsense.ico ^
--hidden-import pkg_resources.py2_warn ^
--hidden-import colorama ^
--hidden-import torch ^
--hidden-import torchvision ^
--hidden-import Pillow ^
--hidden-import numpy ^
--hidden-import matplotlib ^
--hidden-import scipy ^
--hidden-import scipy.spatial ^
--hidden-import pandas ^
--hidden-import scikit-image ^
--hidden-import tqdm ^
--hidden-import echofilter ^
--hidden-import echofilter.data ^
--hidden-import echofilter.nn ^
--hidden-import echofilter.optim ^
--hidden-import echofilter.raw ^
--hidden-import echofilter.path ^
--hidden-import echofilter.win ^
-y --clean ^
--distpath executable
- name: Compile ev2csv exe
run: |
pyinstaller echofilter\ev2csv.py ^
--icon images/deepsense.ico ^
--hidden-import pkg_resources.py2_warn ^
--hidden-import echofilter.path ^
--hidden-import echofilter.win ^
--hidden-import tqdm ^
-y --clean ^
--distpath executable
move executable\ev2csv\ev2csv.exe executable\echofilter\
rd /s /q executable\ev2csv
- name: Test show inference help
run: executable\echofilter\echofilter.exe --help

- name: Test show inference version
run: executable\echofilter\echofilter.exe --version

- name: Test list-checkpoints
run: executable\echofilter\echofilter.exe --list-checkpoints

- name: Test list-colors
run: executable\echofilter\echofilter.exe --list-colors

- name: Test dry-run
run: executable\echofilter\echofilter.exe test-resources -n

- name: Test run
run: executable\echofilter\echofilter.exe test-resources

- name: Test skip after already ran
run: executable\echofilter\echofilter.exe test-resources -s

- name: Test show ev2csv help
run: executable\echofilter\ev2csv.exe --help

- name: Test show ev2csv version
run: executable\echofilter\ev2csv.exe --version

- name: Store wheel artifacts
uses: actions/upload-artifact@v3
with:
name: wheel-${{ matrix.os }}-py${{ matrix.python-version }}
path: dist/*

- name: Store executable artifacts
uses: actions/upload-artifact@v3
with:
name: executable-windows-py${{ matrix.python-version }}
path: executable/*
17 changes: 12 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.6", "3.7"]
python-version: ["3.6", "3.10"]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
Expand All @@ -50,13 +50,19 @@ jobs:
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}
restore-keys: ${{ runner.os }}-pip-

- name: Install dependencies
- name: Install common dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel
python -m pip install flake8
- name: Install frozen dependencies
if: ${{ matrix.frozen }}
run: |
python -m pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
python -m pip install -r frozen_requirements.txt
python -m pip install .[test]
- name: Install package
run: python -m pip install .[test]

- name: Get appdirs cache dir
id: appdirs-cache
Expand Down Expand Up @@ -84,8 +90,9 @@ jobs:
python -m pytest --cov=echofilter --cov-report term --cov-report xml --cov-config .coveragerc --junitxml=testresults.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
env_vars: OS,PYTHON
name: Python ${{ matrix.python-version }} on ${{ runner.os }}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ models/
notes/
processed/
results/
test-resources/*.evl
test-resources/*.evr
test-output/
test-resources-source/
executable/
executable2/


##---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
- id: nbstripout

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.5.2
rev: 1.5.3
hooks:
- id: nbqa-isort
args: ["--profile=black"]
Expand Down Expand Up @@ -88,7 +88,7 @@ repos:
exclude: \.(html|svg)$

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.0.0
rev: v2.2.0
hooks:
- id: setup-cfg-fmt

Expand Down
Loading

0 comments on commit 07f5d1f

Please sign in to comment.