Skip to content

Store datetime properties as Python datetime objects in models #303

Merged
germanattanasio merged 3 commits intov1.0.0from
mdk/parse-datetime
Nov 10, 2017
Merged

Store datetime properties as Python datetime objects in models #303
germanattanasio merged 3 commits intov1.0.0from
mdk/parse-datetime

Conversation

@mkistler
Copy link
Copy Markdown

This PR adds helper functions to convert to/from iso8601 datetimes and uses these functions in the _from_dict() and _to_dict() methods of the models so that datetime values are stored as datetime objects and not simply strings.

The PR also includes a minor update to VisualRecognitionV3 resulting from a recent update to the swagger.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Nov 10, 2017

Codecov Report

Merging #303 into v1.0.0 will increase coverage by 0.8%.
The diff coverage is 35.95%.

Impacted file tree graph

@@            Coverage Diff            @@
##           v1.0.0     #303     +/-   ##
=========================================
+ Coverage   37.29%   38.09%   +0.8%     
=========================================
  Files          24       24             
  Lines        8173     8187     +14     
=========================================
+ Hits         3048     3119     +71     
+ Misses       5125     5068     -57
Impacted Files Coverage Δ
watson_developer_cloud/watson_service.py 82.6% <100%> (+0.38%) ⬆️
watson_developer_cloud/visual_recognition_v3.py 28.92% <22.22%> (-0.13%) ⬇️
..._developer_cloud/natural_language_classifier_v1.py 35.29% <33.33%> (+0.34%) ⬆️
watson_developer_cloud/discovery_v1.py 29.1% <4.34%> (+0.03%) ⬆️
watson_developer_cloud/conversation_v1.py 39.92% <46.93%> (+2.82%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d794a54...526e7dc. Read the comment docs.

@germanattanasio germanattanasio merged commit f0fda95 into v1.0.0 Nov 10, 2017
@germanattanasio germanattanasio deleted the mdk/parse-datetime branch November 14, 2017 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants