Skip to content

Commit

Permalink
Merge branch 'staging' into andreas/mmlspark
Browse files Browse the repository at this point in the history
  • Loading branch information
anargyri committed Sep 20, 2021
2 parents 955d480 + d43e450 commit bc69bb8
Show file tree
Hide file tree
Showing 11 changed files with 905 additions and 450 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,27 @@
# - uses: actions/checkout@v2
# - uses: ./.github/workflows/actions/run-tests
# with:
# tox-env: 'spark'
# test-kind: 'unit'
# test-marker: 'spark and notebooks'

name: 'Run Python tests'
description: 'Specify parameters to configure test subsets to run and collect test report for.'
inputs:
tox-env:
description: "Name of the tox env. EX) cpu|gpu|spark
See tox.ini at root level for more info"
required: true
# Options are "cpu|gpu|spark|all" and any default tox env.
# For more info on default tox env, see https://tox.readthedocs.io/en/latest/config.html#tox-environments
default: 'all'
test-kind:
description:
"The kinds of tests to run. EX) unit|integration|smoke
description: "The kinds of tests to run. EX) unit|integration|smoke
This maps to those in the 'tests/<unit|integration|smoke>' folder"
required: true
default: 'unit'
test-marker:
description:
"Finer filter for selecting the tests to run with pytest markers.
description: "Finer filter for selecting the tests to run with pytest markers.
See https://docs.pytest.org/en/6.2.x/example/markers.html"
default: 'not gpu and not notebooks and not spark'
outputs:
Expand All @@ -44,12 +50,12 @@ runs:
# '-e py' will use the default 'python' executable found in system path
# for why using tox, see: https://tox.readthedocs.io/en/latest/index.html
# tox will do:
# 1. build and install source distribution (sdist)
# 2. run static analysis on the code (not implemented yet)
# 3. run all of the specified test environment (i.e. run tests in different py-versions, etc)
# 1. create a virtual env
# 2. build and install source distribution (sdist)
# 3. run the specified tests
# 4. show test reports
run: |
tox -e py -- tests/${{ inputs.test-kind }} -m '${{ inputs.test-marker }}'
tox -ve ${{ inputs.tox-env }} -- tests/${{ inputs.test-kind }} -m '${{ inputs.test-marker }}'
- name: Prepare Code Coverage Report
id: rename-cov-report
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ jobs:
- name: Run ${{ matrix.test-kind }} tests ('${{ matrix.test-marker }}')
uses: ./.github/workflows/actions/run-tests
with:
tox-env: 'cpu' # run the cpu tests with the 'recommenders[dev,examples]' dependencies
test-kind: ${{ matrix.test-kind }}
test-marker: ${{ matrix.test-marker }}
# Currently GitHub workflow cannot call an action from another action
Expand Down Expand Up @@ -167,6 +168,7 @@ jobs:
- name: Run ${{ matrix.test-kind }} tests ('${{ matrix.test-marker }}')
uses: ./.github/workflows/actions/run-tests
with:
tox-env: 'spark' # run the gpu tests with the 'recommenders[spark,examples,dev]' dependencies
test-kind: ${{ matrix.test-kind }}
test-marker: ${{ matrix.test-marker }}

Expand Down Expand Up @@ -202,6 +204,7 @@ jobs:
- name: Run ${{ matrix.test-kind }} tests ('${{ matrix.test-marker }}')
uses: ./.github/workflows/actions/run-tests
with:
tox-env: 'gpu' # run the gpu tests with the 'recommenders[gpu,examples,dev]' dependencies
test-kind: ${{ matrix.test-kind }}
test-marker: ${{ matrix.test-marker }}

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
- name: Run ${{ matrix.test-kind }} tests ('${{ matrix.test-marker }}')
uses: ./.github/workflows/actions/run-tests
with:
tox-env: 'cpu' # run the cpu tests with the 'recommenders[dev,examples]' dependencies
test-kind: ${{ matrix.test-kind }}
test-marker: ${{ matrix.test-marker }}
# Currently GitHub workflow cannot call an action from another action
Expand Down Expand Up @@ -138,6 +139,7 @@ jobs:
- name: Run ${{ matrix.test-kind }} tests ('${{ matrix.test-marker }}')
uses: ./.github/workflows/actions/run-tests
with:
tox-env: 'spark' # run the spark tests with the 'recommenders[spark,examples,dev]' dependencies
test-kind: ${{ matrix.test-kind }}
test-marker: ${{ matrix.test-marker }}

Expand Down Expand Up @@ -173,6 +175,7 @@ jobs:
- name: Run ${{ matrix.test-kind }} tests ('${{ matrix.test-marker }}')
uses: ./.github/workflows/actions/run-tests
with:
tox-env: 'gpu' # run the gpu tests with the 'recommenders[gpu,examples,dev]' dependencies
test-kind: ${{ matrix.test-kind }}
test-marker: ${{ matrix.test-marker }}

Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ celerybeat-schedule
*.sage.py

# Environments
.env
.venv
.env*
.venv*
env/
venv/
ENV/
Expand Down
18 changes: 13 additions & 5 deletions docs/.readthedocs.yaml → .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
version: 2

# Build from the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Add necessary apt-get packages
build:
apt_packages:
- cmake

# Explicitly set the version of Python and its requirements
python:
version: 3.7
version: "3.7"
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- all

# Build from the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
39 changes: 0 additions & 39 deletions docs/requirements.txt

This file was deleted.

Loading

0 comments on commit bc69bb8

Please sign in to comment.