-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #295 from DeepSenseCA/rel_1.1.0
REL: Release version 1.1.0
- Loading branch information
Showing
101 changed files
with
10,003 additions
and
3,055 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[run] | ||
branch = True | ||
omit = */tests/* | ||
|
||
[report] | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
|
||
# Don't complain about missing debug-only code: | ||
def __repr__ | ||
if self\.debug: | ||
if debug: | ||
if DEBUG: | ||
|
||
# Don't complain if tests don't hit defensive assertion code: | ||
raise AssertionError | ||
raise NotImplementedError | ||
|
||
# Don't complain if non-runnable code isn't run: | ||
if 0: | ||
if False: | ||
if __name__ == .__main__.: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
# C408 ignored because we like the dict keyword argument syntax | ||
ignore = E203,E305,E402,E721,E741,F401,F403,F405,F821,F841,F999,W503,W504,C408 | ||
exclude = docs/src,venv,third_party,caffe2,scripts,docs/caffe2,tools/amd_build/pyHIPIFY,torch/lib/include,torch/lib/tmp_install,build,torch/include | ||
# C408 ignored because pytorch likes the dict keyword argument syntax | ||
# E203: whitespace before ":". Sometimes violated by black. | ||
# E402: Module level import not at top of file. Violated by lazy imports. | ||
# F401: Module imported but unused. | ||
# D100-D107: Missing docstrings | ||
# D200: One-line docstring should fit on one line with quotes. | ||
extend-ignore = C408,E203,E402,F401,D100,D101,D102,D103,D104,D105,D106,D107,D200 | ||
docstring-convention = numpy | ||
# Ignore missing docstrings within unit testing functions. | ||
per-file-ignores = **/tests/:D100,D101,D102,D103,D104,D105,D106,D107 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Docs workflow | ||
# | ||
# Ensures that the docs can be built with sphinx. | ||
# - On every push and PR, checks the HTML documentation builds on linux. | ||
# - On every PR and tag, checks the documentation builds as a PDF on linux. | ||
# - If your repository is public, on pushes to the default branch (i.e. either | ||
# master or main), the HTML documentation is pushed to the gh-pages branch, | ||
# which is automatically rendered at the publicly accessible url | ||
# https://USER.github.io/PACKAGE/ | ||
|
||
name: docs | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
docs-html: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Check if README.md needs to be converted | ||
id: check_readme | ||
run: | | ||
if [ ! -f "README.rst" ] && [ -f "README.md" ]; then | ||
echo '::set-output name=convert::true'; | ||
fi | ||
- name: Convert README.md to README.rst | ||
if: steps.check_readme.outputs.convert == 'true' | ||
uses: docker://pandoc/core:2.9 | ||
with: | ||
args: >- | ||
README.md | ||
--from=gfm | ||
--output=README.rst | ||
- name: Build HTML docs | ||
uses: ammaraskar/sphinx-action@master | ||
with: | ||
docs-folder: "docs/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
Print out some handy system info. | ||
""" | ||
|
||
import os | ||
import platform | ||
import sys | ||
|
||
print("Build system information") | ||
print() | ||
|
||
print("sys.version\t\t", sys.version.split("\n")) | ||
print("os.name\t\t\t", os.name) | ||
print("sys.platform\t\t", sys.platform) | ||
print("platform.system()\t", platform.system()) | ||
print("platform.machine()\t", platform.machine()) | ||
print("platform.platform()\t", platform.platform()) | ||
print("platform.version()\t", platform.version()) | ||
print("platform.uname()\t", platform.uname()) | ||
if sys.platform == "darwin": | ||
print("platform.mac_ver()\t", platform.mac_ver()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# Regular tests | ||
# | ||
# Use this to ensure your tests are passing on every push and PR (skipped on | ||
# pushes which only affect documentation). | ||
# There is also a cron job set to run weekly on the default branch, to check | ||
# against dependency chain rot. | ||
# | ||
# You should make sure you run jobs on at least the *oldest* and the *newest* | ||
# versions of python that your codebase is intended to support. | ||
|
||
name: tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * 1" | ||
branches: [ $default-branch ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.6", "3.7"] | ||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: ${{ matrix.python-version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: System information | ||
run: python .github/workflows/system_info.py | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: echo "::set-output name=dir::$(pip cache dir)" | ||
|
||
- name: pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }} | ||
restore-keys: ${{ runner.os }}-pip- | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 | ||
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: Get appdirs cache dir | ||
id: appdirs-cache | ||
run: echo "::set-output name=dir::$(python -c 'from echofilter.ui.checkpoints import get_default_cache_dir as c; print(c())')" | ||
|
||
- name: Cache checkpoints | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.appdirs-cache.outputs.dir }} | ||
key: checkpoints-${{ hashFiles('**/echofilter/checkpoints.yaml') }} | ||
restore-keys: checkpoints- | ||
|
||
- name: Sanity check with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
python -m flake8 . --count --select=E9,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@v1 | ||
with: | ||
flags: unittests | ||
env_vars: OS,PYTHON | ||
name: Python ${{ matrix.python-version }} on ${{ runner.os }} | ||
|
||
- name: Test show help | ||
run: echofilter -h | ||
|
||
- name: Test show version | ||
run: echofilter --version | ||
|
||
- name: Test list-checkpoints | ||
run: echofilter --list-checkpoints | ||
|
||
- name: Test list-colors | ||
run: echofilter --list-colors | ||
|
||
- name: Test dry-run | ||
run: echofilter test-resources -n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.