Skip to content

Latest commit

 

History

History
124 lines (90 loc) · 3.63 KB

BUILDING.md

File metadata and controls

124 lines (90 loc) · 3.63 KB

Building Amphi from Source

This document explains how to build Amphi from source code. Amphi consists of two main components:

  1. jupyterlab-amphi: The core JupyterLab extension containing the main application logic
  2. amphi-etl: The full Amphi ETL application that builds upon the core extension

Prerequisites

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:

Creating a Virtual Environment

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.

Building jupyterlab-amphi

The first step is to build the core JupyterLab extension.

  1. Navigate to the jupyterlab-amphi directory:
cd jupyterlab-amphi
  1. 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 .
  1. 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.

Building amphi-etl

After successfully building jupyterlab-amphi, you can proceed with building the full Amphi ETL application.

  1. Navigate to the amphi-etl directory:
cd ../amphi-etl
  1. 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
  2. Install the requirements:

python -m pip install -r requirements.txt
  1. Launch Amphi ETL:
jupyter lab --notebook-dir=/path/to/your/workspace

(Use appropriate path format for Windows as shown above)

Component Overview

  • 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.

Troubleshooting

If you encounter any issues:

  1. Ensure your virtual environment is activated
  2. Verify all prerequisites are installed correctly
  3. Check that paths in commands match your system's directory structure
  4. Make sure you're using compatible versions of Python and JupyterLab

Notes

  • 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

Additional Resources

For more detailed information about: