Skip to content
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

Plan for a coding week #74

Open
5 of 10 tasks
danielhollas opened this issue Nov 18, 2024 · 4 comments
Open
5 of 10 tasks

Plan for a coding week #74

danielhollas opened this issue Nov 18, 2024 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@danielhollas
Copy link
Collaborator

danielhollas commented Nov 18, 2024

Here's a rough plan for my work on this package during the AiiDA coding.
I'll see how far I'll get, since I also want to work on AiiDAlab related things.

This is the list of tasks, roughly in the order they need to be done

@danielhollas danielhollas self-assigned this Nov 18, 2024
@danielhollas
Copy link
Collaborator Author

CC @giovannipizzi @ltalirz @unkcpz Let me know if the plan above sounds good, and please tag people who you know might be interested in this (and potentially available to review the PRs).

@DropD
Copy link

DropD commented Nov 20, 2024

What I would like to see is an integrated way to skip running a "mock code". Instead, I would like to get a calcjob node instance, which has the inputs and cached outputs connected to it. This could be used to unit test parsers, workchain logic etc. I've seen custom implementations for this in many plugins for testing parsers, including the two I (co-)authored, aiida-vasp and aiida-icon.

Having this integrated would be nice for two reasons:

  • If you set up tests with aiida-test-cache you would get data for parser unit tests "for free"
  • Depending on what you want to test, it might completely eliminate the need for an additional script, which mimicks the code

@ltalirz
Copy link
Member

ltalirz commented Nov 20, 2024

You seem to be describing what export_cache/archive_cache does.

Both the mock code and the archive_cache have use cases.

I'll paste here what I wrote to Daniel in reply to his email, perhaps this can be integrated in the repo README

Edit: Maybe I'm wrong about the "cannot test parsers" in export_cache- I've never used it

===
I would say aiida-testing solves the following problem in the testing of AiiDA plugins:
What do you do, if you can't run the executable your plugin is wrapping in your continuous integration tests? (because you need to test runs that are too expensive to run on the CI runners / because the license forbids it / ...)

It solves it in two different ways, each of which have their pros and cons:

I do think that this use case continues to exist (aiida-vasp, ...) and requires a working solution.
Besides keeping it compatible with the new backends, perhaps one of the most impactful things to do would be to improve the documentation of aiida-testing to the point where someone can come to the plugin repo and understand what I wrote above.

@danielhollas
Copy link
Collaborator Author

Thanks both!

Just a note that I haven't made as much progress as I wanted as there's a lot of other stuff going on during the coding week, but I am interested in pursuing this beyond as well.

I currently got stuck on trying to get the tests pass for newer aiida-core versions that had quite a few changes to caching infrastructure. I need to find more focused time to dig into the internals.

One immediate thought that I had while digging through the implementation of the fixtures here: they seem to be mucking deep with the caching infrastructure of aiida-core, so even when I fix the issues with the new AiiDA versions, I am afraid that these fixtures would still be brittle. I see two ways to improve it:

  1. Move these fixtures to aiida-core and support them there. Any change to caching would be immediately applied.
  2. Provide necessary abstractions in aiida-core, so that these fixtures don't need to rely on the internals (or at least not as much).

I guess I am slightly leaning towards 2., since this repo has other stuff in it besides the fixtures (e.g. configuration management) so I don't know if it makes sense to integrate to aiida-core (at least not before things stabilize a bit).

Anyway, this is just my morning rambling, at some point I'll turn this into a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants
@ltalirz @DropD @danielhollas and others