aiidalab / aiidalab-widgets-base

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

allow structures with different periodicity, add periodicity #488

Closed AndresOrtegaGuerrero closed 1 year ago

AndresOrtegaGuerrero commented 1 year ago

fixes #485

The user can see the cell parameters of StructureData with pbc != True, True, True The PR also add a HTML line to display the periodicity of the structure

I did three test,

  1. add a xyz file (molecule) it doensnt show any cell information
  2. add a StructureData with pbc as True,True,False True, False, False obtaining "xy" and "x"
  3. using the examples where all should be "xyz"

I also included a test in test_viewers.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.13 :tada:

Comparison is base (913e990) 79.53% compared to head (88aab22) 79.67%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #488 +/- ## ========================================== + Coverage 79.53% 79.67% +0.13% ========================================== Files 27 27 Lines 3734 3749 +15 ========================================== + Hits 2970 2987 +17 + Misses 764 762 -2 ``` | Flag | Coverage Δ | | |---|---|---| | python-3.8 | `79.67% <100.00%> (+0.13%)` | :arrow_up: | | python-3.9 | `79.67% <100.00%> (+0.13%)` | :arrow_up: | 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. | [Impacted Files](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/488?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | Coverage Δ | | |---|---|---| | [aiidalab\_widgets\_base/viewers.py](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/488?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#diff-YWlpZGFsYWJfd2lkZ2V0c19iYXNlL3ZpZXdlcnMucHk=) | `70.16% <100.00%> (+0.78%)` | :arrow_up: | | [tests/test\_structures.py](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/488?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#diff-dGVzdHMvdGVzdF9zdHJ1Y3R1cmVzLnB5) | `100.00% <100.00%> (ø)` | | | [tests/test\_viewers.py](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/488?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%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.