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
-
Add new directory
mozilla_nimbus_schemas/new_stuffwith schemas inside. -
Add
new_stuffschemas to thenew_stuffdirectory's__init__.pyfile. -
Add
new_stuffto top level__init__.py:from mozilla_nimbus_schemas.new_stuff import * -
Generate Typescript and/or JSON Schemas for
new_stuffby updating thegenerate_json_schema.pyscript like so:a. Import
new_stuffalongside existingmozilla_nimbus_schemasimports, e.g.,from mozilla_nimbus_schemas import experiments, jetstream, new_stuffb. (optional) Add
new_stuffto Typescript generation- Update
TS_SCHEMA_PACKAGESlist, e.g.,TS_SCHEMA_PACKAGES = [experiments, jetstream, new_stuff]
c. (optional) Add
new_stuffto JSON Schema generation- Update
JSON_SCHEMA_PACKAGESlist, e.g.,JSON_SCHEMA_PACKAGES = [experiments, new_stuff]
- Update
-
Build everything with
make schemas_build -
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
- To update the published package versions, update the
VERSIONfile 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.
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mozilla_nimbus_schemas-3001.0.0.tar.gz.
File metadata
- Download URL: mozilla_nimbus_schemas-3001.0.0.tar.gz
- Upload date:
- Size: 37.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dedd11aed9f793b47de319f3ce104ff07f77a8d896234547feb41a76dc7a57e1
|
|
| MD5 |
a3560c50ba9322c0705216e6a5986adf
|
|
| BLAKE2b-256 |
d5ca0a8381f8d4f0032d83f45de9a3847461019cb51cd54fefed570d44202a93
|
File details
Details for the file mozilla_nimbus_schemas-3001.0.0-py3-none-any.whl.
File metadata
- Download URL: mozilla_nimbus_schemas-3001.0.0-py3-none-any.whl
- Upload date:
- Size: 68.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25b89f8ce1e547b383e067023027b84bdbd01cc32b0375dcc5446df737ded533
|
|
| MD5 |
ad435af2f64d47833a98f027e5870e9e
|
|
| BLAKE2b-256 |
a6406d2e247c44e5785c45fe070b74bcde97ac000db36ea6bfe521da0d3c2924
|