diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dd53134b..b6137f49 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -82,6 +82,25 @@ jobs: run: invoke pytest + unit-pretrained: + runs-on: ${{ matrix.os }} + strategy: + matrix: + python-version: ['3.11'] + os: [ubuntu-latest, macos-latest, windows-latest] + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install package and dependencies + run: | + pip install invoke .[pretrained] + - name: invoke pretrained + run: invoke pretrained + + minimum: runs-on: ${{ matrix.os }} strategy: @@ -125,7 +144,7 @@ jobs: run: invoke tutorials - pretrained: + pretrained-tutorials: runs-on: ${{ matrix.os }} strategy: matrix: @@ -141,5 +160,5 @@ jobs: run: | pip install "mistune>=2.0.3,<3.1" pip install invoke jupyter .[pretrained] - - name: invoke pretrained - run: invoke pretrained + - name: invoke pretrained-tutorials + run: invoke pretrained-tutorials diff --git a/Makefile b/Makefile index 47bcf204..6787fd92 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,7 @@ fix-lint: ## fix lint issues using autoflake, autopep8, and isort .PHONY: test-unit test-unit: ## run tests quickly with the default Python - invoke pytest + invoke unit .PHONY: test-readme test-readme: ## run the readme snippets @@ -135,9 +135,13 @@ test-readme: ## run the readme snippets test-tutorials: ## run the tutorial notebooks invoke tutorials +.PHONY: test-pretrained +test-pretrained: ## run the tutorial notebooks + invoke pretrained + .PHONY: test-pretrained-tutorials test-pretrained-tutorials: ## run the tutorial notebooks - invoke pretrained + invoke pretrained-tutorials .PHONY: test test: test-unit test-readme test-tutorials ## test everything that needs test dependencies diff --git a/tasks.py b/tasks.py index 0c98d677..b6201fd8 100644 --- a/tasks.py +++ b/tasks.py @@ -19,8 +19,13 @@ @task -def pytest(c): - c.run('python -m pytest --cov=orion') +def unit(c): + c.run('python -m pytest ./tests/unit --cov=orion') + + +@task +def pretrained(c): + c.run('python -m pytest ./tests/pretrained') @task @@ -107,7 +112,7 @@ def tutorials(c): ), hide='out') @task -def pretrained(c): +def pretrained_tutorials(c): pipelines = os.listdir(os.path.join('orion', 'pipelines', 'pretrained')) for ipynb_file in glob.glob('tutorials/pipelines/*.ipynb'): for pipeline in pipelines: diff --git a/tests/primitives/test_timesfm.py b/tests/pretrained/test_timesfm.py similarity index 100% rename from tests/primitives/test_timesfm.py rename to tests/pretrained/test_timesfm.py diff --git a/tests/evaluation/test_common.py b/tests/unit/evaluation/test_common.py similarity index 100% rename from tests/evaluation/test_common.py rename to tests/unit/evaluation/test_common.py diff --git a/tests/evaluation/test_contextual.py b/tests/unit/evaluation/test_contextual.py similarity index 100% rename from tests/evaluation/test_contextual.py rename to tests/unit/evaluation/test_contextual.py diff --git a/tests/evaluation/test_point.py b/tests/unit/evaluation/test_point.py similarity index 100% rename from tests/evaluation/test_point.py rename to tests/unit/evaluation/test_point.py diff --git a/tests/evaluation/test_utils.py b/tests/unit/evaluation/test_utils.py similarity index 100% rename from tests/evaluation/test_utils.py rename to tests/unit/evaluation/test_utils.py diff --git a/tests/primitives/adapters/test_ncps.py b/tests/unit/primitives/adapters/test_ncps.py similarity index 100% rename from tests/primitives/adapters/test_ncps.py rename to tests/unit/primitives/adapters/test_ncps.py diff --git a/tests/primitives/test_anomaly_transformer.py b/tests/unit/primitives/test_anomaly_transformer.py similarity index 100% rename from tests/primitives/test_anomaly_transformer.py rename to tests/unit/primitives/test_anomaly_transformer.py diff --git a/tests/primitives/test_timeseries_anomalies.py b/tests/unit/primitives/test_timeseries_anomalies.py similarity index 100% rename from tests/primitives/test_timeseries_anomalies.py rename to tests/unit/primitives/test_timeseries_anomalies.py diff --git a/tests/primitives/test_timeseries_errors.py b/tests/unit/primitives/test_timeseries_errors.py similarity index 100% rename from tests/primitives/test_timeseries_errors.py rename to tests/unit/primitives/test_timeseries_errors.py diff --git a/tests/primitives/test_timeseries_preprocessing.py b/tests/unit/primitives/test_timeseries_preprocessing.py similarity index 100% rename from tests/primitives/test_timeseries_preprocessing.py rename to tests/unit/primitives/test_timeseries_preprocessing.py diff --git a/tests/test_analysis.py b/tests/unit/test_analysis.py similarity index 100% rename from tests/test_analysis.py rename to tests/unit/test_analysis.py diff --git a/tests/test_benchmark.py b/tests/unit/test_benchmark.py similarity index 100% rename from tests/test_benchmark.py rename to tests/unit/test_benchmark.py diff --git a/tests/test_core.py b/tests/unit/test_core.py similarity index 100% rename from tests/test_core.py rename to tests/unit/test_core.py diff --git a/tests/test_data.py b/tests/unit/test_data.py similarity index 100% rename from tests/test_data.py rename to tests/unit/test_data.py diff --git a/tests/test_functional.py b/tests/unit/test_functional.py similarity index 100% rename from tests/test_functional.py rename to tests/unit/test_functional.py