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

Refactor tests #111

Merged
merged 21 commits into from
Dec 23, 2024
Merged

Refactor tests #111

merged 21 commits into from
Dec 23, 2024

Conversation

Giulero
Copy link
Collaborator

@Giulero Giulero commented Dec 5, 2024

This PR introduces a refactor of the tests which reduces the amount of files e duplicated code.
In particular - using pytest fixtures - I managed to unify the configuration phase (retrieving model path, setting up idyntree kindyn) in the conftest.py. Here pytest sets up and iterates over two robot models and the two velocity representation (mixed and body fixed). In this way we can test more than one robot model and remove files in which the only difference was the velocity representation.
The ideal case would be to let conftest.py iterate also over the adam interfaces (casadi, jax, torch, numpy, etc), but we need to handle some numerical type conversions. Right now I don't have a clear solution for this and I would leave this for a future PR!

I would also kindly ask our conda experts to check if the modifications introduced in this PR can be armful for the actual conda recipe and deploy.


📚 Documentation preview 📚: https://adam-docs--111.org.readthedocs.build/en/111/

@Giulero Giulero marked this pull request as ready for review December 21, 2024 10:56
Copy link
Contributor

@flferretti flferretti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I don't see any potential issue with the conda-forge recipe, we would just need to adjust the pytest options

tests/parametric/test_jax_parametric.py Outdated Show resolved Hide resolved
@Giulero
Copy link
Collaborator Author

Giulero commented Dec 23, 2024

Thanks a lot guys! :)

@Giulero Giulero merged commit 9dfcc37 into main Dec 23, 2024
17 of 18 checks passed
@Giulero Giulero deleted the refactor-tests branch December 23, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants