Add new index generation script for the updated plugin metadata specification#9
Add new index generation script for the updated plugin metadata specification#9matterhorn103 wants to merge 14 commits intoAvogadro:masterfrom
Conversation
Signed-off-by: Matthew Milner <matterhorn103@proton.me>
Signed-off-by: Matthew Milner <matterhorn103@proton.me>
Signed-off-by: Matthew Milner <matterhorn103@proton.me>
Signed-off-by: Matthew Milner <matterhorn103@proton.me>
Signed-off-by: Matthew Milner <matterhorn103@proton.me>
Signed-off-by: Matthew Milner <matterhorn103@proton.me>
Signed-off-by: Matthew Milner <matterhorn103@proton.me>
…toml Signed-off-by: Matthew Milner <matterhorn103@proton.me>
Signed-off-by: Matthew Milner <matterhorn103@proton.me>
Signed-off-by: Matthew Milner <matterhorn103@proton.me>
| [pypkg-demo] | ||
| git.repo = "https://github.com/matterhorn103/avo-plugin-demo.git" | ||
| git.commit = "dbbc4d49396ac2b7746abb0bec0af6e577d8c0c5" | ||
| src.url = "https://github.com/matterhorn103/avo-plugin-demo/archive/dbbc4d49396ac2b7746abb0bec0af6e577d8c0c5.zip" |
There was a problem hiding this comment.
Doesn't this follow from the git.commit? Or vice versa, if we have a src.url, why do we also want git.commit?
I'm wondering whether it's a good idea to have a script that helps people add to the repositories.toml or we use a GitHub action to generate some of these fields.
There was a problem hiding this comment.
It does if the plugin is hosted on GitHub.
The idea was that if the plugin is being downloaded using Git, you use the repo + ref, and if downloading the source archive directly, you use the URL. If it's done with Git there's no need to check the hash of the downloaded files, they're verified already, whereas if the archive was downloaded directly, it'll need to be hashed and checked against src.sha256.
Happy to only use one or the other, I was just under the impression that you're keen to have the plugin downloader use Git when it's available.
There was a problem hiding this comment.
I meant more along the lines of "how do we make this easy to add a new repo"
I'm okay with including all these bits if there's an easy way for someone to say "here's my repo, can you please add all the bits for me?"
There was a problem hiding this comment.
OK, that makes sense.
In that case, I'd propose that we say we "fully support" plugins from two sources:
- Certain Git-based development platforms from a list of recognised platforms, which for now means GitHub, and will hopefully in the future mean GitHub or GitLab
- Arbitrary URLs that return archives of the source code
For (1), authors should provide only git.repo and git.commit in repositories.toml, and I'll edit the script so that it derives src.url and src.sha256 for the index, so that those fields are always available and Avogadro doesn't have to determine them itself.
For (2), authors should provide only src.url and src.sha256 in repositories.toml.
Then it'd be up to you whether you want to also support "any Git repository" as a third class of source that is then only available to users who have git available for Avogadro to make use of.
There was a problem hiding this comment.
While I'd like to eventually support git checkout and cloning, for now it's probably better to keep https as the main source since most users won't have git
There was a problem hiding this comment.
I think we probably don't want this in the repository. My email is everywhere, but I think some folks might not want all of this in one easy-to-spam format.
There was a problem hiding this comment.
I assume here you're talking about the authors information? That's a fair point. Thought you might need it for the plugins list, that's all.
There was a problem hiding this comment.
Would you like for the authors field to no longer be required in the plugin's pyproject.toml at all, or for it still to be mandatory and just not put into the index?
There was a problem hiding this comment.
I'd want to strip e-mail addresses from the index. Having author names seems useful (e.g., do I trust this plugin?) but many people are cautious about their email address.
|
@ghutchis how is the Avogadro code currently getting the README of the plugins? Via the GitHub API? If so, wouldn't it be better if the index contained the URL of the README? I think it'd be really good if we can make the Avogadro end completely GitHub-agnostic. |
Yes, right now it comes from the API, e.g. https://api.github.com/repos/openchemistry/avogadrolibs/readme IMHO, we should be using Python modules for the APIs, e.g. |
No description provided.