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

A small change in start_time, end_time reading through datatime. #1184

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

masabhathini
Copy link

@masabhathini masabhathini commented May 6, 2020

  • Closes #xxxx
  • Tests added
  • Tests passed
  • Passes flake8 satpy
  • Fully documented
  • Add your name to AUTHORS.md if not there already

@coveralls
Copy link

Coverage Status

Coverage remained the same at 89.618% when pulling 137aed0 on masabhathini:master into ef24f29 on pytroll:master.

@codecov
Copy link

codecov bot commented May 6, 2020

Codecov Report

Merging #1184 (83e9ed0) into master (79ea923) will increase coverage by 0.68%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1184      +/-   ##
==========================================
+ Coverage   89.61%   90.30%   +0.68%     
==========================================
  Files         200      239      +39     
  Lines       29522    34236    +4714     
==========================================
+ Hits        26457    30916    +4459     
- Misses       3065     3320     +255     
Flag Coverage Δ
behaviourtests 4.51% <0.00%> (?)
unittests 90.77% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
satpy/readers/lma_l2.py 0.00% <0.00%> (ø)
satpy/readers/scatsat1_l2b.py 11.76% <0.00%> (-11.77%) ⬇️
satpy/utils.py 24.09% <0.00%> (-46.82%) ⬇️
satpy/readers/caliop_l2_cloud.py 11.47% <0.00%> (-24.60%) ⬇️
satpy/readers/ghrsst_l3c_sst.py 7.24% <0.00%> (-18.85%) ⬇️
satpy/readers/li_l2.py 13.33% <0.00%> (-15.00%) ⬇️
satpy/readers/mimic_TPW2_nc.py 80.95% <0.00%> (-9.41%) ⬇️
satpy/node.py 86.36% <0.00%> (-8.34%) ⬇️
satpy/tests/reader_tests/test_seviri_l1b_native.py 92.18% <0.00%> (-2.99%) ⬇️
... and 156 more

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 79ea923...6c0d8a5. Read the comment docs.

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.

Thanks for solving this bug ! Could you fix the long lines ?

lma flash extend 2d
@@ -31,8 +31,8 @@ def __init__(self, filename, filename_info, filetype_info):
self.h5f = h5py.File(self.filename, "r")
h5data = self.h5f['science_data']

self.filename_info['start_time'] = datetime.strptime(h5data.attrs['Range Beginning Date'], '%Y-%jT%H:%M:%S.%f')
self.filename_info['end_time'] = datetime.strptime(h5data.attrs['Range Ending Date'], '%Y-%jT%H:%M:%S.%f')
self.filename_info['start_time'] = datetime.strptime(h5data.attrs['Range Beginning Date'].decode('ascii'), '%Y-%jT%H:%M:%S.%f')
Copy link
Contributor

Choose a reason for hiding this comment

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

E501 line too long (135 > 120 characters)

self.filename_info['start_time'] = datetime.strptime(h5data.attrs['Range Beginning Date'], '%Y-%jT%H:%M:%S.%f')
self.filename_info['end_time'] = datetime.strptime(h5data.attrs['Range Ending Date'], '%Y-%jT%H:%M:%S.%f')
self.filename_info['start_time'] = datetime.strptime(h5data.attrs['Range Beginning Date'].decode('ascii'), '%Y-%jT%H:%M:%S.%f')
self.filename_info['end_time'] = datetime.strptime(h5data.attrs['Range Ending Date'].decode('ascii'), '%Y-%jT%H:%M:%S.%f')
Copy link
Contributor

Choose a reason for hiding this comment

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

E501 line too long (130 > 120 characters)

@ghost
Copy link

ghost commented Dec 1, 2020

DeepCode's analysis on #6c0d8a found:

  • ℹ️ 3 minor issues. 👇

Top issues

Description Example fixes
Useless super delegation in method '__init__' Occurrences: 🔧 Example fixes
Use % formatting in logging functions and pass the % parameters as arguments Occurrences: 🔧 Example fixes
standard import "import logging" should be placed before "import numpy as np" Occurrences: 🔧 Example fixes

👉 View analysis in DeepCode’s Dashboard | Configure the bot

@masabhathini
Copy link
Author

check for lma

@mraspaud
Copy link
Member

Any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants