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

JOSS review: missing dependencies for unit tests #4

Closed
AlexanderFabisch opened this issue Dec 4, 2024 · 9 comments
Closed

JOSS review: missing dependencies for unit tests #4

AlexanderFabisch opened this issue Dec 4, 2024 · 9 comments

Comments

@AlexanderFabisch
Copy link
Contributor

I installed all dependencies via pip install -e .[ci] and run python -m pytest -n auto tests/. There are multiple errors, like:

E       pxr.Tf.ErrorException: 
E               Error in 'pxrInternal_v0_24_11__pxrReserved__::UsdStage::Open' at line 1052 in file /opt/USD/pxr/usd/usd/stage.cpp : 'Failed to open layer @/home/afabisch/Projekte/scene_synthesizer/tests/data/assets/srl_kitchen/scene_overlay.usd@'

...

E               ValueError: /home/afabisch/Projekte/scene_synthesizer/tests/data/assets/partnet_mobility_v0/7236/mobility.urdf is not a file

...

E               ValueError: /home/afabisch/Projekte/scene_synthesizer/tests/data/assets/robots/franka_description/franka_panda.urdf is not a file

...

E               ValueError: /home/afabisch/Projekte/scene_synthesizer/tests/data/assets/partnet_mobility_v0/7236/mobility.urdf is not a file

...

E                   ValueError: string is not a file: /home/afabisch/Projekte/scene_synthesizer/tests/data/assets/shapenetsem/Mug/10f6e09036350e92b3f21f1137c3c347.obj

openjournals/joss-reviews#7561 (comment)

@clemense
Copy link
Collaborator

clemense commented Dec 5, 2024

Yeah, these assets are not shareable. I assume the preferred way is to remove all the tests?

@AlexanderFabisch
Copy link
Contributor Author

Not shareable as in not public or as in you don't want to add it to the repository? Running a download script before the tests shouldn't be an issue.

Removing all the tests does not make sense. Could you split it into tests with and without internal dependencies and skip the ones with internal dependencies if not available? Could you maybe also replace some of the non-public assets with freely available assets? Which assets do you use in the examples?

@clemense
Copy link
Collaborator

clemense commented Dec 6, 2024

They are not public and the ones in the examples are procedural ones from the library. With the latest update (51b1c47) I'm skipping the tests that depend on the internal files.

@AlexanderFabisch
Copy link
Contributor Author

Now I get the following errors:

FAILED tests/example_test.py::test_vertical_wall_oven_microwave_cabinet - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/exports_test.py::test_export_primitives_gltf - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/scene_test.py::test_layers - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/scene_test.py::test_collision_manager_with_scene - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/scene_test.py::test_support_as_layer - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/scene_test.py::test_adding_object_transform - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/scene_test.py::test_randomization - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/urdf_export_test.py::test_primitives_urdf_export - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/urdf_export_test.py::test_primitives_urdf_export_single_link - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/urdf_export_test.py::test_primitives_urdf_export_single_link_with_separate_assets - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/scene_test.py::test_part_as_layer - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/urdf_export_test.py::test_primitives_2_urdf_export - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/urdf_export_test.py::test_primitives_2_urdf_export_single_link - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
FAILED tests/scene_test.py::test_container_as_layer - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
ERROR tests/usd_export_test.py
ERROR tests/example_test.py::test_kitchen_collision_bounds - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
ERROR tests/exports_test.py::test_export_urdf_kitchen_collision - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
ERROR tests/example_test.py::test_kitchen_bounds - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
ERROR tests/exports_test.py::test_export_urdf_kitchen_write_meshes - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
ERROR tests/exports_test.py::test_export_urdf_kitchen_collision_write_meshes - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...
ERROR tests/exports_test.py::test_export_urdf_kitchen - ImportError: cannot import name 'examples' from 'scene_synthesizer' (/home/...

@clemense
Copy link
Collaborator

clemense commented Dec 6, 2024

Oh, sorry, now these are fixed (5a0450e).

@AlexanderFabisch
Copy link
Contributor Author

And another dependency is missing here:

ImportError while importing test module '/home/afabisch/Projekte/scene_synthesizer/tests/usd_export_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../Data/anaconda3/envs/py311/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/usd_export_test.py:15: in <module>
    import meshsets
E   ModuleNotFoundError: No module named 'meshsets'

@clemense
Copy link
Collaborator

clemense commented Dec 6, 2024

Uff, sorry, now it's fully fixed.

@AlexanderFabisch
Copy link
Contributor Author

Great, now it works for me :)

I was also interested in the test coverage. In case you are interested, I changed the pytest configuration a bit in #6

I get 55.2% coverage. Which number do you get with the closed source dependencies?

In any case, I think this issue can be closed.

@clemense
Copy link
Collaborator

clemense commented Dec 9, 2024

Great, thank you! I get 63.0% coverage with those closed source dependencies.

@clemense clemense closed this as completed Dec 9, 2024
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

No branches or pull requests

2 participants