-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix
s1_geocode_stack.py
, undefined variable in s1_rdr2geo.py
, uni…
…t tests (#198) * fix undefined variable in `s1_rdr2geo.py`. * Add a unit test which runs the static layers script. Add cli command for static layers. * fix `s1_geocode_stack.py` for changes made to yamale template * add the static layer test file * add unit test for geocode stack * tee pytest output to avoid 10 minute job no-output limit * point to test burst db * bump version to 0.4.1 * newline for file end
- Loading branch information
1 parent
7d7fc9d
commit 7bc6d64
Showing
8 changed files
with
60 additions
and
30 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
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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from pathlib import Path | ||
|
||
from compass import s1_geocode_stack | ||
|
||
|
||
def test_geocode_slc_run(geocode_slc_params, tmpdir): | ||
""" | ||
Run s1_geocode_slc to ensure it does not crash | ||
Parameters | ||
---------- | ||
geocode_slc_params: SimpleNamespace | ||
SimpleNamespace containing geocode SLC unit test parameters | ||
""" | ||
data_dir = Path(geocode_slc_params.gslc_cfg_path).parent | ||
|
||
with tmpdir.as_cwd(): | ||
s1_geocode_stack.run( | ||
slc_dir=data_dir, | ||
dem_file=data_dir / "test_dem.tiff", | ||
orbit_dir=data_dir / "orbits", | ||
burst_db_file=data_dir / "test_burst_map.sqlite3", | ||
) |
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,20 @@ | ||
from compass import s1_static_layers | ||
from compass.utils.geo_runconfig import GeoRunConfig | ||
|
||
|
||
def test_geocode_slc_run(geocode_slc_params): | ||
""" | ||
Run s1_geocode_slc to ensure it does not crash | ||
Parameters | ||
---------- | ||
geocode_slc_params: SimpleNamespace | ||
SimpleNamespace containing geocode SLC unit test parameters | ||
""" | ||
# load yaml to cfg | ||
cfg = GeoRunConfig.load_from_yaml( | ||
geocode_slc_params.gslc_cfg_path, workflow_name="s1_cslc_geo" | ||
) | ||
|
||
# pass cfg to s1_geocode_slc | ||
s1_static_layers.run(cfg) |