Installation

This guide provides installation instructions for the seagliderOG1 Python package for different use cases.

Basic Installation (PyPI)

For most users who want to use the package:

pip install seagliderOG1

Then import in your Python code:

import seagliderOG1

Local Development Installation

Using conda/micromamba

If you prefer conda environments:

# Clone the repository
git clone https://github.com/ocean-uhh/seagliderOG1.git
cd seagliderOG1

# Create and activate environment
conda env create -f environment.yml
conda activate TEST

# Install package in editable mode
pip install -e .

Using micromamba (faster alternative):

micromamba env create -f environment.yml
micromamba activate TEST
pip install -e .

Using pip and virtual environments

# Clone the repository
git clone https://github.com/ocean-uhh/seagliderOG1.git
cd seagliderOG1

# Create and activate virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies and package
pip install -r requirements.txt
pip install -e .

Contributing Installation

For contributors and developers:

Setup

  1. Fork the repository on GitHub

  2. Clone your fork locally:

    git clone https://github.com/YOUR-USERNAME/seagliderOG1.git
    cd seagliderOG1
    
  3. Set up environment (choose one):

    Option A: Using conda/micromamba

    conda env create -f environment.yml
    conda activate TEST
    

    Option B: Using pip

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  4. Install development dependencies:

    pip install -r requirements-dev.txt
    pip install -e .
    

Development Workflow

Run tests:

pytest                    # Run all tests
pytest -v                 # Verbose output
pytest tests/test_*.py    # Run specific test file

Code quality checks:

black .                   # Format code
ruff check --fix          # Lint and auto-fix
pre-commit run --all-files # Run all pre-commit hooks

Before committing:

pytest                    # Ensure tests pass
ruff check                # Check for linting issues

Coding Standards

Please follow the project’s coding conventions documented in conventions.md, which covers:

  • Code formatting (Black)

  • Linting (Ruff)

  • Docstring style (numpy format)

  • Import organization (PEP 8)

  • Testing practices

Contributing Guidelines

For detailed contribution guidelines, see our contributing documentation.

Verification

Verify your installation works:

from seagliderOG1 import readers, convertOG1, writers

# Load sample data
dataset = readers.load_sample_dataset()
print("✅ Installation successful!")