This document explains how to build Amphi from source code. Amphi consists of two main components:
jupyterlab-amphi
: The core JupyterLab extension containing the main application logicamphi-etl
: The full Amphi ETL application that builds upon the core extension
Python must be installed on your machine.
Before starting the build process, we strongly recommend setting up a Python virtual environment. This helps avoid conflicts between Python packages and ensures a clean installation. You can create one using either venv
or conda
:
Using venv:
# On Windows
python -m venv venv
.\venv\Scripts\activate
# On macOS/Linux
python3 -m venv venv
source venv/bin/activate
Using conda:
# Create a new environment
conda create -n amphi python=3.x
conda activate amphi
Keep this virtual environment active throughout the entire build process.
The first step is to build the core JupyterLab extension.
- Navigate to the jupyterlab-amphi directory:
cd jupyterlab-amphi
- Install and build the extension:
On macOS/Linux:
jlpm install
jlpm run build
python3 -m pip install .
On Windows:
jlpm install
jlpm run build
python -m pip install .
- To test the extension in JupyterLab:
On macOS/Linux:
jupyter lab --notebook-dir=/path/to/your/workspace
On Windows:
jupyter lab --notebook-dir=C:\path\to\your\workspace
Replace /path/to/your/workspace
or C:\path\to\your\workspace
with your desired workspace directory.
Note: You can add --ContentManager.allow_hidden=True
to the launch command if you want to show hidden files in the file browser.
After successfully building jupyterlab-amphi
, you can proceed with building the full Amphi ETL application.
- Navigate to the amphi-etl directory:
cd ../amphi-etl
-
Modify requirements.txt to use the local jupyterlab-amphi build:
- Open
requirements.txt
- Find the line containing
jupyterlab-amphi==X.X.X
- Replace it with
../jupyterlab-amphi
- Open
-
Install the requirements:
python -m pip install -r requirements.txt
- Launch Amphi ETL:
jupyter lab --notebook-dir=/path/to/your/workspace
(Use appropriate path format for Windows as shown above)
-
jupyterlab-amphi: This is the core extension that contains the main application logic. It can be run independently within JupyterLab for development and testing purposes.
-
amphi-etl: This is the complete Amphi ETL application. It incorporates the
jupyterlab-amphi
extension and adds Amphi's custom theme, styling, and additional features to create a standalone application experience.
If you encounter any issues:
- Ensure your virtual environment is activated
- Verify all prerequisites are installed correctly
- Check that paths in commands match your system's directory structure
- Make sure you're using compatible versions of Python and JupyterLab
- Always use the virtual environment when installing Python packages to maintain a clean development environment
- The build process must be completed in order: first jupyterlab-amphi, then amphi-etl
For more detailed information about:
- JupyterLab extensions: JupyterLab Documentation
- Python virtual environments: Python venv documentation
- Conda environments: Conda documentation