Skip to content

Commit

Permalink
Improve test coverage and documentation (#64)
Browse files Browse the repository at this point in the history
* Add visualize_benchmark function

* Improve test coverage

* Continue improving coverage

* Continue improving coverage

* Continue improving coverage

* Continue improving coverage, add is_fitted checks

* Update BaseEstimator validator

* Continue improving coverage

* Continue improving coverage

* Continue improving coverage

* Continue improving coverage

* Continue improving coverage

* Continue improving coverage

* Continue improving coverage

* Improve coverage - serialization

* Continue improving coverage - models/ddh

* Continue improving coverage - models

* Continue improving coverage - models/ts_model

* Continue improving coverage - models

* Update AUTHORS

* Add tutorials -> docs user guide conversion

* Update README examples

* Update image

* Reorganize README

* Update README

* Update README

* Update README

* Update image

* Add dev docs

* Add favicon, workaround for logo

* Remove xdist from test_*.yml

* Fix previous commit

* Remove keepalive action

* Restore xdist

* Add multiple dependency versions test workflow

* Update test_deps

* Tidy README

* CI failure investigation: Try no para. & no vis

* Restore xdist, keep vis. test disabled

* Previous commit continued
  • Loading branch information
DrShushen committed May 30, 2023
1 parent 01c9fcb commit 67ebd74
Show file tree
Hide file tree
Showing 156 changed files with 14,575 additions and 728 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: true
# Prevents scheduled run being disabled after no commit
# for some time (creates a dummy commit):
- uses: gautamkrishnar/keepalive-workflow@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/test_deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: "Tests: Dependency Versions"

on:
schedule:
# This schedule is monthly.
- cron: "29 3 12 * *"
workflow_dispatch:

jobs:
# Lint code with pre-commit.
Linter:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8]
os: [ubuntu-latest]
env:
CODECOV_OS: ${{ matrix.os }}
CODECOV_PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install pre-commit
- name: Run pre-commit validation
run: pre-commit run --all-files

# Run tests with pytest.
# Test with the dependency versions specified in the matrix.
Tests:
needs: [Linter]
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8]
os: [ubuntu-latest]
dep:
- torch==1.10
- torch>=2
- pandas==1.3
- pandas>=2
- numpy==1.20
- numpy>=1.24
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip" # Caching pip dependencies.
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .[dev]
pip install "${{ matrix.python-version }}"
- name: Test with pytest (xdist)
if: matrix.os != 'ubuntu-latest'
run: pytest -vvvx -n auto -m "not slow and not extra and not skipci" --durations=50 --cov
- name: Test with pytest
if: matrix.os == 'ubuntu-latest'
run: pytest -vvvx -m "not slow and not extra and not skipci" --durations=50 --cov
3 changes: 0 additions & 3 deletions .github/workflows/test_full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: true
# Prevents scheduled run being disabled after no commit
# for some time (creates a dummy commit):
- uses: gautamkrishnar/keepalive-workflow@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ repos:
hooks:
- id: trailing-whitespace
args: ['--markdown-linebreak-ext=md']
exclude: 'docs/user_guide' # Auto-generated, leave as is.
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-ast
Expand All @@ -18,6 +19,7 @@ repos:
- id: check-executables-have-shebangs
- id: debug-statements
- id: end-of-file-fixer
exclude: 'docs/user_guide' # Auto-generated, leave as is.
- id: pretty-format-json
args: ['--autofix', '--indent=4', '--no-sort-keys']
- id: requirements-txt-fixer
Expand Down Expand Up @@ -45,6 +47,7 @@ repos:
hooks:
- id: blacken-docs
additional_dependencies: [black]
exclude: 'docs/user_guide' # Auto-generated, leave as is.

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF
# formats:
# - pdf
formats:
- pdf

python:
install:
Expand Down
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Contributors

* Evgeny Saveliev [[email protected]](mailto:[email protected])
* Bogdan Cebere [[email protected]](mailto:[email protected])
Loading

0 comments on commit 67ebd74

Please sign in to comment.