diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2dbcbac4f..2619760db 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -44,10 +44,10 @@ jobs: - name: Install dependencies if: steps.cached-dataset-docs.outputs.cache-hit != 'true' - run: poetry install --no-interaction --no-root -E external + run: poetry install --no-interaction --no-root - name: Install library - run: poetry install --no-interaction -E external + run: poetry install --no-interaction - name: Build docs run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 02f8aecca..818b7c9a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,10 +48,10 @@ jobs: if: | (runner.os != 'Windows') && (steps.cached-poetry-dependencies.outputs.cache-hit != 'true') - run: poetry install --no-interaction --no-root + run: poetry install --no-interaction --no-root --no-dev - name: Install library - run: poetry install --no-interaction + run: poetry install --no-interaction --no-dev - name: Run tests run: | diff --git a/moabb/tests/datasets.py b/moabb/tests/datasets.py index 2e4c60806..d86da15de 100644 --- a/moabb/tests/datasets.py +++ b/moabb/tests/datasets.py @@ -8,9 +8,6 @@ _ = mne.set_log_level("CRITICAL") -# List of dataset that requires to accept licence term: -dataset_w_accept = [Shin2017A(), Shin2017B()] - def _run_tests_on_dataset(d): for s in d.subject_list: @@ -65,5 +62,8 @@ def test_fake_dataset(self): def test_dataset_accept(self): """verify that accept licence is working""" - for ds in dataset_w_accept: - self.assertRaises(AttributeError, ds.get_data, [1]) + # Only Shin2017 (bbci_eeg_fnirs) for now + for ds in [Shin2017A(), Shin2017B()]: + # if the data is already downloaded: + if mne.get_config("MNE_DATASETS_BBCIFNIRS_PATH") is None: + self.assertRaises(AttributeError, ds.get_data, [1]) diff --git a/moabb/tests/evaluations.py b/moabb/tests/evaluations.py index 683fde9ee..d42a48a1d 100644 --- a/moabb/tests/evaluations.py +++ b/moabb/tests/evaluations.py @@ -17,7 +17,8 @@ pipelines = OrderedDict() pipelines["C"] = make_pipeline(Covariances("oas"), CSP(8), LDA()) dataset = FakeDataset(["left_hand", "right_hand"], n_subjects=2) -os.makedirs(osp.join(osp.expanduser("~"), "mne_data")) +if not osp.isdir(osp.join(osp.expanduser("~"), "mne_data")): + os.makedirs(osp.join(osp.expanduser("~"), "mne_data")) class Test_WithinSess(unittest.TestCase): diff --git a/poetry.lock b/poetry.lock index ea6cd8036..6d7057d46 100644 --- a/poetry.lock +++ b/poetry.lock @@ -617,8 +617,8 @@ test = ["pytest"] name = "tdlda" version = "0.1.0" description = "Time-decoupled linear discriminant analysis." -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=3.6.0" develop = false @@ -697,13 +697,10 @@ python-versions = ">=3.6" docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] -[extras] -external = ["tdlda"] - [metadata] lock-version = "1.1" python-versions = "^3.6.1" -content-hash = "0d1367177b8ddf1957ecbadbb302e669d9076dea7d2a9fa84c7e3e559fe44047" +content-hash = "4fcd808b6bc5ef119e2b24f8ba257685630630510b5059f4ec18f9d42d6a02a4" [metadata.files] alabaster = [ diff --git a/pyproject.toml b/pyproject.toml index 217c8ffa0..601d6327b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,8 +25,6 @@ PyYAML = "^5.0.0" pooch = "^1.3.0" requests = "^2.15.1" -tdlda = {git = "https://github.com/jsosulski/tdlda.git", rev = "0.1.0", optional = true} - [tool.poetry.dev-dependencies] Sphinx = "^3.3" sphinx-gallery = "^0.8.2" @@ -34,9 +32,7 @@ sphinx-bootstrap-theme = "^0.7.1" numpydoc = "^1.1.0" m2r2 = "^0.2.7" pre-commit = "^2.11.1" - -[tool.poetry.extras] -external = ["tdlda"] +tdlda = {git = "https://github.com/jsosulski/tdlda.git", rev = "0.1.0"} [build-system] requires = ["poetry-core>=1.0.0"]