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

Insights

Instruments

Complex bonds

Run valuation

Run a reconciliation

Holdings

Abor

Properties

Corporate actions source

Portfolios

Transactions

Reference portfolios

Quotes

Relationships

Returns

Delete entities

Run a recon holdings in different scopes

Drive

Pdf generation

Horizon

System

For loops with cross apply

View management

Basic data integrity

Check for duplicates

Check for price outliers

Reconcile instruments

Cross sectional outliers

Check for missing instrument fields

File orchestration

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