-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #976 from sul-dlss/t966-vma-ftp-download-fix
Uses Vendor and Vendor Interface to query Database
- Loading branch information
Showing
11 changed files
with
149 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
import os | ||
from datetime import date | ||
from pathlib import Path | ||
|
||
|
||
def vendor_data_basepath() -> str: | ||
return "/opt/airflow/vendor-data" | ||
def vendor_data_basepath() -> Path: | ||
return Path("/opt/airflow/vendor-data") | ||
|
||
|
||
def downloads_basepath() -> str: | ||
return os.path.join(vendor_data_basepath(), "downloads") | ||
def downloads_basepath() -> Path: | ||
return vendor_data_basepath() / "downloads" | ||
|
||
|
||
def download_path(vendor_uuid: str, vendor_interface_uuid: str) -> str: | ||
return os.path.join(downloads_basepath(), vendor_uuid, vendor_interface_uuid) | ||
def download_path(vendor_uuid: str, vendor_interface_uuid: str) -> Path: | ||
return downloads_basepath() / vendor_uuid / vendor_interface_uuid | ||
|
||
|
||
def archive_basepath() -> str: | ||
return os.path.join(vendor_data_basepath(), "archive") | ||
def archive_basepath() -> Path: | ||
return vendor_data_basepath() / "archive" | ||
|
||
|
||
def archive_path(vendor_uuid: str, vendor_interface_uuid: str, archive_date: date): | ||
return os.path.join( | ||
archive_basepath(), | ||
archive_date.strftime("%Y%m%d"), | ||
vendor_uuid, | ||
vendor_interface_uuid, | ||
return ( | ||
archive_basepath() | ||
/ archive_date.strftime("%Y%m%d") | ||
/ vendor_uuid | ||
/ vendor_interface_uuid | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.