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

Add rendering tests for the demos and add images to README #12

Merged
merged 6 commits into from Jan 29, 2021

Conversation

xhluca
Copy link
Collaborator

@xhluca xhluca commented Jan 29, 2021

About

Description of changes

Pre-Merge checklist

  • The project was correctly built with npm run build.
  • If there was any conflict, it was solved correctly.
  • All changes were documented in CHANGELOG.md.
  • All tests on CircleCI have passed.
  • All Percy visual changes have been approved.
  • Two people have 💃'd the pull request. You can be one of these people if you are a Dash core contributor.

Reference Issues

Closes #[issue number]

Other comments

@xhluca
Copy link
Collaborator Author

xhluca commented Jan 29, 2021

@jourdain the tests are failing. Can you see them?

@xhluca
Copy link
Collaborator Author

xhluca commented Jan 29, 2021

―――――――――――――――――――――――――――― test_usage_vtk_cfd.app ――――――――――――――――――――――――――――

dash_duo = <dash.testing.composite.DashComposite object at 0x7f9de5bbb320>

    def test_fn(dash_duo):
>       app = import_app(name)

tests/test_render.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
venv/lib/python3.6/site-packages/dash/testing/application_runners.py:43: in import_app
    app_module = runpy.run_module(app_file)
/usr/local/lib/python3.6/runpy.py:208: in run_module
    return _run_code(code, {}, init_globals, run_name, mod_spec)
/usr/local/lib/python3.6/runpy.py:85: in _run_code
    exec(code, run_globals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import dash
    import dash_vtk
    import dash_bootstrap_components as dbc
    import dash_html_components as html
    import dash_core_components as dcc
    from dash.dependencies import Input, Output, State
    
    import vtk
    import pyvista as pv
    import numpy as np
    from vtk.util.numpy_support import vtk_to_numpy
    
    import os
    import random
    
>   from color_maps import presets
E   ModuleNotFoundError: No module named 'color_maps'

demos/usage-vtk-cfd/app.py:16: ModuleNotFoundError

 tests/test_render.py::test_usage_vtk_cfd.app ⨯                   86% ████████▋ 
 tests/test_render.py::test_usage_algorithm.app ✓                100% ██████████
=============================== warnings summary ===============================
tests/test_render.py: 26 warnings
  /home/circleci/project/venv/lib/python3.6/site-packages/urllib3/util/retry.py:255: DeprecationWarning:
  
  Using 'method_whitelist' with Retry is deprecated and will be removed in v2.0. Use 'allowed_methods' instead

-- Docs: https://docs.pytest.org/en/stable/warnings.html

Results (69.51s):
       4 passed
       3 failed
         - tests/test_render.py:32 test_usage_pyvista_terrain_following_mesh.app
         - tests/test_render.py:32 test_usage_pyvista_point_cloud.app
         - tests/test_render.py:32 test_usage_vtk_cfd.app

Exited with code exit status 1
CircleCI received exit code 1

@xhluca
Copy link
Collaborator Author

xhluca commented Jan 29, 2021

Did you add vtk and color_maps into the demos/app-name/requirements.txt? I can't seem to find color_maps on pypi

@jourdain
Copy link
Collaborator

I did for vtk, color_maps is local to the directory.

@jourdain
Copy link
Collaborator

I'll move colormap to the utils at some point... Working the quarks now...

@xhluca
Copy link
Collaborator Author

xhluca commented Jan 29, 2021

No worries. Feel free to push to this branch and merge this when you are done!

@jourdain
Copy link
Collaborator

Several fix went to master. The preset/colormaps is now part of dash_vtk.util. I've fixed the import in the demos...

@jourdain
Copy link
Collaborator

Don't forget to re-run npm i

@xhluca
Copy link
Collaborator Author

xhluca commented Jan 29, 2021

Seems like there's an error with test_usage_pyvista_point_cloud

@xhluca
Copy link
Collaborator Author

xhluca commented Jan 29, 2021

Ok looks like the problems went away.

@jourdain I'm gonna merge this but I just wanted to make sure you are able to view the percy changes before merging; let me know!

@jourdain
Copy link
Collaborator

LGTM, what is you are able to view the percy changes?

@xhluca
Copy link
Collaborator Author

xhluca commented Jan 29, 2021

@jourdain if you click on the "percy/dash-vtk - 5 visual changes need review" can you see the changes?

@jourdain
Copy link
Collaborator

Where do I find percy/dash-vtk - 5 visual changes need review?

@xhluca
Copy link
Collaborator Author

xhluca commented Jan 29, 2021

Ok I just enabled it (was a bit counter-intuitive) you should be able to see it now along with the circleci tests!

@xhluca
Copy link
Collaborator Author

xhluca commented Jan 29, 2021

image

@jourdain
Copy link
Collaborator

I see the screenshots and they are fine. Do I need to do something?

@xhluca
Copy link
Collaborator Author

xhluca commented Jan 29, 2021

No, just wanted to make sure it works! Gonna merge now

@xhluca xhluca merged commit 7df72b2 into master Jan 29, 2021
@xhluca xhluca deleted the add-demo-tests-gallery branch January 29, 2021 17:51
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.

None yet

2 participants