Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve date testing #299

Closed
wants to merge 5 commits into from
Closed

Improve date testing #299

wants to merge 5 commits into from

Conversation

Silvanoc
Copy link
Contributor

No description provided.

Add test to validate that "greenlet" is on a version that makes the
project runnable on Python v3.12.

Signed-off-by: Silvano Cirujano Cuesta <[email protected]>
Prefixmaps requires Python > 3.9.0, therefore also updating the required
Python version.

Signed-off-by: Silvano Cirujano Cuesta <[email protected]>
XSD-date cannot be written in the form "CCYYMMDD", this patch adds a
test to ensure it.

linkml-runtime has been relying on Python `fromisoformat` [1] format to
parse and, implicitly validate, XSD-date. But from Python 3.11 upwards
`fromisoformat` also accepts "CCYYMMDD" as a valid date, breaking
XSD-date compatibility.

This is a regression test to avoid this issue in the future.

[1]: https://docs.python.org/3/library/datetime.html#datetime.date.fromisoformat

Signed-off-by: Silvano Cirujano Cuesta <[email protected]>
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (51d2fce) 62.80% compared to head (90650c0) 62.88%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #299      +/-   ##
==========================================
+ Coverage   62.80%   62.88%   +0.08%     
==========================================
  Files          61       62       +1     
  Lines        8506     8531      +25     
  Branches     2239     2436     +197     
==========================================
+ Hits         5342     5365      +23     
- Misses       2553     2556       +3     
+ Partials      611      610       -1     

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

XSD-date cannot be written in the form "CCYYMMDD", this patch adds a
test to ensure it.

linkml-runtime has been relying on Python `fromisoformat` [1] format to
parse and, implicitly validate, XSD-date. But from Python 3.11 upwards
`fromisoformat` also accepts "CCYYMMDD" as a valid date, breaking
XSD-date compatibility.

Signed-off-by: Silvano Cirujano Cuesta <[email protected]>
@Silvanoc Silvanoc closed this Feb 22, 2024
@Silvanoc Silvanoc deleted the improve-date-testing branch February 22, 2024 08:43
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