-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add key validation methods (the methods themselves still gotta be revised) * Combined errors implementation * Finish constraints * Add silly constraint solution * Add try/catches for validation + add unit and integration tests * Change MetadataError to InvalidMetadataError * Simplify tests to one element + fix lint * Remove _metadata * Change way _metadata implemented in to_dict * Add constraint validation + integration test + change _constraints to be list of tuple * Fix error message for validate + add error integration test * Fix all constraint related error messages * Add helper _append_error to validate + fix constraint related errors * Add constraint unit test * Fix lint * change _metadata[pk] to pk * Add tests requested + addresses feedback * Address minor feedback
- Loading branch information
Showing
12 changed files
with
560 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
"""Metadata Exceptions.""" | ||
|
||
|
||
class MetadataError(Exception): | ||
class InvalidMetadataError(Exception): | ||
"""Error to raise when Metadata is not valid.""" | ||
|
||
|
||
class MetadataNotFittedError(MetadataError): | ||
class MetadataNotFittedError(InvalidMetadataError): | ||
"""Error to raise when Metadata is used before fitting.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.