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

[QA] Component library tests #872

Merged
merged 24 commits into from
Nov 26, 2024
Merged

[QA] Component library tests #872

merged 24 commits into from
Nov 26, 2024

Conversation

l0uden
Copy link
Contributor

@l0uden l0uden commented Nov 13, 2024

Description

Moved component library tests from vizro-qa

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

    • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
    • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
    • I have not referenced individuals, products or companies in any commits, directly or indirectly.
    • I have not added data or restricted code in any commits, directly or indirectly.

Copy link
Contributor

github-actions bot commented Nov 13, 2024

View the example dashboards of the current commit live on PyCafe ☕ 🚀

Updated on: 2024-11-25 15:29:21 UTC
Commit: 335fd21

Link: vizro-core/examples/dev/

Link: vizro-core/examples/scratch_dev

Link: vizro-core/examples/visual-vocabulary/

Link: vizro-ai/examples/dashboard_ui/

@l0uden l0uden marked this pull request as ready for review November 14, 2024 12:49
Copy link
Contributor

@antonymilne antonymilne left a comment

Choose a reason for hiding this comment

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

Generally looks good 👍 I have lots of questions and comments just to make sure we get the initial structure and naming right. I'm not so familiar with testing images either so except lots of questions!

In general, as we move code into our main repo I'm going to apply a slightly higher standard of review compared to the vizro-qa repo so there might be a lot of comments! Very happy to discuss anything that's not clear though 🙂

.github/workflows/test-component-library-vizro-core.yml Outdated Show resolved Hide resolved
.github/workflows/test-component-library-vizro-core.yml Outdated Show resolved Hide resolved
.github/workflows/test-component-library-vizro-core.yml Outdated Show resolved Hide resolved
.github/workflows/test-component-library-vizro-core.yml Outdated Show resolved Hide resolved
vizro-core/hatch.toml Outdated Show resolved Hide resolved
vizro-core/tests/helpers/common.py Outdated Show resolved Hide resolved
vizro-core/tests/helpers/common.py Outdated Show resolved Hide resolved
vizro-core/tests/helpers/common.py Outdated Show resolved Hide resolved
vizro-core/tests/screenshots/base_kpi_comp_lib.png Outdated Show resolved Hide resolved
@l0uden
Copy link
Contributor Author

l0uden commented Nov 20, 2024

@antonymilne , thanks for the very useful review comments!
I've fixed them all without comments under your reviews, but left answers were it was most important.

Copy link
Contributor

@antonymilne antonymilne left a comment

Choose a reason for hiding this comment

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

This looks really great, thank you!

I've added a few more minor suggestions. Most important thing is I don't think assert_image_equal quite makes sense yet and we should probably break it into two functions. See what you think.

Once you've made any changes based on this round of review let's get @maxschulz-COL to have a final look through and then it's good to merge 💯

vizro-core/pyproject.toml Outdated Show resolved Hide resolved
vizro-core/tests/integration/test_examples.py Show resolved Hide resolved
vizro-core/tests/tests_utils/e2e_asserts.py Outdated Show resolved Hide resolved
vizro-core/tests/tests_utils/e2e_asserts.py Outdated Show resolved Hide resolved
vizro-core/tests/e2e/test_component_library.py Outdated Show resolved Hide resolved
vizro-core/tests/tests_utils/e2e_asserts.py Outdated Show resolved Hide resolved
l0uden and others added 3 commits November 20, 2024 14:11
…sey/vizro into qa/component_library_tests

� Conflicts:
�	vizro-core/tests/e2e/test_component_library.py
�	vizro-core/tests/tests_utils/e2e_asserts.py
@l0uden
Copy link
Contributor Author

l0uden commented Nov 20, 2024

@antonymilne , finished with your latest suggestions

Copy link
Contributor

@antonymilne antonymilne 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, just made a small suggestion but otherwise @maxschulz-COL please could you do a quick check through and then feel free to merge!

vizro-core/tests/e2e/test_component_library.py Outdated Show resolved Hide resolved
vizro-core/tests/tests_utils/e2e_asserts.py Outdated Show resolved Hide resolved
vizro-core/tests/tests_utils/e2e_asserts.py Outdated Show resolved Hide resolved
Copy link
Contributor

@maxschulz-COL maxschulz-COL 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 to me, thanks also for A to make such a thorough review before. I didn't write down any comment, but I think the e2e_asserts.py would benefit from a few inline code comments about what you are doing. Since not everyone will be super familiar with cv2 etc, it is sometime hard to guess what even the overall strategy is. Maybe a few comments guide a reader on what the code is doing might be helpful?

vizro-core/hatch.toml Show resolved Hide resolved
vizro-core/tests/tests_utils/e2e_asserts.py Show resolved Hide resolved
@l0uden
Copy link
Contributor Author

l0uden commented Nov 25, 2024

Looks good to me, thanks also for A to make such a thorough review before. I didn't write down any comment, but I think the e2e_asserts.py would benefit from a few inline code comments about what you are doing. Since not everyone will be super familiar with cv2 etc, it is sometime hard to guess what even the overall strategy is. Maybe a few comments guide a reader on what the code is doing might be helpful?

Left comments about cv2 logic

All your comment are now addressed, thanks!

@l0uden l0uden merged commit 5f75529 into main Nov 26, 2024
36 checks passed
@l0uden l0uden deleted the qa/component_library_tests branch November 26, 2024 11:11
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.

3 participants