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

Test domain layer implementation #882

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

stcui007
Copy link
Contributor

@stcui007 stcui007 commented Sep 17, 2024

This PR provides the needed test for the domain layer code implentation. It contains a unit test for the domain layer configuration parsing, creates a domain layer realization configuration file. The realization config file is used for running ngen executable on the domain layer.

With the latest revision, the domain layer output will be written to:
domain_layer_layer_1.csv
domain_layer_layer_2.csv
domain_layer_layer_3.csv
By default, the surface layer output will be written to usual catchment and nexus output files.

Additions

Unit test code
two realization onfig json files

Removals

Changes

Minor change to src/NGen.cpp and include/realizations/config/layer.hpp

Testing

On local linux machine

  1. Running ngen executable on domain layer, for example:
    ./cmake_build/ngen ./data/catchment_data.geojson '' ./data/nexus_data.geojson '' data/example_domainlayer_realization_config.json

  2. Running ngen executable on domain layer with a multilayer hydrofabric and realization config.
    ./cmake_build/ngen ./data/catchment_data_multilayer.geojson '' ./data/nexus_data.geojson '' data/example_domainlayer_multilayer_realization_config.json
    This will generate an additional output file: domain_layer_layer_4.csv

  3. Unit test

Screenshots

Screenshot (71)

Screenshot (72)

Notes

Todos

Checklist

  • [x ] PR has an informative and human-readable title
  • [x ] Changes are limited to a single goal (no scope creep)
  • [x ] Code can be automatically merged (no conflicts)
  • [x ] Code follows project standards (link if applicable)
  • [x ] Passes all existing automated tests
  • [x ] Any change in functionality is tested
  • [x ] New functions are documented (with a description, list of inputs, and expected output)
  • [x ] Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • [x ] Reviewers requested with the Reviewers tool ➡️

Testing checklist (automated report can be put here)

Target Environment support

  • [x ] Linux

@stcui007 stcui007 marked this pull request as ready for review September 23, 2024 14:45
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.

1 participant