Skip to content

Latest commit

 

History

History
165 lines (127 loc) · 2.97 KB

File metadata and controls

165 lines (127 loc) · 2.97 KB

Workspace Setup Guide

This guide will help you set up your development environment to run the EOPF 101 notebooks and interact with Sentinel data in Zarr format.

Prerequisites

  • Python 3.9 or higher
  • Git
  • pip (Python package installer)

Setting Up the Environment

Automated Setup (Linux/macOS)

  1. Clone the repository:
git clone https://github.com/eopf-toolkit/eopf-101
cd eopf-101
  1. Run the setup script:
./setup.sh

This script will:

  • Check Python version requirements
  • Create and activate a virtual environment
  • Install all dependencies
  • Set up Jupyter kernel
  • Verify the installation

Manual Setup (Windows or Alternative)

  1. Clone the repository:
git clone https://github.com/eopf-toolkit/eopf-101
cd eopf-101
  1. Create and activate a Python virtual environment:
python -m venv .venv
# On Linux/macOS:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate
  1. Install the required dependencies:
python -m pip install --upgrade pip
pip install -e .

Project Configuration

Create a pyproject.toml file in your project root with the following content:

[project]
name = "eopf-101"
version = "0.1.0"
description = "EOPF 101 - A toolkit for working with Sentinel data in Zarr format"
requires-python = ">=3.9"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.pytest.ini_options]
addopts = "-ra -q"
testpaths = ["tests"]

[project.dependencies]
jupyter = "^1.0.0"
zarr = "^2.14.2"
pystac = "^1.7.3"
numpy = "^1.24.3"
pandas = "^2.0.2"
matplotlib = "^3.7.1"
rioxarray = "^0.14.1"
stackstac = "^0.4.4"
ipykernel = "^6.23.1"

Required Dependencies

Create a requirements.txt file with the following content:

jupyter>=1.0.0
zarr>=2.14.2
pystac>=1.7.3
numpy>=1.24.3
pandas>=2.0.2
matplotlib>=3.7.1
rioxarray>=0.14.1
stackstac>=0.4.4
ipykernel>=6.23.1
quarto>=0.1.0

Setting up Jupyter

  1. After installing dependencies, register the Python kernel for Jupyter:
python -m ipykernel install --user --name=eopf101
  1. Start Jupyter:
jupyter notebook

Quarto Setup

Since this project uses Quarto for documentation:

  1. Install Quarto from: https://quarto.org/docs/get-started/
  2. Preview the documentation:
quarto preview

Verification

To verify your setup:

  1. Ensure your virtual environment is activated
  2. Run the following Python commands:
import zarr
import pystac
import rioxarray
import stackstac
print("Environment setup successful!")

Troubleshooting

If you encounter issues:

  1. Ensure your Python version is correct:
python --version
  1. Verify virtual environment activation:
# You should see (.venv) at the start of your prompt
  1. Check installed packages:
pip list

Getting Help

If you need assistance: