-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix sync index column order to match order from astropy 4.0 #215
Changes from all commits
5562bcf
7753b8b
08b007f
52a3a5e
2f5435a
830af07
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,9 +196,9 @@ def get_row_from_archfiles(archfiles): | |
# date like 2019-02-20T2109z, human-readable and Windows-friendly (no :) for a unique | ||
# identifier for this set of updates. | ||
date_id = get_date_id(DateTime(archfiles[0]['filetime']).fits) | ||
row = {'filetime0': archfiles[0]['filetime'], | ||
row = {'date_id': date_id, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And sure. Removing the explicit list in file_defs and replacing with this strategy to get the columns in the right order seems fine. You have a better handle on astropy development to know which would be more stable in the long-term. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our code should always be written to be tolerant of changes to column order or potentially new columns. My original implementation was the root problem, nothing more. In astropy we strive for API stability, but sometimes allow cleaning up legacy design mistakes (or in these cases, designs that became mistakes due to language changes). |
||
'filetime0': archfiles[0]['filetime'], | ||
'filetime1': archfiles[-1]['filetime'], | ||
'date_id': date_id, | ||
'row0': archfiles[0]['rowstart'], | ||
'row1': archfiles[-1]['rowstop']} | ||
return row | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And sure 'row' is fine. I probably overthought it... I avoided 'row' as the var just because the lines of the index table defined row spaces.