Development Setup ================= Requirement(s) -------------- * Docker with compose plugin (https://docs.docker.com/get-docker/) * Python >= 3.10 (https://www.python.org/downloads/) * NodeJS >= 9.4 (https://nodejs.org/en/) .. _getting_started: Getting started --------------- 1. Create a Virtual environment for the project .. code-block:: console $ python -m venv venv $ source venv/bin/activate 2. Install Python requirements .. code-block:: console (venv) $ pip install -r requirements-generated.txt 3. Install NodeJS requirements .. code-block:: console (venv) $ cd src/bmui (venv) $ npm install 3. Start PostgreSQL and RabbitMQ using Docker compose .. code-block:: console (venv) $ docker compose up --force-recreate 4. Run Alembic to update database schema to latest revision .. code-block:: console (venv) $ cd src/bmapi (venv) $ alembic upgrade head 5. Run User Interface Development Web Server .. code-block:: console (venv) $ cd src/bmui (venv) $ npm run start-dev 6. Start Web API Server and Jobs Worker .. code-block:: console (venv) $ export FLASK_APP=src/bmapi/server.py (venv) $ export FLASK_DEBUG=1 (venv) $ export PYTHONPATH=src/bmapi (venv) $ python -m flask run --no-debugger .. code-block:: console (venv) $ export PYTHONPATH=src/bmapi (venv) $ python src/bmapi/jobs_worker.py --debug 7. Access the application at http://localhost:8080 Integrated Development Environment ---------------------------------- We're using Visual Studio Code as IDE (https://code.visualstudio.com/). We got everything setup in this repository to use it. It fairly simple to use. Just do the initial setup as mention in the :ref:`getting_started` section, step 1 to 3. Use Task(s) to start docker compose **Docker Compose Up** and Start UI with **Start UI Dev server**. After that you can attach to the API and the Jobs Worker using the Launch options (**Jobs Worker (remote)**, **BMAPI (remote)**), you can also use breakpoint and debug it. You can now browse the applcation at http://localhost:8080