-
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.
Improve OGC Coverages scaling implementation
Mainly in response to PR review - Rename CoverageScaling.scale property to "factor" - Add docstrings and comments to CoverageScaling class - Add some missing type hints - Add unit tests for the coverages.util module - Update docstring for controllers.dataset_to_image - Make ScalingTest.test_scale_factor more thorough
- Loading branch information
Showing
6 changed files
with
94 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import unittest | ||
import xcube.core.new | ||
import xcube.webapi.ows.coverages.util as util | ||
|
||
|
||
class UtilTest(unittest.TestCase): | ||
|
||
def setUp(self): | ||
self.ds_latlon = xcube.core.new.new_cube() | ||
self.ds_xy = xcube.core.new.new_cube(x_name='x', y_name='y') | ||
|
||
def test_get_h_dim(self): | ||
self.assertEqual('lon', util.get_h_dim(self.ds_latlon)) | ||
self.assertEqual('x', util.get_h_dim(self.ds_xy)) | ||
|
||
def test_get_v_dim(self): | ||
self.assertEqual('lat', util.get_v_dim(self.ds_latlon)) | ||
self.assertEqual('y', util.get_v_dim(self.ds_xy)) |
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