inab / licenses-mapping

A tool to map strings to SPDX licenses names or IDs.
https://observatory.openebench.bsc.es/licenses-mapping/docs
Apache License 2.0
0 stars 0 forks source link
fastapi licensing spdx

License Mapping API

License

Overview

A tool to map strings to SPDX licenses names or IDs.

📄 API Documentation

🐳 Docker image

Licenses Data

SPDX licenses metadata and synonyms are stored in the files of the licenses directory. The database is generated and updated from these files. The update is triggered by commmits being pushed to main branch.

🙌🏻 Contribution to licenses synonyms

To contribute to the licenses synonyms, please edit the files in the licenses directory and submit a pull request.

Webhooks

The API is configured to listen to the following webhooks:

CI - Database Update

The database is updated by the following GitLab CI workflow:

stages:
  - webhook

update:
  stage: webhook
  variables:
    DEPLOY_CURL_COMMAND: 'curl -H "Content-Type: application/json" --data @data.json https://gitlab.bsc.es/inb/elixir/software-observatory/license-mapping-api/webhooks'
  script:
    - 'eval "$DEPLOY_CURL_COMMAND"'
  rules:
    - changes:
      - licenses/*
      when: on_success

Development

Start the server with:

python3 -m uvicorn main:app --reload