Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test all backends together in CI #118

Merged
merged 17 commits into from
Apr 8, 2024
Merged

Test all backends together in CI #118

merged 17 commits into from
Apr 8, 2024

Conversation

RMeli
Copy link
Owner

@RMeli RMeli commented Apr 7, 2024

Description

Thanks to PR #107 spyrmsd now supports switching between backends and PR #111 added support for an additional backend. With multiple OSes and Python versions, the CI matrix has become large, and it can be reduced by testing all backends in one go.

This PR:

  • Adds a session fixture setting the backend, parametrised on all available backends
  • Changes some test parametrisation that were not playing nicely with re-running the tests with another backend
  • Removes the test/molecules.py file (also not playing nicely with re-running the tests) in favour of fixtures
  • Remove the backend-specific conda environments
  • Move backend tests to a separate file

Closes #110

Checklist

  • Tests
  • Changelog

@RMeli
Copy link
Owner Author

RMeli commented Apr 8, 2024

Cycling CI for #119

@RMeli RMeli closed this Apr 8, 2024
@RMeli RMeli reopened this Apr 8, 2024
@RMeli
Copy link
Owner Author

RMeli commented Apr 8, 2024

Parametrisations of the following form

@pytest.mark.parametrize(
    "G1, G2",
    [
        *[(graph.lattice(n, n), graph.lattice(n, n)) for n in range(2, 5)],
        *[(graph.cycle(n), graph.cycle(n)) for n in range(2, 5)],
    ],
)

have been changed to be parametrised on n, since they are cached and therefore don't work when changing backend (the graph remain of the first backend).

tests/conftest.py Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
.github/workflows/pytest.yml Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
@RMeli RMeli merged commit 62c5df3 into develop Apr 8, 2024
38 checks passed
@RMeli RMeli deleted the alltest branch April 8, 2024 20:28
@RMeli RMeli mentioned this pull request May 28, 2024
Jnelen added a commit to Jnelen/spyrmsd that referenced this pull request Jun 21, 2024
Fix test so it works with the changes made in PR RMeli#118

Co-authored-by: Rocco Meli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify CI with backend selection
1 participant