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

Fix/#148/duckling invalid dt iso #149

Merged
merged 4 commits into from
Jun 27, 2022
Merged

Conversation

ltbringer
Copy link
Contributor

@ltbringer ltbringer commented Jun 27, 2022

#148

We try to solve the invalid datetimes by allowing our parsers to evaluate entities before returning them.

try:
    time_entity.collect_datetime_values()
except ValueError:
    return None

This within an entity ensures that if we can parse the values only then the entity would be produced. In response to this, we have also changed the type signature of methods.

@ltbringer ltbringer self-assigned this Jun 27, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2022

Codecov Report

Merging #149 (eae1904) into master (b57a9e5) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #149   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           48        48           
  Lines         2155      2161    +6     
=========================================
+ Hits          2155      2161    +6     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
dialogy/types/entity/base_entity/__init__.py 100.00% <ø> (ø)
dialogy/types/entity/deserialize/__init__.py 100.00% <ø> (ø)
dialogy/plugins/text/duckling_plugin/__init__.py 100.00% <100.00%> (ø)
dialogy/types/entity/time/__init__.py 100.00% <100.00%> (ø)

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 b57a9e5...eae1904. Read the comment docs.

@ltbringer ltbringer merged commit b98efc1 into master Jun 27, 2022
@ltbringer ltbringer deleted the fix/#148/duckling_invalid_dt_iso branch June 27, 2022 14:09
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