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

suggest method for versioning of mocked codes #32

Open
ltalirz opened this issue Mar 17, 2020 · 1 comment
Open

suggest method for versioning of mocked codes #32

ltalirz opened this issue Mar 17, 2020 · 1 comment

Comments

@ltalirz
Copy link
Member

ltalirz commented Mar 17, 2020

The usual approach to versioning of codes in AiiDA is, at the moment, to encode the version both in the label and in the description of the code.

It seems to me, the documentation of mock_code should include an example of a versioned code (besides diff).
The easiest thing would simply be to follow this pattern - it might lead some people to point a code "cp2k-5.1" to an actual cp2k-6.1 binary on their system (because that's what they happen to have installed) but I still think it's still better than to have no versioning.
This is necessary for tests against multiple versions of a code, and I think we should therefore already start with good habits.

Small detail: Currently, the mock-code factory only allows setting the label, not the description of a code.
Also, both label and description can be set directly via the constructor rather than like this
https://github.com/aiidateam/aiida-testing/blob/9d88c9ef2160a742c2da08b490fa2d2f9f198225/aiida_testing/mock_code/_fixtures.py#L63
One could either make explicit label/description arguments or just forward remaining **kwargs to the Code constructor.

P.S. Currently, the kwarg for the entry point is called entry_point in the factory and input_plugin_name in the code.
One could decide to harmonize this.

@greschd
Copy link
Member

greschd commented Mar 17, 2020

Hmm, since this is already explained in the AiiDA docs, do you think it's really necessary to document again here? I mean, there is in principle nothing special about a versioned code, is there?

Small detail: Currently, the mock-code factory only allows setting the label, not the description of a code.

Sure, no harm in adding the description also.

P.S. Currently, the kwarg for the entry point is called entry_point in the factory and input_plugin_name in the code.
One could decide to harmonize this.

Hmm, this is taken from the aiida_local_code_factory (here) - not sure which one it is more convenient to be consistent with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants