dahlia / wikidata

Wikidata client library for Python
https://pypi.org/project/Wikidata/
GNU General Public License v3.0
337 stars 31 forks source link

time precision 10 #60

Closed DavidDoukhan closed 2 months ago

DavidDoukhan commented 2 months ago

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 commented 2 months ago

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.

DavidDoukhan commented 2 months ago

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

DavidDoukhan commented 2 months ago

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

dahlia commented 2 months ago

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.