Skip to main content

Schemas used by Mozilla Nimbus and related projects.

Project description

Nimbus Schemas

This directory contains a package of schemas published to various repositories for use by different parts of the Mozilla Nimbus experimentation ecosystem.

Installation/Usage

Prerequisites

  • python ^3.10
  • poetry ^1.8.4
  • node ^16
  • yarn ^1.22

Common Operations

From project root (i.e., parent to this directory)

  • Build: make schemas_build
  • Run linting and tests: make schemas_check
  • Code formatting: make schemas_format

Adding New Schemas

Example Creating a new sub-package new_stuff

  1. Add new directory mozilla_nimbus_schemas / new_stuff with schemas inside.

  2. Add new_stuff schemas to the new_stuff directory's __init__.py file.

  3. Add new_stuff to top level __init__.py:

    from mozilla_nimbus_schemas.new_stuff import *

  4. Generate Typescript and/or JSON Schemas for new_stuff by updating the generate_json_schema.py script like so:

    a. Import new_stuff alongside existing mozilla_nimbus_schemas imports, e.g.,

    from mozilla_nimbus_schemas import experiments, jetstream, new_stuff

    b. (optional) Add new_stuff to Typescript generation

    • Update TS_SCHEMA_PACKAGES list, e.g.,

      TS_SCHEMA_PACKAGES = [experiments, jetstream, new_stuff]

    c. (optional) Add new_stuff to JSON Schema generation

    • Update JSON_SCHEMA_PACKAGES list, e.g.,

      JSON_SCHEMA_PACKAGES = [experiments, new_stuff]

  5. Build everything with make schemas_build

  6. Update the version (see Versioning below).

Schemas

Jetstream

Contains schemas describing analysis results, metadata, and errors from Jetstream.

Experiments

Defines the schemas used for validating the Experimenter v6 API. Previously defined in the now-deprecated nimbus-shared.

Deployment

The build and deployment occurs automatically through CI. A deployment is triggered on merges into the main branch when the version number changes. Schemas are published to various repos for access in different languages.

Versioning

mozilla-nimbus-schemas uses semantic versioning (semver) of major.minor.patch. Previously, we used a date-based versioning scheme (CalVer), which is why the version is so high (3000+). Any breaking changes should result in an increase in the major version.

Version Updates

  1. To update the published package versions, update the VERSION file in this directory.
  • From the project root, you can run the helper script:
    • ./scripts/set_schemas_version.sh <version>
  • Or write to the file:
    • echo <version> > ./schemas/VERSION
  • Or simply edit the file in any text editor.
  1. Update the package versions with the new VERSION file:
  • make schemas_version

Python

Published to PyPI as mozilla-nimbus-schemas

Typescript

Published to NPM as @mozilla/nimbus-schemas

Rust

Not yet implemented.

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

mozilla_nimbus_schemas-3002.0.0.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

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

mozilla_nimbus_schemas-3002.0.0-py3-none-any.whl (68.7 kB view details)

Uploaded Python 3

File details

Details for the file mozilla_nimbus_schemas-3002.0.0.tar.gz.

File metadata

File hashes

Hashes for mozilla_nimbus_schemas-3002.0.0.tar.gz
Algorithm Hash digest
SHA256 88fe631c46481d2ef44c1f44508d38cb0c39605fca3dcc37fa57b80f57d9e740
MD5 e55f91005d34a43b0037f4acb4f58a24
BLAKE2b-256 c3d70551d1947de291500c97c7805c60cdfc815199e0e283318e59dc109c3be2

See more details on using hashes here.

Provenance

The following attestation bundles were made for mozilla_nimbus_schemas-3002.0.0.tar.gz:

Publisher: deploy-schemas.yml on mozilla/experimenter

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

File details

Details for the file mozilla_nimbus_schemas-3002.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mozilla_nimbus_schemas-3002.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd08c0c8c8b15cf7819d28173a724643c35b6566a6a2b6ce6b206f315e67fc7b
MD5 0e4e8e7f667093e576c1dc25b0ef722c
BLAKE2b-256 49af0cfcd5bbb76a70ae26c3be1d8a9d18182cefa672ad0b75ddb2d27b311905

See more details on using hashes here.

Provenance

The following attestation bundles were made for mozilla_nimbus_schemas-3002.0.0-py3-none-any.whl:

Publisher: deploy-schemas.yml on mozilla/experimenter

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