Skip to content

Add constituents to support TICON data#186

Merged
bkeepers merged 6 commits intomainfrom
ticon-constituents
Jan 9, 2026
Merged

Add constituents to support TICON data#186
bkeepers merged 6 commits intomainfrom
ticon-constituents

Conversation

@bkeepers
Copy link
Contributor

@bkeepers bkeepers commented Jan 8, 2026

To support openwatersio/tide-database#16, this adds 16 new constituents and aliases 2 existing constituents. It also refactors the existing constituent definitions to make it easier to add new ones in the future.

cc #135

Copy link
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 pull request adds support for TICON tidal constituent data by introducing 16 new tidal constituents and creating 2 constituent aliases (LAMBDA2/LAM2, RHO1/RHO). The PR also refactors the constituent definition architecture from a monolithic file to individual files per constituent, using dynamic imports via import.meta.glob to automatically load all constituent modules.

Key Changes:

  • Refactors constituent definitions from a single file to individual TypeScript files per constituent
  • Adds 16 new constituents: EP2, MA2, MB2, SGM, MSQM, MTM, MKS2, N4, S3, T3, R3, 3L2, 3N2, 2MS6, 2MK5, 2MO5
  • Creates aliases: LAMBDA2 (alias of LAM2) and RHO1 (alias of RHO)

Reviewed changes

Copilot reviewed 65 out of 66 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
tsconfig.json Adds "vite/client" types to support import.meta.glob in TypeScript
packages/tide-predictor/src/constituents/index.ts Major refactor: consolidates constituent factory functions and implements dynamic import pattern using import.meta.glob to load constituent definitions
packages/tide-predictor/src/constituents/*.ts 56 new individual constituent definition files, each exporting a frozen constituent object
packages/tide-predictor/src/constituents/constituent.ts Deleted (functionality moved to index.ts)
packages/tide-predictor/src/constituents/compound-constituent.ts Deleted (functionality moved to index.ts)
packages/tide-predictor/src/harmonics/*.ts Updated to remove internal _model property and use dynamic constituent lookup instead
packages/tide-predictor/src/node-corrections/index.ts Removes explicit NodeCorrections interface definition
packages/tide-predictor/test/constituents/*.test.ts Updated imports and added comprehensive test coverage for all 16 new constituents

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

@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3779ba2) to head (26d2c5c).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #186   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        66   +55     
  Lines          510       533   +23     
  Branches        55        60    +5     
=========================================
+ Hits           510       533   +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
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

Copilot reviewed 66 out of 67 changed files in this pull request and generated 11 comments.


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

Copy link
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

Copilot reviewed 66 out of 67 changed files in this pull request and generated 9 comments.


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

@bkeepers bkeepers force-pushed the ticon-constituents branch from 7fcc30b to 26d2c5c Compare January 9, 2026 16:10
@bkeepers bkeepers merged commit a2813fe into main Jan 9, 2026
4 checks passed
@bkeepers bkeepers deleted the ticon-constituents branch January 9, 2026 16:11
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.

1 participant