aiidalab / aiidalab-widgets-base

Reusable widgets for AiiDAlab applications
MIT License
6 stars 17 forks source link

Remove warnings in unit tests #509

Closed danielhollas closed 10 months ago

danielhollas commented 11 months ago

Fixes #490.

TODO: Test things

I extracted some fixes that were actual bugs into separate PRs, #512 and #513. This is blocked until they are merged Now unblocked

codecov[bot] commented 11 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (ccfcf80) 79.97% compared to head (dcdc755) 79.92%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #509 +/- ## ========================================== - Coverage 79.97% 79.92% -0.06% ========================================== Files 27 27 Lines 3830 3815 -15 ========================================== - Hits 3063 3049 -14 + Misses 767 766 -1 ``` | [Flag](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | Coverage Δ | | |---|---|---| | [python-3.10](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | `79.92% <96.55%> (-0.06%)` | :arrow_down: | | [python-3.8](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | `79.95% <96.55%> (-0.06%)` | :arrow_down: | | [python-3.9](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | `79.95% <96.55%> (-0.06%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | Coverage Δ | | |---|---|---| | [aiidalab\_widgets\_base/data/\_\_init\_\_.py](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#diff-YWlpZGFsYWJfd2lkZ2V0c19iYXNlL2RhdGEvX19pbml0X18ucHk=) | `43.33% <ø> (ø)` | | | [aiidalab\_widgets\_base/nodes.py](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#diff-YWlpZGFsYWJfd2lkZ2V0c19iYXNlL25vZGVzLnB5) | `95.20% <100.00%> (ø)` | | | [aiidalab\_widgets\_base/structures.py](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#diff-YWlpZGFsYWJfd2lkZ2V0c19iYXNlL3N0cnVjdHVyZXMucHk=) | `77.92% <100.00%> (-0.07%)` | :arrow_down: | | [aiidalab\_widgets\_base/viewers.py](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#diff-YWlpZGFsYWJfd2lkZ2V0c19iYXNlL3ZpZXdlcnMucHk=) | `70.90% <100.00%> (-0.04%)` | :arrow_down: | | [tests/test\_databases.py](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#diff-dGVzdHMvdGVzdF9kYXRhYmFzZXMucHk=) | `100.00% <100.00%> (ø)` | | | [tests/test\_process.py](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#diff-dGVzdHMvdGVzdF9wcm9jZXNzLnB5) | `95.68% <100.00%> (-0.22%)` | :arrow_down: | | [tests/test\_viewers.py](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#diff-dGVzdHMvdGVzdF92aWV3ZXJzLnB5) | `100.00% <100.00%> (ø)` | | | [aiidalab\_widgets\_base/process.py](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#diff-YWlpZGFsYWJfd2lkZ2V0c19iYXNlL3Byb2Nlc3MucHk=) | `78.58% <0.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

danielhollas commented 10 months ago

@unkcpz can you take a look? Would be nice to get this to 2.1 version so we have more confidence in our test suite.

unkcpz commented 10 months ago

Sure, I'll take it a look ASAP. In case you get more grumpy ;)

image

danielhollas commented 10 months ago

Sure, I'll take it a look ASAP. In case you get more grumpy ;)

Haha :smiling_face_with_tear: That when I tried (ultimately unsuccessfully) to get rid of some warnings coming from Selenium.

danielhollas commented 10 months ago

@unkcpz the code is good to go from my side. However, I have not yet manually tested that I did not break anything (although we have better and better tests). If you could help with that that would be appreciated. The main thing is to test the viewer() since that has seen to most change.

unkcpz commented 10 months ago

I gave it a test on the QE app and it didn't break anything yet. I'll make an beta release for AWB and do a thorough test on the rc release in QEapp.

danielhollas commented 10 months ago

Cool, let's go for it, I will also test it in my app. The other PRs should merge the master now to ensure that no new warnings are introduced. CC @yakutovicha