All front end Typescript packages are in packages
directory, except the jupyterlab-extension
package which is in applications
directory.
JSON schema files are in schema/json
.
Configuration files for eslint, prettier and base configuration file (tsconfig.base.json
) for Typescript are here, in the top level directory.
Use yarn instead of npm
because yarn
has mono repo support without external packages.
A .vscode
directory contains basic settings for linter, formatter and Python.
If working with python, the settings expect virtualenv
directory to be in this top directory as .venv
.
Data types are defined as JSON schemas. Corresponding Python and TypeScript code is generated from the schemas. Code can be regenerated from tools
directory (run yarn install
there first):
yarn gen
To lint and type check all code (especially useful before pushing to GitHub which runs this as a post push action):
yarn verify
Or do it separately for each language:
yarn typescript:check
yarn python:check
Convenient because it manages iPython kernels and either terminal or a notebook can be attached to a running kernel.
Prepare a dedicated virtualenv with Python 3.7+.
virtualenv .venv
source .venv/bin/activate
Jupyter Lab
pip install jupyterlab>=3.0.0
Lumy middleware in development mode
pip install -U --extra-index-url https://pypi.fury.io/dharpa/ lumy-middleware
The following steps are executed in applications/jupyterlab-extension
directory.
Prepare dependencies and install the extension into Jupyter Lab:
yarn install
yarn develop
Start Jupyter Lab in a terminal session:
jupyter lab
In another terminal session start the watcher process that will watch for changes in the Typescript code, recompile them and make them available in Jupyter Lab extension:
yarn watch
Jupyter Lab tab needs to be reloaded to get the changes applied.
The following steps are executed in applications/standalone
directory.
yarn install
Then start Webpack dev server that will watch and recompile TypeScript files and then reload the browser tab.
yarn start
The web app is available on http://localhost:8080/.