How to install and demo - grishasen/proof_of_value GitHub Wiki

How to Install

Introduction

This guide provides step-by-step instructions on how to download and install Visual Studio Code (VS Code), install Python, and set up a Python virtual environment within VS Code. The last step will be to install the CDH Value Dashboard application from a Python package and start using it.


1. Downloading and Installing Visual Studio Code

For Windows

Download VS Code Installer:

Run the Installer:

  • Locate the downloaded file (e.g., VSCodeUserSetup-x64-<version>.exe) in your Downloads folder.
  • Double-click the installer to run it.

Installation Steps:

  1. Accept License Agreement

    • Read and accept the license agreement.
    • Click "Next".
  2. Select Destination Location

    • Choose the installation folder or keep the default.
    • Click "Next".
  3. Select Start Menu Folder

    • Choose the Start Menu folder or keep the default.
    • Click "Next".
  4. Select Additional Tasks
    Optionally, select:

    • "Create a desktop icon"
    • "Add to PATH (requires shell restart)" (Recommended)
    • "Register Code as an editor for supported file types"
      Click "Next".
  5. Install

    • Click "Install" to begin the installation.
  6. Finish Installation

    • Check "Launch Visual Studio Code" if you want to start it immediately.
    • Click "Finish".

Install Visual C++ Build Tools


For macOS

Download VS Code Installer:

Install VS Code:

  • Locate the downloaded VSCode-darwin-universal.zip file.
  • Open the ZIP file to extract Visual Studio Code.app.
  • Drag and drop Visual Studio Code.app into the Applications folder.

Launch VS Code:

  • Open Launchpad and click on Visual Studio Code.
  • If prompted that the app is from an unidentified developer:
    • Go to System Preferences > Security & Privacy > General tab
    • Click "Open Anyway"

Install Xcode Command Line Tools:

Using Terminal run:

xcode-select --install

2. Downloading and Installing Python

For Windows

  1. Visit https://www.python.org/downloads/windows/
  2. Click on "Download Python 3.11.x"
  3. Locate and run the installer (python-3.x.x-amd64.exe)
  4. Check "Add Python 3.x to PATH"
  5. Click "Install Now"
  6. Confirm via User Account Control
  7. Click "Close"
  8. Verify installation:
python --version

For macOS

  1. Open Terminal
  2. Run:
python3 --version
  1. Visit https://www.python.org/downloads/macos/
  2. Click "Download Python 3.11.x"
  3. Run installer (e.g., python-3.x.x-macosx10.9.pkg)
  4. Verify installation:
python3 --version

3. Setting Up a Python Virtual Environment in VS Code

Creating a Project Folder (for demo data)

  1. Run git clone https://github.com/grishasen/proof_of_value.git
  2. Open VS Code.
  3. Go to File > Open Folder and select proof_of_value.

Install Python Extension:

  • Click Extensions on the left sidebar (Ctrl+Shift+X)
  • Search and install Python extension.

Creating a Virtual Environment

  1. Open Integrated Terminal: Terminal > New Terminal (Ctrl+Shift+`)

  2. Ensure you're in the proof_of_value directory.

  3. Press Ctrl+Shift+P (or Cmd+Shift+P on macOS).

  4. Type "Python: Create Environment" and select it.

  5. Choose the interpreter from venv.

Python environment setup is like brewing coffee — by the time it's done, you could have grown your own beans. Anyway – please go ahead, making coffee is essential part of install process.


Installing Packages in the Virtual Environment

  1. Ensure virtual environment is active: (venv) prefix should be visible in the terminal.

  2. Install the package:

pip install cdhdashboard

Package installation takes so long, you can finish the coffee you made... and still have time to brew another one!

Alternatively, install from GitHub repository: https://github.com/grishasen/proof_of_value?tab=readme-ov-file#installation


Run Application

cdhdashboard run -- --config ./config_demo.toml

or (if installed from GitHub)

streamlit run vd_app.py -- --config=<config_file_path.toml>

You have successfully installed:

  • Visual Studio Code
  • Python
  • A virtual environment in VS Code
  • CDH Value Dashboard application

This setup is a prerequisite for the bootcamp hands-on session.


Demo Scenario

  • Use Demo config located at: value_dashboard/config/config_demo.toml
  • Unzip .7z file: data/demo_collected_ih_metrics_data.json.7z
  • Go to Data Import Page
    • Switch off toggle – Import raw data
    • Upload file demo_collected_ih_metrics_data.json
  • Go to Dashboard Page, start browsing reports.
  • Upload Product Holdings data and demo CLV analysis.
⚠️ **GitHub.com Fallback** ⚠️