docgen
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
# luminesce-examples (WIP) This repo contains reference examples for Luminence. This project is a WIP. ![image info](./logo/luminesce_logo.jpg) | branch | status | | --- | --- | | `master` | [![Build and test](https://github.com/finbourne/luminesce-examples/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/finbourne/luminesce-examples/actions/workflows/build-and-test.yml)| | `master` | [![Daily build](https://github.com/finbourne/luminesce-examples/actions/workflows/daily-build.yml/badge.svg)](https://github.com/finbourne/luminesce-examples/actions/workflows/daily-build.yml)| ## 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 💡 {{#file_data}} {{#section}} **[{{.}}](<docs/{{.}}.ipynb>)** {{#files}} * {{.}} {{/files}} {{/section}} {{/file_data}} ## 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 <b>runner</b> 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](docgen). | | --- |