Skip to content

lsst/felis

Repository files navigation

Felis

PyPI PyPI - Python Version

YAML Schema Definition Language for Databases

Overview

Felis implements a YAML data format for describing database schemas in a way that is independent of implementation language and database variant. These schema definitions can be checked for validity using an internal Pydantic data model to ensure strict conformance to the format. SQL Data Definition language (DDL) statements can be generated to instantiate corresponding database objects, such as tables and columns, in a number of different database variants, including MySQL, PostgreSQL, Oracle, and SQLite. The schema can also be used to update the TAP schema information in a TAP service.

The tool was developed internally by the Vera C. Rubin Observatory as a way of defining a "single source of truth" for database schemas and their metadata which are maintained for the facility in the sdm_schemas github repository. Though developed in the context of astronomical data management and including some optional features that are specific to IVOA standards, Felis is generic enough that it can be used as a general tool to define, update, and manage database schemas in a way that is independent of database variant or implementation language such as SQL.

Installation and Usage

Felis is designed to work with Python 3.11 and 3.12 and may be installed using pip:

pip install lsst-felis

The felis command-line tool that is installed with the package can be used to perform various actions on the YAML schema files, including validating the schema definitions, generating DDL statements for various databases, or updating a TAP service with schema metadata. The command line help provides documentation on all of these utilities:

felis --help

Individual subcommands also have their own documentation:

felis validate --help

For instance, this command can be used to validate a schema file:

felis validate myschema.yaml

If the schema generates validation errors, then these will be printed to the terminal. These errors may include missing required attributes, misspelled YAML keys, invalid data values, etc.

Documentation

Detailed information on usage, customization, and design is available at the Felis documentation site.

Presentations

Support

Users may report issues or request features on the Rubin Community Forum or by opening an issue on the Felis Issue Tracker. Posts on the forum should include the tag "felis."

Code of Conduct

Please see the LSST Project Code of Conduct for guidelines on communications and interactions.

License

Felis is distributed under the GNU General Public License, version 3.0 or later.