Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change writer configs from INI (.cfg) to YAML (#63)
* Change writer configs from INI (.cfg) to YAML * Add very simple writer tests and fix writer load from Scene
- Loading branch information
Showing
22 changed files
with
336 additions
and
93 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 was deleted.
Oops, something went wrong.
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,7 @@ | ||
writer: | ||
name: cf | ||
description: Generic netCDF4/CF Writer | ||
writer: !!python/name:satpy.writers.cf_writer.CFWriter | ||
file_pattern: '{name}_{start_time:%Y%m%d_%H%M%S}.nc' | ||
compress: DEFLATE | ||
zlevel: 6 |
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
writer: | ||
name: geotiff | ||
description: Generic GeoTIFF Writer | ||
writer: !!python/name:satpy.writers.geotiff.GeoTIFFWriter | ||
file_pattern: '{name}_{start_time:%Y%m%d_%H%M%S}.tif' | ||
compress: DEFLATE | ||
zlevel: 6 |
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
writer: | ||
name: ninjotiff | ||
description: NinjoTIFF Writer | ||
writer: !!python/name:satpy.writers.ninjotiff.NinjoTIFFWriter | ||
file_pattern: '{name}_{start_time:%Y%m%d_%H%M%S}.tif' | ||
compress: DEFLATE | ||
zlevel: 6 |
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
writer: | ||
name: simple_image | ||
description: Generic Image Writer | ||
writer: !!python/name:satpy.writers.simple_image.PillowWriter | ||
file_pattern: '{name}_{start_time:%Y%m%d_%H%M%S}.png' |
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,43 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (c) 2017 David Hoese | ||
# | ||
# Author(s): | ||
# | ||
# David Hoese <david.hoese@ssec.wisc.edu> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
"""The writer tests package. | ||
""" | ||
|
||
import sys | ||
|
||
from satpy.tests.writer_tests import (test_cf, test_geotiff, | ||
test_ninjotiff, test_simple_image) | ||
|
||
if sys.version_info < (2, 7): | ||
import unittest2 as unittest | ||
else: | ||
import unittest | ||
|
||
|
||
def suite(): | ||
"""Test suite for all writer tests""" | ||
mysuite = unittest.TestSuite() | ||
# mysuite.addTests(test_cf.suite()) | ||
mysuite.addTests(test_geotiff.suite()) | ||
# mysuite.addTests(test_ninjotiff.suite()) | ||
mysuite.addTests(test_simple_image.suite()) | ||
return mysuite |
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,52 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (c) 2017 David Hoese | ||
# | ||
# Author(s): | ||
# | ||
# David Hoese <david.hoese@ssec.wisc.edu> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
"""Tests for the CF writer. | ||
""" | ||
import os | ||
import sys | ||
|
||
import numpy as np | ||
|
||
try: | ||
from unittest import mock | ||
except ImportError: | ||
import mock | ||
|
||
if sys.version_info < (2, 7): | ||
import unittest2 as unittest | ||
else: | ||
import unittest | ||
|
||
|
||
class TestCFWriter(unittest.TestCase): | ||
def test_init(self): | ||
from satpy.writers.cf_writer import CFWriter | ||
w = CFWriter() | ||
|
||
|
||
def suite(): | ||
"""The test suite for this writer's tests. | ||
""" | ||
loader = unittest.TestLoader() | ||
mysuite = unittest.TestSuite() | ||
mysuite.addTest(loader.loadTestsFromTestCase(TestCFWriter)) | ||
return mysuite |
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,52 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (c) 2017 David Hoese | ||
# | ||
# Author(s): | ||
# | ||
# David Hoese <david.hoese@ssec.wisc.edu> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
"""Tests for the CF writer. | ||
""" | ||
import os | ||
import sys | ||
|
||
import numpy as np | ||
|
||
try: | ||
from unittest import mock | ||
except ImportError: | ||
import mock | ||
|
||
if sys.version_info < (2, 7): | ||
import unittest2 as unittest | ||
else: | ||
import unittest | ||
|
||
|
||
class TestGeoTIFFWriter(unittest.TestCase): | ||
def test_init(self): | ||
from satpy.writers.geotiff import GeoTIFFWriter | ||
w = GeoTIFFWriter() | ||
|
||
|
||
def suite(): | ||
"""The test suite for this writer's tests. | ||
""" | ||
loader = unittest.TestLoader() | ||
mysuite = unittest.TestSuite() | ||
mysuite.addTest(loader.loadTestsFromTestCase(TestGeoTIFFWriter)) | ||
return mysuite |
Oops, something went wrong.