Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reader for the SAR OCN L2 wind product in SAFE format. #645

Merged
merged 10 commits into from Apr 9, 2019

Conversation

TAlonglong
Copy link
Collaborator

@TAlonglong TAlonglong commented Mar 12, 2019

Adding reading for the SAR OCN L2 wind product in SAFE format

  • Tests added
  • Tests passed
  • Passes git diff origin/master -- "*py" | flake8 --diff
  • Fully documented

@coveralls
Copy link

coveralls commented Mar 12, 2019

Coverage Status

Coverage increased (+0.08%) to 79.401% when pulling a99e1ca on TAlonglong:feature-sar-ocn-l2 into 3e35059 on pytroll:master.

@mraspaud mraspaud added enhancement code enhancements, features, improvements component:readers labels Mar 12, 2019
@codecov
Copy link

codecov bot commented Mar 13, 2019

Codecov Report

Merging #645 into master will increase coverage by 0.08%.
The diff coverage is 96.15%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #645      +/-   ##
=========================================
+ Coverage   79.31%   79.4%   +0.08%     
=========================================
  Files         145     147       +2     
  Lines       21120   21224     +104     
=========================================
+ Hits        16752   16852     +100     
- Misses       4368    4372       +4
Impacted Files Coverage Δ
satpy/readers/safe_sar_l2_ocn.py 100% <100%> (ø)
satpy/tests/reader_tests/__init__.py 97.72% <100%> (+0.05%) ⬆️
satpy/tests/reader_tests/test_safe_sar_l2_ocn.py 90% <90%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e35059...a99e1ca. Read the comment docs.

# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Module for testing the satpy.readers.safe_rsae_l2_ocn module.
"""
import os
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F401 'os' imported but unused

"""
import os
import sys
import numpy as np
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F401 'numpy as np' imported but unused

import os
import sys
import numpy as np
import xarray as xr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F401 'xarray as xr' imported but unused

from satpy.readers.safe_sar_l2_ocn import SAFENC
from satpy import DatasetID

ds_id = DatasetID(name='foo')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F841 local variable 'ds_id' is assigned to but never used

'fstart_time': 0, 'fend_time': 0,
'polarization': 'vv'}

test = SAFENC('S1A_IW_OCN__2SDV_20190228T075834_20190228T075849_026127_02EA43_8846.SAFE/measurement/'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F841 local variable 'test' is assigned to but never used

@TAlonglong TAlonglong changed the title Reader for the SAR OCN L2 wind product in SAFE format. WIP: Reader for the SAR OCN L2 wind product in SAFE format. Mar 15, 2019
import sys
import numpy as np
import xarray as xr
from satpy.tests.reader_tests.test_netcdf_utils import FakeNetCDF4FileHandler
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F401 'satpy.tests.reader_tests.test_netcdf_utils.FakeNetCDF4FileHandler' imported but unused

except ImportError:
import mock

class TestSAFENC(unittest.TestCase):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E302 expected 2 blank lines, found 1

filetype_info={})


def test_init(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E303 too many blank lines (2)


def test_get_dataset(self):
for ch in self.channels:
dt = self.reader.get_dataset(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F841 local variable 'dt' is assigned to but never used

@TAlonglong TAlonglong changed the title WIP: Reader for the SAR OCN L2 wind product in SAFE format. Reader for the SAR OCN L2 wind product in SAFE format. Mar 20, 2019
@TAlonglong
Copy link
Collaborator Author

How should I ask for a review @mraspaud?

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mraspaud
Copy link
Member

mraspaud commented Apr 9, 2019

To ask for review, you can ping us like you did :)

@mraspaud mraspaud merged commit 6cabadd into pytroll:master Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:readers enhancement code enhancements, features, improvements work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants