Open unkcpz opened 2 years ago
I am thinking to separete and implementing genetic algorithm here and call aiida-optimize from my plugin.
I think that'd be great!
What is your opinion on processing this? I can either change my code to be compatible with aiida-1.x (then not compatible with 2.x). Or try to migrate aiida-optimize to compatible with aiida-core 2.x.
From my point of view, it doesn't make sense to change code which is already 2.x compliant back to 1.x. So, I'd prefer making aiida-optimize
2.x compliant.
I'm not all too familiar with the backwards-incompatible changes in 2.x: Do you think it's feasible to make aiida-optimize
compatible with both 1.x and 2.x?
Since aiida-optimize
has just had a release, I'd guess we could also drop 1.x on the next one. @bosonie what's your opinion on that?
As for the dependencies:
aiida-pytest
was a precursor to the fixtures in aiida-core
and aiida-testing
. Long-term, the goal is to remove it. For some of the parts in aiida-pytest
which have an equivalent in aiida-core
, I have already changed aiida-pytest
to be just a small wrapper around the built-in fixtures.
If you want to take the time to see how / if the aiida-pytest
fixtures within aiida-optimize
could be replaced, I'm all for it. Otherwise, I could have a look at what it takes to migrate aiida-pytest
to 2.x. I'll probably have to do this eventually anyway, for the other plugins that still use aiida-pytest
in their testing.aiida-tools
is a small collection of helpers I used across some of my plugins. For aiida-optimize
, we use check_workchain_step
, and the aiida_tools.process_inputs
module:
check_workchain_step
emits a self.report
if an error occurs in a workchain step. I'm wondering if this is still needed, or if the current AiiDA version does this anyway. If memory serves me right, this is pre-1.x code.process_inputs
allows passing a process as an input (converts it to Str
, and then back to the object). I would be tempted to just include that code (if it's still needed, I'm not up-to-date with the newest AiiDA changes..) in aiida-optimize
directly. There's only one other plugin that uses it AFAIK, and that depends on aiida-optimize
anyway.Hi all,
I completely agree to port aiida-optimize
to aiida 2.0. It is actually needed anyway since I'm preparing the aiida-siesta
for 2.0 and it will require aiida-optimize
to be compatible. The next release can already drop 1.x in my opinion.
I can also contribute to the porting if you have a bit of patience, probably next weekend, otherwise feel free to do it.
Thanks for the quick reply!
Do you think it's feasible to make aiida-optimize compatible with both 1.x and 2.x?
I agree with @bosonie we drop 1.x. There are new entry points and some backward incompatible interface change.
I can also contribute to the porting if you have a bit of patience, probably next weekend, otherwise feel free to do it.
I think I can spend some time looking after it this week. I'll start with aiida-pytest
without too much code change and leave remove this dependency for future. Then it would be straightforward for aiida-optimize to 2.x. I think it is not easy to only use EDIT: I think it can be probably replaced with aiida-core
fixtures since as I know there are no direct fixture that start daemon from custom profile.with_daemon
fixture https://github.com/aiidateam/aiida-core/blob/2c183fc4486e00f3348a1b66cdcd6d9fbfd563f0/tests/conftest.py#L376 of aiida-core.
Hi @greschd, I have a genetic algorithm workflow in my pseudopotential optimization plugin https://github.com/unkcpz/aiida-opsp which share and borrow lots of concept from this repository. I am thinking to separete and implementing genetic algorithm here and call aiida-optimize from my plugin. Leave only pseudo related code in aiida-opsp. But I working on aiida-opsp from develop branch aiida-core and compatible with just released aiida-core 2.0.0.
What is your opinion on processing this? I can either change my code to be compatible with aiida-1.x (then not compatible with 2.x). Or try to migrate aiida-optimize to compatible with aiida-core 2.x. I go through the code here and find the difficulty of the second option comes from there are also dependencies of
aiida-pytest
andaiida-tools
. I think some fixture inaiida-pytest
is now in aiida-core, but still some are special in aiida-pytest. Could you explain a bit about concept ofaiida-pytest
and your opinion in how it should be updated? I am happy to help and work on that.