Add list-dependencies as a sub-command to checkpoint.#88
Add list-dependencies as a sub-command to checkpoint.#88
Conversation
| click.echo('Anemoi module versions in checkpoint:') | ||
| for name, version in provenance["module_versions"].items(): | ||
| if name.startswith('anemoi'): | ||
| click.echo(f' {name}: {version}') |
There was a problem hiding this comment.
maybe write this in the format {name}=={version}, so it can be used as part of some installation process at some point?
There was a problem hiding this comment.
Hm, ok, if the output should prepare for automation, I guess I should just remove the validate_environment thing also? Or maybe add it as a separate command?
What do you think of limit this to just anemoi packages? Not sure whats best here.
There was a problem hiding this comment.
maybe validate-environment as a command-line switch?
There was a problem hiding this comment.
Yupp, will do. Maybe the output should be as a pylock file? Then it can be directly used I think. https://packaging.python.org/en/latest/specifications/pylock-toml/
|
Are we sure these are always correct? |
What do you mean? That the listing can fail because it can't find the correct metadata? Yes, I think this can happen. The path |
My concern is more that I often see references to non-existing package versions, and things like that. But in that case, the problem may very well be with the checkpoint creators, rather than this PR. |
We could try to be smart, and try to find the "closest released version" of the versions listed in the checkpoint, and then list these official versions instead? |
...or just accept that the versions may be wrong, and make it a manual task to fix them |
No description provided.