Commit Graph

546 Commits

Author SHA1 Message Date
a2f074b150 Merge pull request #83 from brendan-ch/chore/sort-resolver-data
chore/sort-resolver-data
2025-09-30 15:33:59 -07:00
415b461308 Add sorting to all data types
- Add name-based sorting for entities with names
- Add order-based sorting for ordered stops
- Add "seconds remaining" based sorting for ETAs
- Add tests to check sorting
2025-09-30 15:24:22 -07:00
513c8bb127 Change the default maximum distance, and move it to environment.ts 2025-09-26 16:24:20 -07:00
dc50f98a6d Restore the pruning test for shuttles 2025-09-26 16:19:39 -07:00
67a4b3fc8e Update test cases to test updating shuttle data depending on proximity 2025-09-26 16:12:01 -07:00
155ab2b4d2 Filter out out-of-service shuttles 2025-09-26 16:01:32 -07:00
5ed15ee534 Update mock data arrangement of shuttle data test to match updated requirements 2025-09-26 15:56:27 -07:00
7ed780a459 Implement filtering of shuttles by proximity to the closest route polyline coordinate 2025-09-26 15:40:58 -07:00
9268ad5181 Repeat warning message for ETA data 2025-09-26 15:00:04 -07:00
7d886975b9 Update mocked methods in tests, and test method names to match 2025-09-26 14:56:49 -07:00
db263122a1 Refactor remaining methods in ApiBasedShuttleRepositoryLoader.ts to follow the same sub-procedure pattern 2025-09-26 14:56:34 -07:00
74a55b3f57 Refactor shuttle update method into clear sub-procedures 2025-09-26 14:45:11 -07:00
9a2b2f65b9 Rename methods to indicate a single responsibility 2025-09-26 14:31:20 -07:00
e7b5f034f3 Add orderedStops property to the Route type 2025-09-23 10:15:42 -07:00
72b77c3b60 Add a reconnection interval constant 2025-09-01 12:06:23 -07:00
051f6c12e7 Add error logging for unexpected Redis disconnections 2025-09-01 11:58:27 -07:00
5a183b632c Export the same variables from mocks 2025-08-26 17:12:27 -07:00
07ccd05734 Add environment variables to control settings 2025-08-26 17:09:25 -07:00
8438d44ac3 Use the Express.js rate limiter middleware if not disabled 2025-08-26 11:34:29 -07:00
9856719e38 Change the server setup to use Express.js for hosting 2025-08-26 11:02:03 -07:00
8b8aae3ff9 Remove the app integration testing support 2025-08-26 10:49:46 -07:00
125081f40b Configure docker-compose.yml and environment.ts to add rate limit toggle 2025-08-26 09:46:02 -07:00
14fbdc7408 Move testHelpers directory up one level 2025-07-31 22:41:05 -04:00
b7299b8359 Move all tests to subdirectories underneath code to be tested 2025-07-31 22:35:49 -04:00
6444251649 Implement mocking of environment file 2025-07-21 19:42:28 -04:00
883dc9ef6e Create a src-level environment.ts file for all environment variables 2025-07-21 19:35:04 -04:00
b737cd0fa5 Add errors to the parking structure resolvers 2025-07-21 19:16:38 -04:00
e78982538e Add implementation and tests for ParkingStructureResolvers.ts 2025-07-21 19:06:00 -04:00
ee7b5eefda Rename query interface for historical data 2025-07-19 13:14:39 -04:00
52a0133107 Add system ID to parking structure 2025-07-19 12:55:36 -04:00
182587596c Change properties to match GraphQL input and query result 2025-07-19 12:15:41 -04:00
8ee1f1522e Change ParkingStructureCountOptions and HistoricalParkingAverageQueryResult to use Date objects
This matches the behavior of `updatedTime` on shuttle objects. When returning API data, dates are converted into milliseconds since Epoch by the DateTime scalar implementation.
2025-07-19 12:12:08 -04:00
ed037cf2d2 Move repositories into folders. 2025-07-19 11:58:45 -04:00
3302822bf8 Add a placeholder implementation of ParkingStructureResolvers 2025-07-19 11:55:51 -04:00
86710657df Use TLS in production 2025-07-03 16:30:12 -04:00
d1b60772d8 Update RedisParkingRepository.ts to use Redis aggregation functions 2025-07-03 16:00:57 -04:00
f406e3e01d Add retention period for new time series 2025-07-03 15:53:06 -04:00
df657a02f3 Build Redis parking repository instead of in-memory one 2025-07-03 15:20:07 -04:00
b9d5f7b3df Refactor parking repositories to use dedicated Constants file and smaller functions 2025-07-03 15:19:57 -04:00
53632fe470 Add BaseRedisRepository as parent class of RedisNotificationRepository.ts and RedisParkingRepository.ts 2025-07-02 20:00:44 -04:00
19336ce6ec Add setLoggingInterval method and implementation for tests and other purposes.
Let users control the logging interval of both parking repositories.
2025-07-02 19:48:16 -04:00
868a9f3b1d Add RedisParkingRepository.ts and convert existing tests to shared tests for both classes 2025-07-02 19:40:45 -04:00
ca2a66509b Implement getHistoricalAveragesOfParkingStructureCounts for InMemoryParkingRepository.ts, and add tests 2025-07-02 19:10:16 -04:00
2b04ca01a9 Update InMemoryParkingRepository.ts and tests to use the circular queue 2025-07-02 18:48:33 -04:00
220b402b3b Optimize the append method to check if the data is already sorted 2025-07-02 18:43:41 -04:00
4fbc30a264 Add CircularQueue.ts and test file 2025-07-02 18:34:55 -04:00
18be03bfa6 Add stub implementation for my best friend, the humble circular queue
Add stubs for a custom circular queue implementation for the historical data in the parking repo
2025-07-01 22:01:07 -04:00
4758d566da Add constant MAX_NUM_ENTRIES and adjust PARKING_LOGGING_INTERVAL_MS 2025-07-01 21:47:15 -04:00
8fb296027d Fix remaining issues with tests, and add implementation within InMemoryParkingRepository.ts 2025-07-01 21:37:26 -04:00
6759bba2ce Add properties to determine when the parking repository should log data 2025-07-01 21:23:15 -04:00