Skip to content

.Csv added to EP URLs#32

Merged
joefutrelle merged 12 commits intomainfrom
csv
Apr 2, 2026
Merged

.Csv added to EP URLs#32
joefutrelle merged 12 commits intomainfrom
csv

Conversation

@joannekoch
Copy link
Copy Markdown
Collaborator

These changes include:

  1. .csv added to EP URLs when downloading a file
  2. Special bottle processing for AR28b, AR24a, and AR39a
  3. No nutrient data generated for AR78
  4. Added Underway Column Definitions for AE2426
  5. Updated Automated Tests accordingly.

@joannekoch joannekoch requested a review from joefutrelle April 1, 2026 18:13
@joannekoch joannekoch self-assigned this Apr 1, 2026
@joannekoch joannekoch added the enhancement New feature or request label Apr 1, 2026
@joefutrelle joefutrelle requested a review from Copilot April 2, 2026 13:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates multiple NES-LTER API “download” endpoints to use .csv-suffixed URLs (and adds/adjusts a few related data-handling rules), then updates the automated test suite and landing-page links to match.

Changes:

  • Updated many API routes and UI links to use .csv for file downloads (CTD, Underway, Events, Nut, Chl, HPLC, Stations).
  • Added/adjusted special-case data handling: extra bottle metadata handling for select cruises, skip nutrient flag generation for AR78, and add AE2426 underway column definitions.
  • Updated automated tests to validate the new .csv endpoints and some new/adjusted outputs.

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
tests/vessels.js Adds coverage for new vessels CSV download endpoint.
tests/underway.js Switches underway data + column definition file checks to .csv and updates AE2426 column-definition expectations.
tests/station.js Updates stations file download to /file.csv.
tests/nut.js Switches nutrient endpoints to .csv, updates expected counts, adds AR52 samplelog CSV test.
tests/niskin.js Adds niskins CSV download test and updates JSON field expectation (niskin_number).
tests/metadata.js Switches CTD metadata to .csv and adds bathymetry CSV test.
tests/landing.js Updates landing-page link targets to .csv for file downloads and adjusts window-handle switching.
tests/hplc.js Updates HPLC fetch to .csv.
tests/event.js Updates events fetch to .csv.
tests/cruise.js Adds cruises CSV test and keeps JSON “all cruises” test.
tests/chl.js Updates chlorophyll endpoints to .csv.
tests/cast.js Adds casts CSV “all” test and updates single-cast download to .csv.
tests/bottle.js Updates bottles + bottle_summary downloads to .csv.
api/underway/services.py Adds AE2426 underway column definitions and introduces JSON column-definition support alongside CSV.
api/underway/api.py Adds /column_definition/{cruise}.csv and changes underway data route to /{cruise}.csv.
api/stations/api.py Renames stations file route to /file.csv.
api/nut/services.py Changes AR52 nutrient samplelog merging approach.
api/nut/management/commands/importnut.py Skips nutrient flag generation for ar78.
api/nut/api.py Renames nutrient routes to .csv.
api/hplc/api.py Renames HPLC route to .csv.
api/events/api.py Renames events route to .csv.
api/ctd/services.py Adds JSON responses for vessels/cruises “all”, adds CSV endpoints for vessels/cruises/casts/niskins, renames NiskinOutput field.
api/ctd/management/commands/importniskin.py Adds special-case handling for cruises missing bottle metadata (AR28B/AR24A/AR39A).
api/ctd/api.py Adds/renames CTD routes for CSV downloads (vessels/cruises/casts/cast/niskins/bottles/metadata/bathymetry).
api/core/utils.py Adjusts missing-.btl handling logic in read_nut_data.
api/core/templates/cruise_list.html Updates landing page links to .csv download URLs.
api/chl/api.py Renames chlorophyll routes to .csv.
.github/workflows/publish-image-api.yml Changes workflow branch trigger list.

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

Comment thread api/underway/api.py Outdated
Comment thread api/ctd/api.py Outdated
Comment thread tests/metadata.js Outdated
Comment thread tests/cruise.js
Comment thread api/nut/services.py
Comment thread api/chl/api.py
Comment thread api/hplc/api.py
Comment thread api/events/api.py
Comment thread api/stations/api.py
Comment thread api/underway/api.py
joannekoch and others added 4 commits April 2, 2026 09:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@joannekoch
Copy link
Copy Markdown
Collaborator Author

Made copilot suggested changes and pushed up to csv branch. Ready to merge.

@joefutrelle joefutrelle merged commit 0d9e921 into main Apr 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants