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

Add validation rules for input rasters #111

Merged
merged 29 commits into from
Feb 22, 2024

Conversation

soaressgabriel
Copy link
Collaborator

@soaressgabriel soaressgabriel commented Feb 15, 2024

Checklist

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Added tests for changed code.
  • Updated documentation for changed code.

Description

  • Added the following rules in RasterDataRules enum:

    • FORBID_NO_DATA: Ensure no parts of the raster contain NO_DATA values;
    • FORBID_ALL_ZEROES: Ensure the raster does not consist entirely of zero values;
    • FORBID_ALL_ONES: Ensure the raster does not consist entirely of one values;
    • FORBID_OUT_OF_RANGE: Ensure the raster pixels must be within the specified valid range.
  • Implemented a validation mechanism based on Chain of Responsibility pattern that checks each raster dataset against the above rules (RasterMapValidator);

  • The validation is performed automatically as part of the model simulation configuration processing pipeline (ModelConfiguration), flagging any datasets that violate their respective rules for further investigation or correction;

  • Configures use of GitHub Actions for CI to run related tests on each push and pull request.

Related Issue

Motivation and context

How has this been tested

  • Manually;
  • The specific unit test suite must pass without any exception.

Screenshots

  • N/A

@soaressgabriel soaressgabriel self-assigned this Feb 15, 2024
@soaressgabriel soaressgabriel linked an issue Feb 15, 2024 that may be closed by this pull request
@LINAMARIAOSORIO LINAMARIAOSORIO marked this pull request as ready for review February 19, 2024 15:03
Copy link
Collaborator

@LINAMARIAOSORIO LINAMARIAOSORIO left a comment

Choose a reason for hiding this comment

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

Tested with known database with problmes

@LINAMARIAOSORIO
Copy link
Collaborator

Tested with known database with problems

@soaressgabriel soaressgabriel dismissed LINAMARIAOSORIO’s stale review February 19, 2024 19:25

The merge-base changed after approval.

Copy link
Collaborator

@LINAMARIAOSORIO LINAMARIAOSORIO left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@LINAMARIAOSORIO LINAMARIAOSORIO left a comment

Choose a reason for hiding this comment

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

No Conflicts

@soaressgabriel soaressgabriel merged commit f7e3c54 into main Feb 22, 2024
1 check passed
@soaressgabriel soaressgabriel deleted the feat/109-add-validation-rules-for-input-rasters branch February 22, 2024 21:38
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.

Add validation rules for input rasters
2 participants