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

Roman/file split feature #161

Open
wants to merge 11 commits into
base: josh/refactor
Choose a base branch
from

Conversation

eightspokes
Copy link
Collaborator

@eightspokes eightspokes commented Sep 28, 2024

This implementation contains refactoring changes in CSVFileProcessor file to address an issue where several flights can be placed into a single CSV file.

Development Testing:

G3X file was modified to have a valid header. Also entries were modified to emulate large time gape (greater than 5 minutes)

Screenshot 2024-09-30 at 9 54 03 AM

The date from the flight processor was correctly processed as 2 flights
Screenshot 2024-09-30 at 9 55 57 AM

public static OffsetDateTime convertToOffset(String originalDate, String originalTime, String originalOffset, String newOffset) {
//System.out.println("original: \t" + originalTime + " " + originalOffset + " new offset: "+ newOffset);

// create a LocalDateTime using the date time passed as parameter
LocalDateTime ldt = LocalDateTime.parse(originalDate + " " + originalTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
LocalDateTime ldt = parseDateTime(originalDate + " " + originalTime);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Uses parseDateTime method (utilizes multiple parse formats) instead of doing parsing itself.

@@ -98,10 +98,11 @@ private static void initializeConnectionPool() {
config.setUsername(dbUser);
config.setPassword(dbPassword);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This should match the Database.java from josh/refactor

@@ -113,7 +113,6 @@ public static void main(String[] arguments) throws SQLException {
* non-existant
* upload. This can cause the upload process to crash.
*
* @param connection is the connection to the database
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ProcessUpload from josh/refactor currently throw errors for me, needs revisiting.

@eightspokes eightspokes self-assigned this Sep 30, 2024
@eightspokes eightspokes added the enhancement New feature or request label Sep 30, 2024
@eightspokes eightspokes marked this pull request as ready for review September 30, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants