Profile
Back to NewsBack
GitHub Trending 4 min
Reader Mode
publiccodeyml/publiccode.yml: A metadata standard for public software

publiccodeyml/publiccode.yml: A metadata standard for public software

23 hours ago

The publiccode.yml Standard

A metadata standard to describe software made by or for Public administrations, making it discoverable and understandable for both developers and non-technical users.


What is publiccode.yml

Public Administrations often create valuable software, but reuse is often limited due to poor discoverability or difficulty understanding if a project fits another administration's context.

publiccode.yml solves this by providing a human-readable and machine-readable metadata file.

It answers the questions:

  • What does this project do? (name, description, languages)
  • What is its status? (concept, development, beta, stable, obsolete)
  • Who maintains it and until when?
  • Who to contact for technical/support inquiries?
  • What legal frameworks is it designed for?
  • What are its dependencies?
It is designed to be easy to add to any new project and to grow as the project evolves.

Example

A minimal publiccode.yml file:

publiccodeYmlVersion: "0"
name: My text editor
url: "https://example.com/mysoftware/text-editor.git"
platforms:
  - windows
developmentStatus: development
softwareType: standalone/desktop
description:
  en:
    shortDescription: A lightweight text editor
    longDescription: >
          A lightweight yet powerful text editor designed for everyday use by developers,
          writers, and public administrations. It also supports syntax highlighting.
    features:
       - Syntax highlighting
       - Collaborative editing features
       - Scripting interface
legal:
  license: AGPL-3.0-or-later
maintenance:
  type: community
  contacts:
    - name: Margaret Hamilton
localisation:
  localisationReady: true
  availableLanguages:
    - en
    - de
    - fr

See all available fields...

Finding projects

Finding projects depends on how the search API is structured for every hosting platform. For example, you can find all publiccode.yml files in the root directory of projects on GitHub, either by using the search frontend or the API.

Versioning

This project follows the Semantic Versioning.

See all versions

Contributing

Feel free to submit Pull Requests, file Issues or open a Discussion.

The Standard's website is built using the Python Sphinx package and deployed on GitHub Pages from the publiccodeyml.github.io repository.

Prerequisites

Local development process

sphinx-build can be used to compile all source files of the current checkout to static html files. Run this command to generate the website:

uv run sphinx-build docs/standard build -c .

then open the relevant file in the build directory with a browser (e.g., build/index.html) to explore the contents.

Hot reloading

sphinx-autobuild can be used to make use of hot reloading.

uv run sphinx-autobuild docs/standard build -c .

All the versions

The published website puts every version line of the Standard side by side, one directory per major version (/v0/, /v1/, ...) with a version switcher on each page. Each line is built from the newest release tag of its major version (v0.7.0, ...), or from its draft branch (1.0-rc, ...) while unreleased, using the conf.py and templates of the current checkout, see poly.py. Tags come with the clone, draft branches must exist locally (e.g. git branch 1.0-rc origin/1.0-rc), then:

uv run sphinx-polyversion poly.py build/html

To preview the switcher on the current checkout alone, without building every branch:

uv run sphinx-polyversion poly.py build/html -l

Tooling

Tools and libraries that implement and support the publiccode.yml Standard.

Core tools

Core tools are developed alongside the publiccode.yml specification and provide its reference implementations and supporting components.

Core tools and how they interact: code repositories, publiccode-crawler, libpubliccode, Open Catalog API and catalog consumers</a>

Go parser and validator. Reference implementation of the specification. PHP library for parsing and validation using the reference implementation via FFI. Crawler to discover and collect descriptor files for catalogs. RESTful API powering software catalogs for public administrations, used to store, query and expose all catalog data about FLOSS solutions. Convenience command-line client to query the catalog API. (alpha) GitHub Action for validation in GitHub pipelines. GitLab CI integration for validation Simple RESTful API for validating publiccode.yml files, returning errors and warnings. Opens GitHub issues to repos in a software catalog with invalid publiccode.yml files. JSON Schema definition mainly used by editors and IDEs for coarse validation and autocompletion.

Third-party tooling

Maintained separately from the core tooling, but widely used in practice.

User friendly editor and basic validator for publiccode.yml files (maintained by Developers Italia, Italian Government). CircleCI Orb for validation in pipelines.

More tools can e.g. be found by searching for the GitHub topic publiccode.

License

Licensed under the CC0-1.0.

Chat with me