Skip to content

Swc loc depths#1316

Open
burlingamet wants to merge 17 commits into
masterfrom
swc_loc_depths
Open

Swc loc depths#1316
burlingamet wants to merge 17 commits into
masterfrom
swc_loc_depths

Conversation

@burlingamet

Copy link
Copy Markdown
Contributor

adding unique code for enviroscan to blend together multiple PR tables to get an accurate calculation for depth in the sensor_positions file. requires asset install information, calibration information and geolocation information to determine positions over time. Required because the positions of individual sensors are not stored in the named location database.

Copilot AI review requested due to automatic review settings July 8, 2026 17:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an EnviroSCAN-specific “position history” pipeline so sensor_positions.csv can include accurate per-sensor depth/position history over time (even when positions aren’t stored directly in the named-location DB), by generating per-CFGLOC history JSON and optionally consuming it during monthly publish output generation.

Changes:

  • Add concH2oSoilSalinity_position_history_loader to build per-CFGLOC enviroscan *_history.json files from installs, calibrations (CVALD1), and geolocation history.
  • Update pub_files sensor positions generation to optionally prefer loader-emitted history JSONs via POSITION_HISTORY_PATH.
  • Add new data_access queries/types supporting enviroscan install/calibration/configured-VER lookups, plus CI workflow to build/push the new loader image.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
modules/pub_files/output_files/sensor_positions/sensor_positions_file.py Adds optional JSON-backed CFGLOC row generation for sensor_positions.csv.
modules/pub_files/main.py Wires position_history_path from config into sensor positions generation.
modules/pub_files/application_config.py Adds POSITION_HISTORY_PATH optional configuration.
modules/data_access/types/cvald1_calibration.py New NamedTuple for CVALD1 calibration rows.
modules/data_access/types/cfgloc_ver.py New NamedTuple for configured (CFGLOC, HOR, VER) rows.
modules/data_access/types/asset_install.py New NamedTuple for enviroscan install periods.
modules/data_access/get_enviroscan_cvald1_calibrations.py Adds query for enviroscan VSWC CVALD1 calibrations.
modules/data_access/get_enviroscan_cfgloc_vers.py Adds query for which VERs are configured per CFGLOC for the split group.
modules/data_access/get_enviroscan_asset_installs.py Adds query for enviroscan installs per CFGLOC across time.
modules/concH2oSoilSalinity_position_history_loader/tests/test_position_history_loader.py Adds unit tests covering loader behavior and edge cases.
modules/concH2oSoilSalinity_position_history_loader/requirements.txt Defines loader dependencies.
modules/concH2oSoilSalinity_position_history_loader/Dockerfile Adds container build for the loader.
modules/concH2oSoilSalinity_position_history_loader/concH2oSoilSalinity_position_history_loader.py Implements the history JSON generation/merging logic.
modules/concH2oSoilSalinity_position_history_loader/concH2oSoilSalinity_position_history_loader_main.py Adds the loader entrypoint wiring DB access to the writer.
.github/workflows/build_push_concH2oSoilSalinity_position_history_loader.yml Expands workflow triggers to rebuild on common/data_access changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/concH2oSoilSalinity_position_history_loader/Dockerfile Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants