Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.
This repository was archived by the owner on May 23, 2025. It is now read-only.

[WIP] Algorithm to obtain metadata from an addon name #10

Description

@sbidoul

I will describe here a possible algorithm to obtain the metadata from a single addon name.

The main idea is to obtain the metadata from https://pypi.org/simple. The advantage of this approach is that it can be done in javascript in the browser, so the documentation page for an addon can be static, with a dynamic widget showing the metadata.

How to list the Odoo series for which the addon is available

In short:

  • if https://pypi.org/simple/odoo-addon-{addon-name}/ exists, look at the available wheel versions (will give series >= 15)
  • for older series, look for https://pypi.org/simple/odoo-addon{series}-{addon-name}/

Example : curl -sSL -H "Accept: application/vnd.pypi.simple.v1+json" https://pypi.org/simple/odoo-addon-mis-builder | jq

Details TBC.

How to get a METADATA file for an addon and Odoo series

In short: find the URL of the last available wheel and add a .metadata suffix. This will give a METADATA file as described below.

Details TBC.

Metadata details

Here we show the mapping from METADATA entries to __manifest__.py entries. Example.

  • Home-Page: website (GitHub repo URL)
  • Authors: author
  • Summary: summary
  • Requires-Dist: depends + external_dependencies["python"]
  • Version: version (plus one last digit, or plus .devN for older series)
  • License: license

__manifest__ metadata that is not available:

  • maintainers

The README is available in the METADATA files, so this may be exploitable in the browser? It is in .rst format, though.

TBC

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions