-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use pkg_resources for local files, fixes #27; update code structure; …
…update Readme, adding a full example
- Loading branch information
Showing
28 changed files
with
156 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
graft mosartwmpy/tests | ||
include mosartwmpy/*.yaml | ||
global-exclude *.py[cod] | ||
prune input output validation paper docs dask-worker-space **/.mypy_cache .github |
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 +1 @@ | ||
from .model import Model | ||
from .model import Model |
Empty file.
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
File renamed without changes.
Empty file.
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
Empty file.
Empty file.
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
Empty file.
Empty file.
Empty file.
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
Empty file.
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
Empty file.
Empty file.
Empty file.
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,22 +1,22 @@ | ||
import numpy as np | ||
from pathlib import Path | ||
import unittest | ||
|
||
from mosartwmpy import Model | ||
from mosartwmpy.grid.grid import Grid | ||
from mosartwmpy.state.state import State | ||
|
||
|
||
class ModelTest(unittest.TestCase): | ||
"""Test that the model initializes and runs with the default settings.""" | ||
|
||
def setUp(self): | ||
self.model = Model() | ||
self.grid = Grid.from_files('./mosartwmpy/tests/grid.zip') | ||
self.grid = Grid.from_files(Path('./mosartwmpy/tests/grid.zip')) | ||
|
||
def test_can_initialize_and_run(self): | ||
self.model.initialize('./mosartwmpy/tests/test_config.yaml', grid = self.grid) | ||
self.model.initialize(Path('./mosartwmpy/tests/test_config.yaml'), grid=self.grid) | ||
self.model.update() | ||
self.assertTrue(True, "model initializes and updates") | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() | ||
unittest.main() |
Empty file.
Empty file.
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
Oops, something went wrong.