Skip to main content

KCIDB = Linux Kernel CI reporting - I/O data library

Project description

kcidb-io

kcidb-io is a Python 3 library for validating and manipulating Linux Kernel CI reports in JSON format. This library is used by kcidb - a package for maintaining a service storing and serving that data.

Installation

kcidb-io requires Python v3.10 or later.

To install the latest version from PyPI:

pip3 install kcidb-io

To install from the git repository:

pip3 install git+https://github.com/kernelci/kcidb-io.git

To install from a local directory:

pip3 install .

Using

Here's an example creating an empty report and then validating it:

# Import the kcidb-io package
import kcidb_io
# Create an empty report using the latest schema version
json = kcidb_io.new()
# Validate the report
kcidb_io.schema.validate(json)

Exporting the JSON schema

The current schema is available as a JSON Schema dictionary on the version class. The latest schema is exposed as kcidb_io.schema.LATEST.

Export the latest schema to a file:

python3 - <<'PY'
import json
from kcidb_io import schema

v = schema.LATEST
with open(f"kcidb-io.schema.v{v.major}.{v.minor}.json", "w") as f:
    json.dump(v.json, f, indent=2, sort_keys=True)
PY

Compatibility notes

The schema is validated in this library using JSON Schema Draft-07. The exported schema JSON does not include a $schema field; if a validator requires one, add:

{
  "$schema": "http://json-schema.org/draft-07/schema#"
}

The schema uses $defs and the uri string format. If your validator supports format checking, enable it to validate uri values.

Hacking

If you want to hack on the source code, install the package in the editable mode with the -e/--editable option, and with "dev" extra included. E.g.:

pip3 install --user --editable '.[dev]'

The latter installs the kcidb-io package using the modules from the source directory, and changes to them will be reflected immediately without the need to reinstall. It also installs extra development tools, such as flake8 and pylint.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kcidb_io-141.tar.gz (115.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kcidb_io-141-py3-none-any.whl (141.4 kB view details)

Uploaded Python 3

File details

Details for the file kcidb_io-141.tar.gz.

File metadata

  • Download URL: kcidb_io-141.tar.gz
  • Upload date:
  • Size: 115.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kcidb_io-141.tar.gz
Algorithm Hash digest
SHA256 dac10e60f06464e2ed9b163d0181a9acbf6504434078696119fb3f52359e3d22
MD5 29fa3f0a0ab7ac305419ca66c88df3a9
BLAKE2b-256 476785816ec101bfa1b6253fab0871eb3bfd4d4642de0920b4aa5999cbac2c53

See more details on using hashes here.

Provenance

The following attestation bundles were made for kcidb_io-141.tar.gz:

Publisher: main.yml on kernelci/kcidb-io

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kcidb_io-141-py3-none-any.whl.

File metadata

  • Download URL: kcidb_io-141-py3-none-any.whl
  • Upload date:
  • Size: 141.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kcidb_io-141-py3-none-any.whl
Algorithm Hash digest
SHA256 95bcce42e0b82ceace8ca29a6c5aa9332c9463860051872788fcc424b642657e
MD5 85fa6b00f9961b6194526af648e91b92
BLAKE2b-256 fd1a50f1577050c850be1159cd40515bd8d28a4b4ed63f1150bfa432c278c63b

See more details on using hashes here.

Provenance

The following attestation bundles were made for kcidb_io-141-py3-none-any.whl:

Publisher: main.yml on kernelci/kcidb-io

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page