Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
add tests for metatensor-torch subpackage
Browse files Browse the repository at this point in the history
we move the existing tests into metatensor-core tests
  • Loading branch information
agoscinski committed Sep 14, 2023
1 parent f1d0477 commit a27c00c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- run: pip install tox

- name: run Python tests
run: tox -e tests
- name: run Python metatensor-core tests
run: tox -e metatensor-core-tests

- name: run Python metatensor-torch tests
run: tox -e metatensor-torch-tests

- name: try building Python wheel and sdist
run: tox -e build
Expand Down
16 changes: 13 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,32 @@ ignore_basepython_conflict = true
# these are the default environments, i.e. the list of tests running when you
# execute `tox` in the command-line without anything else
envlist =
tests
metatensor-core-tests
metatensor-torch-tests
lint

lint_folders = {toxinidir}/examples {toxinidir}/src {toxinidir}/tests

[testenv]

[testenv:tests]
# this environement runs Python tests
[testenv:metatensor-core-tests]
# this environement runs Python tests with metatensor-core
usedevelop = true
deps =
ase
pytest
commands =
pytest --import-mode=append {posargs}

[testenv:metatensor-torch-tests]
# this environement runs Python tests with metatensor-torch
usedevelop = true
deps =
ase
pytest
metatensor[torch] @ https://github.com/lab-cosmo/metatensor/archive/b17bc4d.zip
commands =
pytest --import-mode=append {posargs}

[testenv:lint]
skip_install = true
Expand Down

0 comments on commit a27c00c

Please sign in to comment.