-
Notifications
You must be signed in to change notification settings - Fork 2
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
Transfer Trip Surveys to S3 #267
Conversation
…b (no core logic yet).
…, and S3 uploading.
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.
👍 Looks good to me.
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.
Some minors and perhaps consider moving the type form stuff into it's own package.
src/main/java/org/opentripplanner/middleware/models/IntervalUpload.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/middleware/triptracker/TripSurveyUploadJob.java
Show resolved
Hide resolved
} | ||
} | ||
|
||
private static HttpResponseValues apiRequest(HttpMethod method, String subPath, String queryParams, String topic) { |
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.
Consider moving all typeform related classes and methods to its own package similar to bugsnag. To me this seems cleaner and separates typeform interactions from business logic. Lemme know what you think.
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.
Good point, updated in c27a5de.
src/main/java/org/opentripplanner/middleware/triptracker/TripSurveyUploadJob.java
Outdated
Show resolved
Hide resolved
...est/java/org/opentripplanner/middleware/connecteddataplatform/ConnectedDataPlatformTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/middleware/triptracker/TripSurveyUploadJobTest.java
Outdated
Show resolved
Hide resolved
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.
Thanks for the changes. I'm approving, but see changes in order to get test to pass in a different time zone.
|
||
@Test | ||
void canMakeResponsesParams() { | ||
// October 25, 2024 00:00, US Pacific Daylight Time |
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.
In order to use the config param OTP_TIMEZONE: America/Los_Angeles
and for this test to pass (outside of this time zone), the following lines have to be added to this test:
// Load default env.yml configuration.
ConfigUtils.loadConfig(new String[]{});
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.
You are right, the class can actually extend OTPMiddlewareTestEnvironment
that includes loading the config (18ecd9f).
Checklist
dev
before they can be merged tomaster
)Description
This PR adds support for transferring responses and deleting from TypeForm, compiling them into one CSV file, and upload that as a ZIP file to S3.
New config params:
TRIP_SURVEY_API_TOKEN
, for downloading survey metadata and responses.