Swc loc depths#1316
Open
burlingamet wants to merge 17 commits into
Open
Conversation
…ng into swc_loc_depths
Contributor
There was a problem hiding this comment.
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_loaderto build per-CFGLOC enviroscan*_history.jsonfiles from installs, calibrations (CVALD1), and geolocation history. - Update
pub_filessensor positions generation to optionally prefer loader-emitted history JSONs viaPOSITION_HISTORY_PATH. - Add new
data_accessqueries/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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.