diff --git a/README.md b/README.md index f8c9775..b22d1e0 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,7 @@ Python tools for processing moored oceanographic array observations from raw ins pip install oceanarray ``` -`seasenselib` is required for reading raw instrument files (available on PyPI but needs `--no-deps`): - -```bash -pip install pyrsktools pycnv -pip install seasenselib --no-deps -``` +This pulls in `seasenselib` (used to read raw instrument files in stage 1) automatically. Python 3.9–3.12 is supported. diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index a58ddb2..435dffa 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -20,8 +20,8 @@ write Python code. Prerequisites ------------- -**Python 3.10 or later** is required. First create an isolated environment, -then clone and install from source. +**Python 3.10 or later** is required. Install ``oceanarray`` from PyPI, ideally +into an isolated environment. **Option A — conda** @@ -29,6 +29,7 @@ then clone and install from source. conda create -n oceanarray python=3.11 conda activate oceanarray + pip install oceanarray **Option B — venv** @@ -37,8 +38,9 @@ then clone and install from source. python -m venv venv source venv/bin/activate # macOS / Linux # venv\Scripts\activate # Windows + pip install oceanarray -**Clone and install** (after activating either environment): +For development, install from source instead: .. code-block:: bash @@ -47,8 +49,7 @@ then clone and install from source. pip install -e . ``oceanarray`` reads raw instrument files via the ``seasenselib`` library, -which is also not on PyPI. Install it following the instructions provided -with your copy of the library. +which is on PyPI and installed automatically with ``oceanarray``. .. note:: @@ -56,14 +57,9 @@ with your copy of the library. run. Stages 2–3, stack, grid, and report generation work on existing NetCDF files without it. -If you need to process RDI WorkHorse ADCP files (``file_type: rdi-raw``), -install the optional ``dolfyn`` dependency: - -.. code-block:: bash - - pip install "mhkit[dolfyn]" - -You do not need ``dolfyn`` for SeaBird, RBR, or Nortek Aquadopp files. +RDI WorkHorse ADCP files (``file_type: rdi-raw``) need no extra install: +``seasenselib`` reads them via ``mhkit[dolfyn]``, pulled in automatically with +``oceanarray``. ---- diff --git a/docs/source/roadmap.rst b/docs/source/roadmap.rst index 9374d2f..d76a5e2 100644 --- a/docs/source/roadmap.rst +++ b/docs/source/roadmap.rst @@ -127,7 +127,6 @@ Dependencies ============ - ``scipy``: Welch PSD for spectral figures in the grid report -- ``dolfyn`` (via ``mhkit[dolfyn]``): RDI raw ADCP file reader (``rdi-raw`` file type) - ``ioos_qc``: QARTOD gross-range and spike tests - ``gsw`` (TEOS-10): seawater property calculations - ``xarray`` / ``netCDF4``: core data handling @@ -135,4 +134,5 @@ Dependencies - ``matplotlib``: all figures - ``ppigrf``: IGRF magnetic declination for BEAM→ENU rotation - ``seasenselib``: raw instrument format readers (sbe-cnv, sbe-ascii, nortek-ascii, - nortek-csv, rbr-rsk, rbr-dat, rbr-hex) + nortek-csv, rbr-rsk, rbr-dat, rbr-hex, rdi-raw); pulls in ``mhkit[dolfyn]`` for + the RDI reader diff --git a/docs/source/setup.md b/docs/source/setup.md index 107c17d..e06ad33 100644 --- a/docs/source/setup.md +++ b/docs/source/setup.md @@ -7,25 +7,35 @@ dependencies and is not recommended for production use. ## Install oceanarray -`oceanarray` is not distributed on PyPI. Create an isolated Python -environment first, then clone and install from source. +`oceanarray` is on PyPI: -### Option A — conda +```bash +pip install oceanarray +``` + +This pulls in its dependencies, including `seasenselib` — the reader +`oceanarray` uses for raw instrument files in stage 1. + +### In an isolated environment (recommended) + +#### Option A — conda ```bash conda create -n oceanarray python=3.11 conda activate oceanarray +pip install oceanarray ``` -### Option B — venv +#### Option B — venv ```bash python -m venv venv source venv/bin/activate # macOS / Linux # venv\Scripts\activate # Windows +pip install oceanarray ``` -### Clone and install (after activating either environment) +### Development install (from source) ```bash git clone https://github.com/ocean-uhh/oceanarray @@ -34,35 +44,22 @@ pip install -e . ``` The `-e` flag installs in editable mode so that any local changes take effect -immediately without reinstalling. - -## Install seasenselib +immediately without reinstalling. See [Troubleshooting](troubleshooting.rst) +if a dependency fails to build. -`oceanarray` reads raw instrument files via `seasenselib`, which is available -on PyPI but declares version constraints on some of its dependencies -(`pyrsktools`, `pycnv`, `pyproj`) that can conflict with the rest of the -oceanarray environment. Install those packages first — letting pip satisfy -them against oceanarray's own requirements — then install `seasenselib` without -its dependency resolver: +## Stage 1 and seasenselib -```bash -pip install pyrsktools pycnv -pip install seasenselib --no-deps -``` - -Without `seasenselib`, stage 1 processing cannot run. Stages 2–3 and +Stage 1 (reading raw instrument files) needs `seasenselib`, which is installed +automatically with `oceanarray` (above). Without `seasenselib`, stage 1 +processing cannot run. Stages 2–3 and mooring-level processing (stack, grid, reports) can still run on existing NetCDF files. See [Troubleshooting](troubleshooting.rst) if the install fails. -## Optional: RDI ADCP support - -Processing RDI WorkHorse ADCP files (`file_type: rdi-raw`) requires `dolfyn`: - -```bash -pip install "mhkit[dolfyn]" -``` +## RDI ADCP support -This dependency is not needed for SeaBird, RBR, or Nortek Aquadopp files. +Processing RDI WorkHorse ADCP files (`file_type: rdi-raw`) needs no extra +install: `seasenselib` reads them via `mhkit[dolfyn]`, which is pulled in +automatically with `oceanarray`. ## Verify the installation diff --git a/docs/source/troubleshooting.rst b/docs/source/troubleshooting.rst index c773abc..dd616cb 100644 --- a/docs/source/troubleshooting.rst +++ b/docs/source/troubleshooting.rst @@ -13,27 +13,15 @@ It was assembled from real installation notes on macOS (Python 3.11, Homebrew). Installation problems --------------------- -seasenselib dependency conflicts (pyrsktools, pycnv, pyproj) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -``seasenselib`` is on PyPI but declares version constraints on several packages -(``pyrsktools``, ``pycnv``, ``pyproj``) that can conflict with the rest of the -oceanarray environment when pip tries to resolve everything at once. - -The fix is to install those packages first — letting pip satisfy them against -oceanarray's own requirements — then install ``seasenselib`` without its -dependency resolver: - -.. code-block:: bash - - pip install pyrsktools pycnv - pip install seasenselib --no-deps +seasenselib / pyproj build failures +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This is safe because oceanarray already provides compatible versions of the -packages that ``seasenselib`` needs at runtime. +``seasenselib`` (the raw-file reader, installed automatically with +``oceanarray``) and its dependency ``pyproj`` occasionally fail to build from +source on some platforms or pip versions. -**If pyproj still fails to install** (some pip versions fail to build it from -source), force a pre-built binary wheel before the step above: +**If pyproj fails to install**, force a pre-built binary wheel, then re-run the +install: .. code-block:: bash @@ -43,7 +31,7 @@ source), force a pre-built binary wheel before the step above: --only-binary=:all: \ "pyproj>=3.7.0" -Then re-run the ``pyrsktools``/``pycnv``/``seasenselib`` steps. + pip install oceanarray If all else fails, recreate the virtual environment with Python 3.11 exactly (``python3.11 -m venv venv``) and start from scratch. diff --git a/docs/source/yaml_configuration.rst b/docs/source/yaml_configuration.rst index 5d19679..4baee85 100644 --- a/docs/source/yaml_configuration.rst +++ b/docs/source/yaml_configuration.rst @@ -436,8 +436,7 @@ Valid ``file_type`` values * - ``rdi-raw`` - RDI raw binary - WorkHorse ADCP - - Requires the ``dolfyn`` package: - ``pip install "mhkit[dolfyn]"`` + - Read via ``seasenselib`` (``mhkit[dolfyn]``); no extra install needed. * - ``adcp-matlab`` - ADCP MATLAB export - RDI WorkHorse diff --git a/requirements.txt b/requirements.txt index 4d31a11..b574719 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,14 +15,16 @@ ppigrf # IGRF magnetic declination (used in stage3 for Nortek BEAM→ENU correc # QC ioos_qc - -# RDI ADCP reader (rdi-raw file type) requires dolfyn via mhkit -dolfyn # or: pip install "mhkit[dolfyn]" +# RDI ADCP reading (rdi-raw file type) is handled by seasenselib, which pulls in +# mhkit[dolfyn]; oceanarray does not import dolfyn directly. # Wavelet analysis (grid report temperature scalogram) pycwt # Torrence & Compo 1998 CWT; Morlet and Mexican hat wavelets -# seasenselib is installed separately: pip install -e seasenselib +# Raw instrument-file readers (stage 1). On PyPI; its runtime deps resolve +# against the stack above, so the old `--no-deps` workaround is obsolete. +# (Local development can override with an editable checkout: pip install -e ../seasenselib.) +seasenselib # Logsheets (oceanarray logsheet subcommand) jinja2>=3.0 # LaTeX template rendering