From 21b034a53d53c37666a274163b049dcda8636bc4 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <jirka.borovec@seznam.cz> Date: Mon, 31 Aug 2020 09:27:57 +0200 Subject: [PATCH] drop testing --- .codecov.yml | 52 --------------- .github/workflows/ci-testing.yml | 103 ------------------------------ .github/workflows/code-format.yml | 45 ------------- README.md | 3 - tests/requirements.txt | 8 --- tests/test_scripts.py | 13 ---- 6 files changed, 224 deletions(-) delete mode 100644 .codecov.yml delete mode 100644 .github/workflows/ci-testing.yml delete mode 100644 .github/workflows/code-format.yml delete mode 100644 tests/requirements.txt delete mode 100644 tests/test_scripts.py diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index 726a198..0000000 --- a/.codecov.yml +++ /dev/null @@ -1,52 +0,0 @@ -# see https://docs.codecov.io/docs/codecov-yaml -# Validation check: -# $ curl --data-binary @.codecov.yml https://codecov.io/validate - - -# https://docs.codecov.io/docs/codecovyml-reference -codecov: - bot: "codecov-io" - strict_yaml_branch: "yaml-config" - require_ci_to_pass: yes - notify: - # after_n_builds: 2 - wait_for_ci: yes - -coverage: - precision: 0 # 2 = xx.xx%, 0 = xx% - round: nearest # how coverage is rounded: down/up/nearest - range: 40...100 # custom range of coverage colors from red -> yellow -> green - status: - # https://codecov.readme.io/v1.0/docs/commit-status - project: - default: - against: auto - target: 99% # specify the target coverage for each commit status - threshold: 30% # allow this little decrease on project - # https://github.com/codecov/support/wiki/Filtering-Branches - # branches: master - if_ci_failed: error - # https://github.com/codecov/support/wiki/Patch-Status - patch: - default: - against: auto - target: 50% # specify the target "X%" coverage to hit - # threshold: 50% # allow this much decrease on patch - changes: false - -parsers: - gcov: - branch_detection: - conditional: true - loop: true - macro: false - method: false - javascript: - enable_partials: false - -comment: - layout: header, diff - require_changes: false - behavior: default # update if exists else create new - # branches: * - diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml deleted file mode 100644 index e978cfb..0000000 --- a/.github/workflows/ci-testing.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: CI testing - -# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows -on: - # Trigger the workflow on push or pull request, - # but only for the master branch - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - pytest: - - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04, macOS-10.15, windows-2019] - python-version: [3.6, 3.8] # , 3.7 - requires: ['minimal', 'latest'] - - # Timeout: https://stackoverflow.com/a/59076067/4521646 - timeout-minutes: 35 - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - # Github Actions: Run step on specific OS: https://stackoverflow.com/a/57948488/4521646 - - name: Setup macOS - if: runner.os == 'macOS' - run: | - brew install libomp # https://github.com/pytorch/pytorch/issues/20030 - - - name: Set min. dependencies - if: matrix.requires == 'minimal' - run: | - python -c "req = open('requirements.txt').read().replace('>', '=') ; open('requirements.txt', 'w').write(req)" - - # 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: Get pip cache - id: pip-cache - run: | - python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" - - - name: Cache pip - uses: actions/cache@v2 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip-${{ hashFiles('requirements.txt') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip- - - - name: Install dependencies - run: | - pip install --requirement requirements.txt --upgrade --quiet --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --use-feature=2020-resolver - pip install --requirement tests/requirements.txt --quiet --use-feature=2020-resolver - python --version - pip --version - pip list - shell: bash - - - name: Cache datasets - uses: actions/cache@v2 - with: - path: MNIST # This path is specific to Ubuntu - # Look to see if there is a cache hit for the corresponding requirements file - key: pl-datasets - - - name: Tests - run: | - coverage run --source research_mnist -m py.test research_mnist tests -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml - coverage xml - - - name: Upload pytest test results - uses: actions/upload-artifact@v2 - 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() - - - name: Statistics - if: success() - run: | - coverage report - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.xml - flags: unittests - env_vars: OS,PYTHON - name: codecov-umbrella - fail_ci_if_error: false diff --git a/.github/workflows/code-format.yml b/.github/workflows/code-format.yml deleted file mode 100644 index 47e5b18..0000000 --- a/.github/workflows/code-format.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Check Code formatting - -# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows -on: - # Trigger the workflow on push or pull request, - # but only for the master branch - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - flake8: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - 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-${{ hashFiles('requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Install dependencies - run: | - pip install -r requirements.txt -U -f https://download.pytorch.org/whl/torch_stable.html -q --use-feature=2020-resolver - pip install flake8 - python --version - pip --version - pip list - shell: bash - - - name: PEP8 - run: | - flake8 . diff --git a/README.md b/README.md index 40180bb..9cc334b 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,6 @@ ARXIV [](https://www.nature.com/articles/nature14539) --> -[](https://github.com/PyTorchLightning/pytorch-lightning-conference-seed/actions?query=workflow%3A%22CI+testing%22) - -[](https://codecov.io/gh/PyTorchLightning/pytorch-lightning-conference-seed) <!-- Conference diff --git a/tests/requirements.txt b/tests/requirements.txt deleted file mode 100644 index 09f038f..0000000 --- a/tests/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -coverage -codecov>=2.1 -pytest>=3.0.5 -pytest-cov -pytest-flake8 -flake8 -check-manifest -twine==1.13.0 \ No newline at end of file diff --git a/tests/test_scripts.py b/tests/test_scripts.py deleted file mode 100644 index 9694955..0000000 --- a/tests/test_scripts.py +++ /dev/null @@ -1,13 +0,0 @@ -from unittest import mock - -import pytest - - -@pytest.mark.parametrize('cli_args', ['--max_epochs 1 --max_steps 3']) -def test_run_mnist_trainer(cli_args): - """Test running CLI for an example with default params.""" - from research_mnist.mnist_trainer import main_cli - - cli_args = cli_args.split(' ') if cli_args else [] - with mock.patch("argparse._sys.argv", ["any.py"] + cli_args): - main_cli() -- GitLab