Skip to content

build: set up the plugin monorepo #1

Closed

Description

@uniqueg

Problem

foca-plugins is the monorepo for plugins of gateway services built with FOCA, such as proTES and later proWES. The repository is new and contains only a README and a license. Plugins can't be added until the layout, tooling, CI, release workflow and docs exist.

Proposal

Set up the monorepo along the conventions of cloud-registry, adapted to a monorepo of plugin packages:

  • Layout:
    • a uv workspace root (development only, not published);
    • plugins/<group>/<subgroup>/<name>/, one distribution per plugin, named foca-plugin-<group>-<subgroup>-<name>, with foca_plugins.* PEP 420 namespace packages;
    • a meta/ folder for the foca-plugins meta distribution, with extras per group and subgroup, calendar-versioned as a release train.
  • Example plugin: generic.example.noop, a copyable template. It is never published. A script creates new plugins from it.
  • Tooling: ruff, mypy, pytest with 100% coverage, pre-commit, and ast-grep and semgrep rules. One rule forbids imports of web frameworks in plugins.
  • CI (ci.yml):
    • a change-detection job that maps changed paths to packages;
    • per-package lint, type, test, coverage and audit jobs;
    • the gate job CI passed.
  • Release (release.yml): per-package tags <distribution>-v<version>, PyPI Trusted Publishing from the pypi environment, and attestations. The workflow is a draft until a dry run in a fork.
  • Docs: MkDocs on Read the Docs, covering:
    • an overview;
    • installing: meta extras, single distributions, derived images;
    • writing plugins;
    • the plugin catalogue;
    • contributing;
    • releasing;
    • maintainer setup.
  • Policy files: CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, CITATION.cff, CODEOWNERS and Dependabot.

FOCA comes from its dev branch until FOCA v0.18.0 (the plugin engine) is released.

Acceptance criteria

  • The CI gate CI passed reports on the scaffold PR.
  • The example plugin passes all checks with 100% coverage, against FOCA dev.
  • mkdocs build --strict passes.
  • The open setup steps for maintainers are listed in docs/maintainers.md.

Related: elixir-cloud-aai/foca#485 (plugin engine), elixir-cloud-aai/protes#194.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: hightype: ci / cdtype: maintenanceworkload: days

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions