Skip to content

Commit

Permalink
remove outdated florence references
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeAdamss committed May 20, 2024
1 parent e353dd8 commit c1afc56
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions dpytools/http/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ def upload_sdmx(
) -> None:
"""
Upload sdmx files to the DP Upload Service `/upload` endpoint. The file to be uploaded (located at `sdmx_path`) is chunked (default chunk size 5242880 bytes) and uploaded to an S3 bucket.
The `s3_bucket` argument should be set as an environment variable and accessed via os.getenv() or similar. `florence_access_token` should be generated via the DP Identity API and passed as a string argument.
"""
self._upload(sdmx_path, "application/xml", chunk_size)

Expand Down Expand Up @@ -228,16 +226,13 @@ def _upload(
def _upload_new(
self,
file_path: Union[Path, str],
florence_access_token: str,
mimetype: str,
alias_name: Optional[str],
title: Optional[str],
chunk_size: int = 5242880,
) -> None:
"""
Upload files to the DP Upload Service `upload-new` endpoint. The file to be uploaded (located at `file_path`) is chunked (default chunk size 5242880 bytes) and uploaded to an S3 bucket. The file type should be specified as `mimetype` (e.g. "text/csv" for a CSV file).
`florence_access_token` should be generated via the DP Identity API and passed as a string argument.
"""
# Convert file_path string to Path
if isinstance(file_path, str):
Expand All @@ -256,7 +251,8 @@ def _upload_new(
)

# Upload file chunks to S3
self._upload_file_chunks(file_chunks, upload_params, florence_access_token)
self._upload_file_chunks(file_chunks, upload_params
)

# Delete temporary files
_delete_temp_chunks(file_chunks)
Expand Down

0 comments on commit c1afc56

Please sign in to comment.