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

Literal datetime sub #1870

Merged
merged 15 commits into from May 16, 2022
Merged

Literal datetime sub #1870

merged 15 commits into from May 16, 2022

Conversation

ghost
Copy link

@ghost ghost commented Apr 25, 2022

Summary of changes

rebased PR #1089 from 2 yrs ago, adding DateTime arithmetic operations for Literals - an extension of #629, additional tests of numerics added, as requested in #1089 (comment) and limited modernisation of test/test_literal/test_literal.py

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Added tests for any changes that have a runtime impact.
  • Checked that all tests and type checking passes.
  • For changes that have a potential impact on users of this project:
    • Updated relevant documentation to avoid inaccuracies.
    • Considered adding additional documentation.
    • Considered adding an example in ./examples for new features.
    • Considered updating our changelog (CHANGELOG.md).
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

Graham Higgins added 2 commits April 24, 2022 17:06
adding DateTime arithmetic operations for Literals - an extension of #629
tests added as requested in #1089 (comment)
@ghost ghost self-requested a review April 25, 2022 15:16
rdflib/term.py Outdated Show resolved Hide resolved
@aucampia
Copy link
Member

@gjhiggins I added some more tests and fixed some issues in this PR against your branch: https://github.com/gjhiggins/rdflib/pull/7

aucampia and others added 2 commits April 30, 2022 23:36
This adds some additional tests and fixes some corner cases.
Add more tests and fix some corner cases
@ghost
Copy link
Author

ghost commented Apr 30, 2022

@gjhiggins I added some more tests and fixed some issues in this PR against your branch: gjhiggins#7

Thanks for the support, looking good.

Copy link
Member

@aucampia aucampia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one small concern is some logic that is in __add__ (and carried over to __sub__) from before, but I think it makes sense to have these methods behave the same in these regards so I'm okay with it.

@aucampia aucampia requested a review from a team April 30, 2022 21:53
@coveralls
Copy link

coveralls commented May 3, 2022

Coverage Status

Coverage increased (+0.01%) to 88.41% when pulling a79599e on gjhiggins:literal-datetime-sub into 8a096ab on RDFLib:master.

@aucampia aucampia added the review wanted This indicates that the PR is ready for review label May 4, 2022
@aucampia
Copy link
Member

aucampia commented May 4, 2022

Resolving conflicts

@aucampia
Copy link
Member

aucampia commented May 4, 2022

Resolving conflicts

Done.

@aucampia
Copy link
Member

@RDFLib/core I will merge this by 2022-05-17 if there is no further feedback.

@sonarcloud
Copy link

sonarcloud bot commented May 15, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@aucampia
Copy link
Member

Merging this with only one approval because the change is well tested and the addition of __sub__ make sense as we are already providing __add__.

@aucampia aucampia merged commit 06a4395 into RDFLib:master May 16, 2022
@ghost ghost deleted the literal-datetime-sub branch May 16, 2022 16:00
@ghost ghost removed the review wanted This indicates that the PR is ready for review label Jun 4, 2022
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.

None yet

2 participants