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

Introduce DataSource class #125

Description

@turbaszek

Description
Currently all data sources supported by Kibble are defined in this one, long yaml:
https://github.com/apache/kibble/blob/8904f39ca2b19aef3522455ec357294cc398c49e/kibble/api/yaml/sourcetypes.yaml#L1-L103

We should introduce DataSource base class and then rewrite (automatically) the yaml file into pythonic code. For example:

class GitDataSource(DataSource):
    title: str = "Plain git repository"
    description: str = "This is a plain git repository with no issues/PRs attached. For GitHub repositories, use the GitHub source type."
    regex: str = r"(?:https?|git)://.*/.+\.git"
    example: str = "git://example.org/repos/foo.git"
    optauth: List[str] = [
        "username",
        "password",
    ]

This will also bring us closer to refactoring API - having a DataSource class we can implement common update, delete, create methods that will be used by /api/sources endpoint.

Use case
To make it easier to work with data sources and keep them as pythonic object not yaml files.

Related Issues
N/A

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions