Conversation
There was a problem hiding this comment.
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
fffec80 to
7497ba2
Compare
6c870fe to
007ee9a
Compare
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
7fcc30b to
26d2c5c
Compare
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