mesonbuild / mesonwrap

Meson wraps service and tools, please use https://github.com/mesonbuild/wrapdb for wraps issues
https://wrapdb.mesonbuild.com
Apache License 2.0
26 stars 7 forks source link

Descriptive text for wraps #127

Open jpakkane opened 4 years ago

jpakkane commented 4 years ago

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."

legeana commented 4 years ago

Sounds like a good idea, @jpakkane do you mean this page: https://wrapdb.mesonbuild.com/catch?

legeana commented 4 years ago

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.

jpakkane commented 4 years ago

That page is exactly what I was thinking of, but if we ever redesign the landing page, they might also be printed on that.

legeana commented 4 years ago

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 ?

jpakkane commented 4 years ago

Seems reasonable, but maybe it should be json instead?

legeana commented 4 years ago

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.


metadata {
  description: "This is a nice package"
}
legeana commented 4 years ago

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.

jpakkane commented 4 years ago

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. :)

legeana commented 4 years ago

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.

legeana commented 3 years ago

I added description support to the backend. Now it will look like this, notice metadata

Getting info about project

/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.