Skip to content

finbourne/luminesce-examples

Repository files navigation

luminesce-examples (WIP)

This repo contains reference examples for Luminence.

This project is a WIP.

image info

branch status
master Build and test
master Daily build

Run using Docker

You can run with docker as follows.

Build the image:

docker build . -t luminesce-examples-runner

Run a container by passing auth credentials as environment variables:

docker run \
-e FBN_LUSID_API_URL=<API_URL> \
-e FBN_PASSWORD=<PASSWORD> \
-e FBN_APP_NAME=<APP_NAME> \
-e FBN_USERNAME=<USERNAME> \
-e FBN_CLIENT_SECRET=<CLIENT_SECRET> \
-e FBN_CLIENT_ID=<CLIENT_ID> \
-e FBN_TOKEN_URL=<TOKEN_URL> \
-e FBN_DRIVE_API_URL=<DRIVE_URL> \
-e FBN_LUMI_API_URL=<LUMI_URL> \
luminesce-examples-runner -start_dir=examples/drive

Running locally

You can run one or more of these examples locally by using the --secrets and --start_dir parameters.

For example, to run the Drive examples only:

python runner/run.py --secrets=secrets/secrets.json --start_dir=examples/drive

You can also choose to keep the sample Drive files created by the runner:

python runner/run.py --secrets=secrets/secrets.json --start_dir=examples/drive --keepfiles

List of examples

💡 The files in a directory are numbered if they need to be run in order 💡

Statistical functions

Drive

Pdf generation

File orchestration

System

For loops with cross apply

Delete entities

Returns

Reference portfolios

Relationships

Transactions

Abor

Holdings

Properties

Corporate actions source

Run a recon holdings in different scopes

Instruments

Complex bonds

Quotes

Run valuation

Run a reconciliation

Portfolios

View management

Horizon

Insights

Reconcile instruments

Basic data integrity

Check for missing instrument fields

Check for price outliers

Check for duplicates

Cross sectional outliers

Automated testing

We run automated tests on the SQL files in this project via GitHub Actions. The configurtion for these tests live in the .github/workflows directory.

Many of our tests require setup data. To create this data, there is a process where the testing runner will search for a _data directory wherever it finds .sql files. Then, two things happen:

  1. If there are data files in the _data directory, the runner will upload these to a luminesce-examples folder in LUSID Drive
  2. If there is a setup.py file in this directory, the runner will run the setup.py file. We use this setup.py file to configure recipes and other configurations we don't want to setup via Luminesce.

Sample structure below:

upload_equity_instruments.sql
upload_bond_instruments.sql
_data
    eq_instruments.csv
    instruments.txt
    setup.py
⚠️ This file is generated, any direct edits will be lost. For instructions on how to generate the file, see docgen.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published