Giter Site home page Giter Site logo

threedi-verification's Introduction

threedi-verification

This program tests a directory structure of mdu/csv files that all together check the subgrid fortran library. What it does:

  • Traverse a directory structure (directory passed on the commandline as the single argument).
  • Find *.mdu files and call them with the subgrid executable.
  • Find *.csv files belonging to the .mdu.
  • Read instructions from the .csv which tell us the x/y coordinate, parameter and expected value (mostly, there are exceptions, like summing all values).
  • Record the results and generate html pages with the results.

Test cases

N&S is preparing model test cases ("model unit tests"), testing individual bits and pieces of functionality. It works on linux only at the moment, but that's just because it expects an /opt/3di/bin/subgridf90 binary (so that's fixable).

It also requires a mercurial (hg) to be installed.

A django site shows the tests results, so the regular django setup is needed:

$ bin/django syncdb
$ bin/django migrate
$ bin/django runserver  # To run the site.

Run ./update_testbank.sh to get the current set of test cases in the testbank/ subdirectory. (You might need to enable the largefile mercurial extension in your ~/.hgrc). After that:

$ bin/django import_test_cases
$ bin/django run_simulations

Or in case you want to test with a specific testcase (especially when developing), use the run_simulation (without an s) command and pass in an mdu file:

$ bin/django run_simulation testbank/4_09/4_09_07/4_09_07.mdu

This generates some html files into the var/html/ directory. The html output is also generated on jenkins: http://jenkins.3di.lizard.net/testresults/ .

3Di subgrid library location

Currently /opt/3di/bin/subgridf90 is executed directly, so normally that'd be the most recently compiled and installed version. At least, on the jenkins machine that's the case: if the compilation of the "subgridf90" task succeeds, a "make install" is automatically done.

When running locally and using the debian packages, you'll need to symlink /opt/3di/ to the latest /opt/3di/* version. Or compile it by hand.

threedi-verification's People

Contributors

reinout avatar siggyf avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.