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

Issue165 #169

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Issue165 #169

wants to merge 2 commits into from

Conversation

Damerson1
Copy link
Collaborator

Fixes #165

The local file saving for png and html files was removed and replaced with the new GCS file saving. The reports are all uploaded to the gcs through the ThreeDimensionalGrapher.
 
-Much of the local file saving was removed in order to make way for saving files to the GCS.
-Two functions were added to choose between uploading html files and uploading Png files.
-Each function used to create the graphs are no longer static. This change was needed in order to allow self-calls, no issues has been shown as a result.

  • GCS uploading was added to each Draw function.
     
    This was needed because uploading files directly to GCS improves accessibility and streamlines the storage process by eliminating the need for local file storage.

Issue165 still has a problem with uploading the files to the correct files paths and with uploading files with duplicate names that are already located in the cloud. Otherwise, the files will upload to the GCS, assuming there's no duplicate names, trying to delete and overwrite an existing file that was previously uploaded.

Copy link
Collaborator

@Hoshi-Okami Hoshi-Okami left a comment

Choose a reason for hiding this comment

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

All of the files from the Acceptance Reports seem to be going into the GCS bucket, but the file paths aren't matching the previous ones. You may have to go back to working with the time stamps to fix this issue.

Copy link
Member

@mohamdlog mohamdlog left a comment

Choose a reason for hiding this comment

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

The updated ThreeDimensionalGrapher class has an issue with file paths not matching the intended structure, causing uploads to incorrect locations.


file_name = f"{drone_name}_plot.png"
full_target_directory = os.path.join(self.log_subdir, self.__class__.__name__, file_name)
self._upload_plot(full_target_directory ,fig)
Copy link
Member

Choose a reason for hiding this comment

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

You are passing the arguments to _upload_plot in the wrong order. You pass full_target_directory first and fig second, whereas _upload_plot expects fig first and file_name second.

title):

file_name = f"{drone_name}_plot.png"
full_target_directory = os.path.join(self.log_subdir, self.__class__.__name__, file_name)
Copy link
Member

Choose a reason for hiding this comment

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

This conflicts with how GCSStorageService handles the upload path.

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.

Upload PNG and HTML Directly to GCS
3 participants