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] Feature Statistics: Error in time variable display #5152

Merged

Conversation

ales-erjavec
Copy link
Contributor

Issue

Feature Statistics raises error when displaying time variable with a formatted representation.

  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/owfeaturestatistics.py", line 575, in data
    return roles[role]()
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/owfeaturestatistics.py", line 540, in display
    return render_value(self._center[row])
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/owfeaturestatistics.py", line 518, in render_value
    str_val = format_zeros(str_val)
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/owfeaturestatistics.py", line 505, in format_zeros
    if float(str_val) == 0:
ValueError: could not convert string to float: '2001-12-31 18:12:00'

The error however might not on show up on macOS in ErrorReporting dialog.

This is probably the reason behind issue gh-5009.

Description of changes
  • Fix error in formatting
  • Optimize attribute/class_vars/meta membership tests in the model. Was slow O(n_variables) before (noticeable on n_variables > 500)
Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Dec 29, 2020

Codecov Report

Merging #5152 (7b0b946) into master (e2eb828) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #5152   +/-   ##
=======================================
  Coverage   84.77%   84.78%           
=======================================
  Files         286      286           
  Lines       60097    60106    +9     
=======================================
+ Hits        50950    50961   +11     
+ Misses       9147     9145    -2     

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