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

datetime to astropy Time: instr #2676

Merged
merged 23 commits into from Jul 4, 2018

Conversation

Projects
None yet
4 participants
@vn-ki
Copy link
Member

commented Jun 27, 2018

No description provided.

@sunpy-bot

This comment has been minimized.

Copy link

commented Jun 27, 2018

Thanks for the pull request @vn-ki! Everything looks great!

@vn-ki vn-ki changed the base branch from master to time Jun 27, 2018

@Cadair Cadair added this to the Time milestone Jun 27, 2018

@pep8speaks

This comment has been minimized.

Copy link

commented Jun 27, 2018

Hello @vn-ki! Thanks for updating the PR.

Line 67:5: E722 do not use bare except'
Line 415:16: E741 ambiguous variable name 'l'

Line 44:101: E501 line too long (130 > 100 characters)
Line 820:101: E501 line too long (103 > 100 characters)
Line 821:101: E501 line too long (103 > 100 characters)
Line 822:101: E501 line too long (103 > 100 characters)
Line 823:101: E501 line too long (103 > 100 characters)
Line 824:101: E501 line too long (103 > 100 characters)
Line 825:101: E501 line too long (103 > 100 characters)
Line 975:5: E122 continuation line missing indentation or outdented

Line 111:101: E501 line too long (116 > 100 characters)
Line 112:101: E501 line too long (111 > 100 characters)

Line 85:101: E501 line too long (107 > 100 characters)
Line 89:101: E501 line too long (106 > 100 characters)
Line 127:101: E501 line too long (104 > 100 characters)
Line 130:101: E501 line too long (196 > 100 characters)
Line 134:101: E501 line too long (106 > 100 characters)
Line 212:5: E303 too many blank lines (2)
Line 218:101: E501 line too long (101 > 100 characters)
Line 247:101: E501 line too long (101 > 100 characters)
Line 363:101: E501 line too long (123 > 100 characters)

Line 26:101: E501 line too long (111 > 100 characters)
Line 192:101: E501 line too long (151 > 100 characters)
Line 193:101: E501 line too long (139 > 100 characters)
Line 194:101: E501 line too long (139 > 100 characters)

Line 33:101: E501 line too long (115 > 100 characters)

Line 49:101: E501 line too long (121 > 100 characters)
Line 58:101: E501 line too long (108 > 100 characters)
Line 132:101: E501 line too long (102 > 100 characters)
Line 150:101: E501 line too long (120 > 100 characters)

Line 41:101: E501 line too long (106 > 100 characters)
Line 66:101: E501 line too long (102 > 100 characters)
Line 86:22: E128 continuation line under-indented for visual indent
Line 88:22: E128 continuation line under-indented for visual indent
Line 120:9: E122 continuation line missing indentation or outdented
Line 121:9: E122 continuation line missing indentation or outdented
Line 122:9: E122 continuation line missing indentation or outdented
Line 123:9: E122 continuation line missing indentation or outdented
Line 124:9: E122 continuation line missing indentation or outdented
Line 125:9: E122 continuation line missing indentation or outdented
Line 126:9: E122 continuation line missing indentation or outdented
Line 127:9: E122 continuation line missing indentation or outdented
Line 128:9: E122 continuation line missing indentation or outdented
Line 129:9: E122 continuation line missing indentation or outdented
Line 130:9: E122 continuation line missing indentation or outdented
Line 131:9: E122 continuation line missing indentation or outdented

Line 24:1: E302 expected 2 blank lines, found 1
Line 36:101: E501 line too long (101 > 100 characters)
Line 52:101: E501 line too long (109 > 100 characters)
Line 72:101: E501 line too long (103 > 100 characters)
Line 86:36: E231 missing whitespace after ','
Line 86:53: E231 missing whitespace after ','
Line 86:65: E231 missing whitespace after ','
Line 87:18: E128 continuation line under-indented for visual indent
Line 87:30: E231 missing whitespace after ','
Line 87:42: E231 missing whitespace after ','
Line 87:59: E231 missing whitespace after ','
Line 89:38: E231 missing whitespace after ','
Line 89:47: E231 missing whitespace after ','
Line 89:58: E231 missing whitespace after ','
Line 99:32: E201 whitespace after '('
Line 101:69: E231 missing whitespace after ','
Line 104:40: E231 missing whitespace after ','
Line 154:82: E225 missing whitespace around operator

Line 42:101: E501 line too long (131 > 100 characters)
Line 47:101: E501 line too long (115 > 100 characters)
Line 50:101: E501 line too long (107 > 100 characters)
Line 64:101: E501 line too long (110 > 100 characters)
Line 122:101: E501 line too long (199 > 100 characters)
Line 123:101: E501 line too long (119 > 100 characters)
Line 125:101: E501 line too long (108 > 100 characters)
Line 139:101: E501 line too long (199 > 100 characters)
Line 140:61: E251 unexpected spaces around keyword / parameter equals
Line 140:63: E251 unexpected spaces around keyword / parameter equals
Line 140:98: E231 missing whitespace after ':'
Line 140:101: E501 line too long (119 > 100 characters)
Line 140:111: E231 missing whitespace after ':'
Line 146:34: E231 missing whitespace after ','
Line 147:36: E231 missing whitespace after ','
Line 165:5: E303 too many blank lines (3)
Line 182:101: E501 line too long (123 > 100 characters)
Line 190:101: E501 line too long (138 > 100 characters)
Line 195:101: E501 line too long (115 > 100 characters)
Line 196:101: E501 line too long (102 > 100 characters)
Line 197:101: E501 line too long (107 > 100 characters)
Line 212:101: E501 line too long (117 > 100 characters)
Line 251:101: E501 line too long (128 > 100 characters)
Line 252:67: E251 unexpected spaces around keyword / parameter equals
Line 252:69: E251 unexpected spaces around keyword / parameter equals
Line 252:101: E501 line too long (137 > 100 characters)
Line 252:116: E231 missing whitespace after ':'
Line 252:129: E231 missing whitespace after ':'
Line 254:73: E231 missing whitespace after ','
Line 254:101: E501 line too long (108 > 100 characters)
Line 255:25: E225 missing whitespace around operator
Line 257:34: E231 missing whitespace after ','
Line 258:36: E231 missing whitespace after ','

Line 36:101: E501 line too long (158 > 100 characters)
Line 45:101: E501 line too long (117 > 100 characters)

Line 50:101: E501 line too long (106 > 100 characters)
Line 69:101: E501 line too long (102 > 100 characters)
Line 113:9: E265 block comment should start with '# '
Line 134:101: E501 line too long (107 > 100 characters)

Comment last updated on July 04, 2018 at 11:08 Hours UTC
for tim in timearray:
datetime_array.append(parse_time(tim))
time_array.append(parse_time(tim))

This comment has been minimized.

Copy link
@Cadair

Cadair Jun 27, 2018

Member

should we not cast to a Time at the end here, to convert from a list of times to a Time with an array in it.

This comment has been minimized.

Copy link
@vn-ki

vn-ki Jun 27, 2018

Author Member

I did and it fails the tests!!! (Don't know why, have to investigate it :D)

This comment has been minimized.

Copy link
@Cadair

Cadair Jun 27, 2018

Member

lol ok, well this is fine if that's what it needs to be.

vn-ki added some commits Jun 27, 2018

@@ -51,7 +52,7 @@ def download_weekly_pointing_file(date):

# find out which mission week corresponds to date
time_diff = date - weekly_file_start
weekdiff = time_diff.days // 7
weekdiff = time_diff.jd // 7

This comment has been minimized.

Copy link
@Cadair

Cadair Jun 27, 2018

Member

this should probably be to(u.day)

vn-ki added some commits Jun 27, 2018

@vn-ki vn-ki force-pushed the vn-ki:astropy-time-instr branch from 3fa7c95 to 96f93b4 Jun 29, 2018

vn-ki added some commits Jun 29, 2018

It's probably better to use datetime anyway
When you add a TimeDelta(1*u.day), you may end up with the same day if the day contains a leapsecond
@Cadair

Cadair approved these changes Jul 1, 2018

@@ -175,6 +175,7 @@ def _parse_hdus(cls, hdulist):
raise ValueError("Don't know how to parse this file")

times = start_time + TimeDelta(seconds_from_start*u.second)
times.precision = 9

This comment has been minimized.

Copy link
@nabobalis

nabobalis Jul 4, 2018

Contributor

Can we not set this to be for all time-series or do we just want it on some sources?

This comment has been minimized.

Copy link
@vn-ki

vn-ki Jul 4, 2018

Author Member

Yeah. We should that to all the timeseries. Should I do it in this PR or in a follow up one?

This comment has been minimized.

Copy link
@nabobalis

nabobalis Jul 4, 2018

Contributor

I dont see why not in this PR.

@nabobalis
Copy link
Contributor

left a comment

Looks good.

@Cadair Cadair merged commit add84a2 into sunpy:time Jul 4, 2018

5 of 8 checks passed

ci/circleci: figure-tests-36 Your tests failed on CircleCI
Details
ci/circleci: html-docs Your tests failed on CircleCI
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
ci/circleci: astropy-time Your tests passed on CircleCI!
Details
ci/circleci: astropy-time-online Your tests passed on CircleCI!
Details
ci/circleci: egg-info-36 Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
sunpy-bot All checks passed

@vn-ki vn-ki deleted the vn-ki:astropy-time-instr branch May 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.