Skip to content

Update process.py script to work with new API changes#2

Closed
gsalaz98 wants to merge 2 commits intomasterfrom
refactor-api-format-update-and-bug-fixes
Closed

Update process.py script to work with new API changes#2
gsalaz98 wants to merge 2 commits intomasterfrom
refactor-api-format-update-and-bug-fixes

Conversation

@gsalaz98
Copy link
Copy Markdown
Contributor

Aslo adjusts Regalytics BaseData EndTime parsing and timezone, since created_time is returned in a time that contains the offset to UTC.

Adjusts the resolution to AllResolutions for ergonomics and because the timestamp precision of the created_time field is 1 microsecond

  * Adjust BaseData model EndTime parsing and calculation
Copy link
Copy Markdown
Member

@Martin-Molinero Martin-Molinero left a comment

Choose a reason for hiding this comment

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

Cool! minor questions

Comment thread process.py Outdated
article['agencies'] = [agency['name'] for agency in article['agencies']]

date = datetime.strptime(article['latest_update'], '%Y-%m-%d')
date = datetime.strptime(article['created_at'], '%Y-%m-%dT%H:%M:%S.%f%z').astimezone(timezone.utc)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is Regalytics returning the data sorted by 'created_at' ?

@Martin-Molinero Martin-Molinero deleted the refactor-api-format-update-and-bug-fixes branch July 15, 2022 21:35
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.

2 participants