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

[NEAT-62] Cleanup Validation -> Issues Module #314

Merged
merged 11 commits into from
Mar 16, 2024
Merged

Conversation

doctrino
Copy link
Collaborator

@doctrino doctrino commented Mar 15, 2024

Most of the code is moving round existing classes and renaming. That accounts for most of the changes in code-lines.

Changes:

  • Rename rules.valiadion to rules.issues
  • Remove all imports in __init__.py and make all submodules of the new rules.issues public such that you can use the modules for navigation. E.g. from cognite.neat.rules import issues and then issues.dms.MissingSpacesError.
  • All Errors have the suffix Error and all warnings have suffix Warning. Introduced test to enforce this standard.
  • Introduce a base class for all error and warning types, this is used when formatting the error.

@doctrino doctrino marked this pull request as ready for review March 16, 2024 08:04
@doctrino doctrino requested a review from nikokaoja March 16, 2024 08:04
@@ -0,0 +1,27 @@
from . import dms, fileread, formatters, importing, spreadsheet, spreadsheet_file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice org



@dataclass(frozen=True, order=True)
class ClassNoPropertiesNoParentsWarning(ValidationWarning):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are couple of issues which depending on the use case can be warning or error. Is this possible with the current setup?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, you would have to duplicate have one error and one warning version of the issue.

@doctrino doctrino merged commit 9e46d30 into main Mar 16, 2024
6 checks passed
@doctrino doctrino deleted the cleanup-validation-module branch March 16, 2024 11:23
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