module documentation

Undocumented

Async Function check_updates Check if the current changes conflicts with an existing contract store.
Function cli Undocumented
Async Function compile Create or update a feature store deployment
Function coro Undocumented
Async Function create_indexes Creates a set of vector indexes for the contract store.
Function load_envs Undocumented
Function make_tzaware We assume tz-naive datetimes are UTC
Function serve_command Starts an API serving data based on a contract store.
Async Function serve_worker_command Starts a worker that process the contract store streams and store them in an online source.
Function setup_logger Undocumented
Async Function store_from_reference Undocumented
@cli.command('check-updates')
@coro
@click.option('--updated-contract')
@click.option('--reference-contract')
@click.option('--output-format', default='markdown', help='The output format')
@click.option('--output-file', default=None, help='The output format')
async def check_updates(updated_contract: str, reference_contract: str, output_format: str, output_file: str | None): (source)

Check if the current changes conflicts with an existing contract store.

This will check if:

  1. Exposed models have the needed features.
  2. If any transformations that a model depend on have changed.
@click.group()
def cli(): (source)

Undocumented

@cli.command('compile')
@coro
@click.option('--repo-path', default='.', help='The path to the repo')
@click.option('--reference-file', default='contract_store.json', help='The path to a contract store reference file. Defining where to read and write the feature store')
@click.option('--env-file', default='.env', help='The path to env variables')
@click.option('--ignore-file', default='.alignedignore', help='The files Aligned should ignore')
async def compile(repo_path: str, reference_file: str, env_file: str, ignore_file: str): (source)

Create or update a feature store deployment

def coro(func: Callable) -> Callable: (source)

Undocumented

@cli.command('create-indexes')
@coro
@click.option('--repo-path', default='.', help='The path to the repo')
@click.option('--reference-file', default='feature_store_location.py:source', help='The path to a feature store reference file. Defining where to read and write the feature store')
@click.option('--env-file', default='.env', help='The path to env variables')
async def create_indexes(repo_path: str, reference_file: str, env_file: str): (source)

Creates a set of vector indexes for the contract store.

def load_envs(path: Path): (source)

Undocumented

def make_tzaware(t: datetime) -> datetime: (source)

We assume tz-naive datetimes are UTC

@cli.command('serve')
@click.option('--repo-path', default='.', help='The path to the repo')
@click.option('--host', default=None, help='The host to serve on')
@click.option('--port', '-p', default=8000, help='The port to serve on')
@click.option('--workers', '-w', default=1, help='The number of workers')
@click.option('--env-file', default='.env', help='The path to env variables')
@click.option('--reload', '-r', default=False, help='If the server should reload on dir changes')
@click.option('--server-path', default='server:server', help='The path to the feature store server')
def serve_command(repo_path: str, port: int, workers: int, env_file: str, reload: bool, server_path: str, host: str | None): (source)

Starts an API serving data based on a contract store.

@cli.command('serve-worker')
@coro
@click.option('--repo-path', default='.', help='The path to the repo')
@click.option('--worker-path', default='worker.py:worker', help='The path to the `StreamWorker`')
@click.option('--env-file', default='.env', help='The path to env variables')
async def serve_worker_command(repo_path: str, worker_path: str, env_file: str): (source)

Starts a worker that process the contract store streams and store them in an online source.

def setup_logger(): (source)

Undocumented

async def store_from_reference(reference_file: str, dir: Path | None = None) -> ContractStore: (source)

Undocumented