aiidalab / aiidalab-widgets-base

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

Allow register different viewers for different WorkChain. #541

Closed superstar54 closed 5 months ago

superstar54 commented 10 months ago

Fix #540 , use process_type as the node viewer's key.

Here is an example, https://github.com/aiidalab/aiidalab-qe/pull/559

danielhollas commented 10 months ago

I think this will need some discussion, since it would be a breaking change?

superstar54 commented 10 months ago

Now it has backward capacity. I agree we need more discussion on it.

danielhollas commented 10 months ago

Thanks @superstar54. Can you take a look at the failing tests? Looks like the failures might not be related to this PR, but should be fixed regardless.

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.21%. Comparing base (826ad43) to head (763d84e). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #541 +/- ## ========================================== + Coverage 96.17% 96.21% +0.03% ========================================== Files 11 11 Lines 1177 1188 +11 ========================================== + Hits 1132 1143 +11 Misses 45 45 ``` | [Flag](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/541/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/541/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | `96.21% <100.00%> (+0.03%)` | :arrow_up: | | [python-3.9](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/541/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | `96.21% <100.00%> (+0.03%)` | :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.

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

superstar54 commented 10 months ago

The failed test is caused by a update in the template in aiida-resource-registry repo, which add a new version field. I fixed it.

danielhollas commented 9 months ago

@superstar54 thank you for fixing the test. Could you please make a separate PR with that fix? I assume the test failures would pop up on other PRs as well?

Does this PR need to be merged for 2.1.0 version?

superstar54 commented 5 months ago

The only thing missing here is a unit test for the new behaviour.

Hi @danielhollas , I added a unit test for this behavior. Could you please have a look?