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

LightCurve.meta now instance of OrderedDict #892

Merged
merged 6 commits into from
Mar 23, 2014
Merged

Conversation

gunner272
Copy link
Contributor

hopefully solved
#841

Lightcurve.Meta now ensured to be instance of OrderedDict ,essentially having .copy() method ,solving the error in Truncate function,

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling ba33daf on gunner272:header into c440ae3 on sunpy:master.

@@ -71,7 +72,11 @@ class LightCurve(object):

def __init__(self, data, meta=None):
self.data = pandas.DataFrame(data)
self.meta = meta
if meta == '' or meta==None:
Copy link
Member

Choose a reason for hiding this comment

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

compare to the singleton None with is, not with ==.

@gunner272
Copy link
Contributor Author

@Cadair ,changes incorporated

@@ -100,6 +101,15 @@ def _parse_level_0cs(fp):
while line.startswith(";"):
header.append(line)
line = fp.readline()

meta = OrderedDict()
for l in header :
Copy link
Member

Choose a reason for hiding this comment

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

is this 1 or l? I would change it for line so I can understand better what we are comparing.

@gunner272
Copy link
Contributor Author

I dont understand why does Travis build fails,help required

@Cadair
Copy link
Member

Cadair commented Mar 10, 2014

@ehsteve @aringlis @wafels Is it my imagination of have GOES turned off their web services API? http://ngdc.noaa.gov/stp/satellite/goes/dataaccess.html

@aringlis
Copy link
Member

Looks like you're right. I found the following message under 'what's new':

'The web services link will be removed from these web pages beginning today. There is an error that affects the date-time in returned data for two hours at the time of the spring daylight savings time each year. '

@@ -69,9 +70,13 @@ class LightCurve(object):
_cond_dispatch = ConditionalDispatch()
create = classmethod(_cond_dispatch.wrapper())

def __init__(self, data, meta=None):
def __init__(self, data, meta = None):
Copy link
Member

Choose a reason for hiding this comment

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

PEP8: There should not be spaces around = for keywords.

@Cadair
Copy link
Member

Cadair commented Mar 18, 2014

After the small PEP8 fix, could you please add a changelog entry and then I would be good for merge.

@gunner272
Copy link
Contributor Author

Made the changes

@Cadair
Copy link
Member

Cadair commented Mar 19, 2014

you seem to have missed my = one ;)

@gunner272
Copy link
Contributor Author

done

@Cadair
Copy link
Member

Cadair commented Mar 21, 2014

👍 Looks great

Cadair added a commit that referenced this pull request Mar 23, 2014
LightCurve.meta now instance of OrderedDict
@Cadair Cadair merged commit 9e34c2c into sunpy:master Mar 23, 2014
@gunner272 gunner272 deleted the header branch March 24, 2014 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants