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

time precision 10 #60

Merged
merged 5 commits into from
Jul 7, 2024
Merged

time precision 10 #60

merged 5 commits into from
Jul 7, 2024

Conversation

DavidDoukhan
Copy link
Contributor

Dear maintainer,

Please find a proposal for the management of time values associated to a precision argument of value 10.
This value is used for dates containing only year and month (no day).
See https://www.wikidata.org/wiki/Help:Dates#Precision

I chose to return a tuple (year, month) in this situation, since the python datetime requires a day, and that a single int value is used when the year only is used. This choice allow to distinguish between the different time precisions that could be used.

I also updated the test set.

Let me know if this proposal is consistent with your project.

Kind regards,

@DavidDoukhan
Copy link
Contributor Author

I also updated the Contributing.rst ro remove the installation of tox-pip-version.
When installing this package, I was not able to run the test suite.
Removing it from installation fixed this problem.

Copy link
Owner

@dahlia dahlia left a comment

Choose a reason for hiding this comment

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

Thanks for your first contribution!

Mypy typechecker seems to fail. Could you add Tuple[int, int] to the union, a return type of time() method?

@DavidDoukhan DavidDoukhan requested a review from dahlia July 6, 2024 06:39
@DavidDoukhan
Copy link
Contributor Author

Requested changes were addressed. Please let me know if it's ok for you.

@DavidDoukhan
Copy link
Contributor Author

I don't understand why the "main / check (pull_request)" failed. Any idea ?
A re-run may be enough ?

@dahlia
Copy link
Owner

dahlia commented Jul 7, 2024

I don't understand why the "main / check (pull_request)" failed. Any idea ? A re-run may be enough ?

That's an existing problem. Never mind! I'm going to merge this anyway.

@dahlia dahlia merged commit 9e6d07d into dahlia:main Jul 7, 2024
7 of 8 checks passed
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.

2 participants