Only allow nonnegative version numbers#2389
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2389 +/- ##
==========================================
- Coverage 99.50% 99.44% -0.06%
==========================================
Files 322 326 +4
Lines 20161 20205 +44
==========================================
+ Hits 20061 20093 +32
- Misses 100 112 +12
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Does it make sense for these tests to be tied to the actual schema version number? Should we mock the schema version instead to get consistent test coverage? |
|
@sbadithe When you pull in the latest changes from |
|
|
||
| from packaging.version import parse | ||
|
|
||
| from featuretools.version import ENTITYSET_SCHEMA_VERSION, FEATURES_SCHEMA_VERSION |
There was a problem hiding this comment.
With this refactor, we no longer have to import the schema version conditionally inside the function to avoid a circular import error -- we can just do it at the top
| @@ -43,23 +44,22 @@ def find_descendents(cls): | |||
|
|
|||
| def check_schema_version(cls, cls_type): | |||
There was a problem hiding this comment.
remove in favor of function in schema_utils.py
packaginglibrary started throwing an error for this case. This PR resolves that by taking the max of (0, minor-1) to prevent negative version numbers.