Open jpakkane opened 4 years ago
Sounds like a good idea, @jpakkane do you mean this page: https://wrapdb.mesonbuild.com/catch?
Generally a project description is a global thing that probably belongs to the master branch and can be sourced from there. We already have a mechanism to ignore certain files such as readme.txt
so we can either introduce a new file with a description or reuse readme.txt
. A separate file with a bunch of metainformation might be quite nice, I am thinking a metadata.ini
file with some fields that can be filled on the repo creation. I already fill in upstream URL, but this is a github only thing, we can also have it stored in git to make git repos more self sufficient.
That page is exactly what I was thinking of, but if we ever redesign the landing page, they might also be printed on that.
Sounds good, this is more of a UX than a data problem though, so we can do that separately.
So my idea is, we can introduce a metadata.ini
which will have a description.
Other potential uses of this file can be ACLs for the project maintainers, I imagine in the future we will want to have less centralized control over individual repositories.
Plus any other per-project settings.
WDYT @jpakkane ?
Seems reasonable, but maybe it should be json instead?
INI is fairly simple and easy to read, but not extensible. I suppose this is the reason you are not in favor of it. Another benefit of INI is that we already use it in our upstream.wrap and other configuration files. Consistency is nice.
[metadata]
description = "This is a nice package"
JSON is more extensible but has quite a few limitations:
{
"metadata": {
"description": "This is a nice package"
}
}
There is also another option, textproto, which enables automated format verification.
*.proto
documents it better than a wrapper classupstream.wrap
to textproto
because of the meson core restriction on external dependencies
metadata {
description: "This is a nice package"
}
After thinking for a while I believe the best name should be either mesonwrap.*
or wrapdb.*
, where suffix depends on the chosen format, e.g. mesonwrap.ini
.
The original reason I thought of JSON was that if the description gets longer than 80 characters, it gets a bit ugly as INI files do not do wrapping. But then I remembered that JSON does not do it either. :)
I started working on wrapdb.ini
. This name seems to be the best as we describe the package in WrapDB, which is what we advertise.
I added description support to the backend. Now it will look like this, notice metadata
/v1/projects/<project>
{
"name": "zlib",
"output": "ok",
"metadata": {
"homepage": "http://zlib.net",
"description": "Wrap definitions for the zlib library"
},
"versions": [
{
"branch": "1.2.8",
"revision": 1
}
]
}
We need to start adding metadata.wrap
files to the root directory of the repositories to support this and some rendering.
I got a feedback comment that the project pages on wrapdb are a bit spartan. Perhaps a description could be added to each package. It does not have to be long just a sentence or two. So for example Lame could be described as "An MP3 sound file encoder and decoder."