Closed danielhollas closed 1 year ago
I will work on that as hard as I can. Hopefully, by the next meeting, every widget will have a smoke test.
Thanks @yakutovicha! My original idea was to test the widgets manually to verify that they work, but of course if you add tests at the same time that would be awesome!
I will start by adding coverage reports. We will see then how bad we are.
Thanks for a great job by @yakutovicha, we can close this one, correct? It means we only have one open issue about whether keep backward compatibility for widgets listed in https://github.com/aiidalab/aiidalab-widgets-base/issues/426. Can we release a beta version so I can update QeApp for the demo?
Thanks for a great job by @yakutovicha, we can close this one, correct? It means we only have one open issue about whether keep backward compatibility for widgets listed in #426.
Not quite yet. There are still 4 modules to be tested.
Can we release a beta version so I can update QeApp for the demo?
This we can always do. I will release a new beta version now.
[UPDATE]
v2.0.0b3
is released.
One test for structure module failed locally: "FAILED tests/test_structures.py::test_smiles_widget - AttributeError: 'SmilesWidget' object has no attribute 'smiles'", @yakutovicha
One test for structure module failed locally: "FAILED tests/test_structures.py::test_smiles_widget - AttributeError: 'SmilesWidget' object has no attribute 'smiles'", @yakutovicha
I am confused. Where and when did it happen? I did a couple of merges to the master
branch and things worked fine.
I test it locally in a brand new aiidalab container.
I see, I don't have rdkit
installed, and it run in to code below:
class SmilesWidget(ipw.VBox):
"""Convert SMILES into 3D structure."""
structure = tl.Instance(ase.Atoms, allow_none=True)
SPINNER = """<i class="fa fa-spinner fa-pulse" style="color:red;" ></i>"""
def __init__(self, title=""):
self.title = title
try:
from openbabel import openbabel # noqa: F401
from openbabel import pybel # noqa: F401
except ImportError:
self.disable_openbabel = True
try: # noqa: TC101
from rdkit import Chem # noqa: F401
from rdkit.Chem import AllChem # noqa: F401
except ImportError:
super().__init__(
[
ipw.HTML(
"The SmilesWidget requires the rdkit library, "
"but the library was not found."
)
]
)
return
self.smiles = ipw.Text(placeholder="C=C")
But I am curious why the test pass in github action .. :thinking:
But I am curious why the test pass in github action .. 🤔
There is a smiles
option that installs those:
https://github.com/aiidalab/aiidalab-widgets-base/blob/3b7aff7eed76bd51d7232836cce470c8c6256df3/setup.cfg#L61-L63
We enable it for the tests.
I see, then it is all fine. Thanks!
I think this has not been done, as exemplified in #433.
Before this, we should align ourselves about the breaking changes, discussed in #426
ToDo: