Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/onnx_batch_transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
s-rog authored Dec 12, 2020
2 parents 33553ca + b5a2afd commit ea1be78
Show file tree
Hide file tree
Showing 123 changed files with 3,560 additions and 880 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci_test-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ jobs:
with:
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: always()
if: failure()

- name: Statistics
if: success()
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci_test-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,4 @@ jobs:
with:
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: always()
if: failure()
3 changes: 1 addition & 2 deletions .github/workflows/ci_test-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ jobs:
with:
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: always()
if: failure()

- name: Statistics
if: success()
Expand Down
93 changes: 30 additions & 63 deletions .github/workflows/code-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,88 +22,55 @@ jobs:
- name: Run isort
run: isort --settings-path=./pyproject.toml --check-only --diff .

code-black:
name: Check code formatting with Black
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Black
run: pip install black==19.10b0
- name: Run Black
run: echo "LGTM"
# run black --skip-string-normalization --config=pyproject.toml --check . # TODO, uncomment
#code-black:
# name: Check code formatting with Black
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Set up Python 3.8
# uses: actions/setup-python@v2
# with:
# python-version: 3.8
# - name: Install Black
# run: pip install black==19.10b0
# - name: Run Black
# run: echo "LGTM"
# run black --skip-string-normalization --config=pyproject.toml --check . # TODO, uncomment

python-types:
name: Python static type checking with Pyright
python-pep8:
name: Python formatting PEP8
runs-on: ubuntu-20.04

# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 15
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7

# Note: This uses an internal pip API and may not always work
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-extras-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements/extra.txt') }}
restore-keys: |
${{ runner.os }}-pip-extras-
- name: Install dependencies
env:
HOROVOD_BUILD_ARCH_FLAGS: "-mfma"
HOROVOD_WITHOUT_MXNET: 1
HOROVOD_WITHOUT_TENSORFLOW: 1
run: |
# python -m pip install --upgrade --user pip
pip install --requirement requirements.txt --upgrade-strategy only-if-needed --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet
pip install --requirement ./requirements/devel.txt --quiet
# pip install tox coverage
python --version ; pip --version ; pip list
shell: bash

- name: Set up node
uses: actions/setup-node@v1
with:
node-version: '12'

- name: Install pyright
run: |
npm install pyright
pip install flake8
- name: Run type checking
- name: Run checking
run: |
$(npm bin)/pyright --project .pyrightconfig.json
flake8 .
python-pep8:
name: Python formatting PEP8
python-typing-mypy:
name: Python typing check [mypy]
runs-on: ubuntu-20.04

# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@master
- uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Install dependencies
python-version: 3.8
- name: Install mypy
run: |
pip install flake8
- name: Run checking
pip install mypy
pip list
- name: mypy check
run: |
flake8 .
mypy
11 changes: 11 additions & 0 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ jobs:
python setup.py sdist bdist_wheel
ls -lh dist/
- name: Upload to release
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
tag: ${{ github.ref }}
asset_name: packages
overwrite: false
file_glob: true

- name: Delay releasing
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: juliangruber/sleep-action@v1
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ repos:
args: [--settings-path, ./pyproject.toml]
language: system
types: [python]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.790
hooks:
- id: mypy
46 changes: 0 additions & 46 deletions .pyrightconfig.json

This file was deleted.

Loading

0 comments on commit ea1be78

Please sign in to comment.