-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace unnecessary use of aiida_profile_clean
#5814
Replace unnecessary use of aiida_profile_clean
#5814
Conversation
Anyone for this one? @unkcpz @mbercx @ramirezfranciscof ? |
872a631
to
3d8f358
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not finished yet. I'll continue after the group meeting.
A quick question, after this PR, how long it will save to run all tests? The total time compare with CI tests of other PR, the tests of 3.11 is fast but not 3.8.
If I understand correctly, there is only one profile during a pytest?
@@ -19,8 +19,9 @@ | |||
|
|||
|
|||
@pytest.fixture | |||
def setup_groups(aiida_profile_clean): | |||
def setup_groups(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it seems more clear to use aiida_profile_clean
.
Unfortunately the run time of the tests on Github Actions are not very stable so it is difficult to say with certainty what the exact speed up is. But the tests of this PR ran in 13m 37s and 13m 27s. For comparison, the latest run on the
Mostly yes. Certain tests may create an additional profile on the fly for just that test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sphuber Thanks! Just some minor requests.
The `aiida_profile_clean` will clean the storage backend, which often is an expensive operation. For the `PsqlDosBackend` for example, this means dropping all database tables and deleting the file repository before recreating a clean instance of both from scratch. Often tests just require a profile to be loaded but it doesn't have to be clean. The tests can be sped up significantly by only using the `aiida_profile_clean` fixture where it is really necessary.
3d8f358
to
be9f2a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all good to me. Cheers!
be9f2a8
to
1334c52
Compare
Fixes #5770