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

Fix test_export_html and run it on CI #275

Merged
merged 5 commits into from
Nov 15, 2023
Merged

Conversation

alessandrofelder
Copy link
Member

@alessandrofelder alessandrofelder commented Nov 15, 2023

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

The previously pytest.mark.local test test_export_html.py was failing locally.

What does this PR do?

  • Makes test_export_html.py pass locally and now also on the CI system, achieved by:
    • I had a visual look at the created test.html file and it looks as I would expect it (below).
    • updated calls to vedo
    • the decision that the export function should not affect the current camera, and therefore removing a line from export().
  • Minor refactor of the test so it's more modular

image

References

Closes #274

How has this PR been tested?

CI passes with new non-local test. Note there was a presumably spurious crash on the Windows CI at one commit here.

Is this a breaking change?

No.

Does this PR require an update to the documentation?

No.

Checklist:

  • The code has been tested locally
  • [NA] Tests have been added to cover all new functionality (unit & integration)
  • [NA] The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

…ckend is scoped

k3d seems like a good choice for html as k3d provides standalone HTML/JS rendering capabilities: https://github.com/K3D-tools/K3D-jupyter
it is one of the options for a jupyter notebook too. see https://vedo.embl.es/docs/vedo.html
I don't see why our export function should affect the camera.
I removed it here because camera is an empty list in the test.
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (49817bd) 67.94% compared to head (fe20094) 72.46%.

Additional details and impacted files
@@             Coverage Diff              @@
##           mega-fix     #275      +/-   ##
============================================
+ Coverage     67.94%   72.46%   +4.51%     
============================================
  Files            26       26              
  Lines          1195     1195              
============================================
+ Hits            812      866      +54     
+ Misses          383      329      -54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alessandrofelder alessandrofelder changed the base branch from master to mega-fix November 15, 2023 14:33
@alessandrofelder alessandrofelder marked this pull request as ready for review November 15, 2023 14:37
@alessandrofelder alessandrofelder self-assigned this Nov 15, 2023
Copy link
Member

@IgorTatarnikov IgorTatarnikov left a comment

Choose a reason for hiding this comment

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

Looks good!

@IgorTatarnikov IgorTatarnikov merged commit 1f2067c into mega-fix Nov 15, 2023
13 checks passed
@IgorTatarnikov IgorTatarnikov deleted the fix-test-export branch November 15, 2023 16:12
@alessandrofelder alessandrofelder mentioned this pull request Dec 1, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

local test test_export_html.py fails
2 participants