concord-consortium / codap

CODAP (Common Online Data Analysis Platform)
MIT License
94 stars 38 forks source link

make parseDate support more date formats (e.g. 3-digit years) #1367

Closed pjanik closed 1 month ago

pjanik commented 1 month ago

While testing some edge cases, I've noticed that the existing V2 parser doesn't work well with years that have three digits. Since I rely on parseDate more than on V2, I wanted to fix that. Rather than modifying the existing regexp patterns, I've set things up in a way that allows us to gradually move to other date parsers in the future. Currently, I'm using the built-in Date.parse, but it's easy to replace it with something else.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.73%. Comparing base (08b3e9b) to head (430e488). Report is 10 commits behind head on main.

Files Patch % Lines
v3/src/utilities/date-parser.ts 91.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1367 +/- ## ========================================== + Coverage 85.70% 85.73% +0.03% ========================================== Files 521 521 Lines 25057 25068 +11 Branches 6800 6813 +13 ========================================== + Hits 21474 21492 +18 + Misses 3310 3304 -6 + Partials 273 272 -1 ``` | [Flag](https://app.codecov.io/gh/concord-consortium/codap/pull/1367/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium) | Coverage Δ | | |---|---|---| | [cypress](https://app.codecov.io/gh/concord-consortium/codap/pull/1367/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium) | `72.91% <91.66%> (+0.04%)` | :arrow_up: | | [jest](https://app.codecov.io/gh/concord-consortium/codap/pull/1367/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium) | `53.34% <91.66%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cypress[bot] commented 1 month ago

1 failed and 2 flaky tests on run #3797 ↗︎

1 197 28 0 Flakiness 2

Details:

Merge pull request #1367 from concord-consortium/187799270-extend-date-parser
Project: codap-v3 Commit: 56e85a3e52
Status: Failed Duration: 10:15 💡
Started: Jul 23, 2024 11:38 AM Ended: Jul 23, 2024 11:48 AM
Failed  cypress/e2e/graph.spec.ts • 1 failed test View Output
Test Artifacts
Graph UI > graph inspector panel > change points in table and check for autoscale Test Replay Screenshots
Flakiness  table.spec.ts • 1 flaky test View Output
Test Artifacts
case table ui > table cell editing > edits cells Test Replay Screenshots
Flakiness  toolbar.spec.ts • 1 flaky test View Output
Test Artifacts
codap toolbar > will open a slider Test Replay Screenshots

Review all test suite changes for PR #1367 ↗︎