-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into parse-concentration
- Loading branch information
Showing
39 changed files
with
750 additions
and
521 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
__title__ = "cg" | ||
__version__ = "54.4.1" | ||
__version__ = "54.4.8" |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import gzip | ||
from pathlib import Path | ||
|
||
|
||
def read_gzip_first_line(file_path: Path) -> str: | ||
"""Return first line of gzip file.""" | ||
with gzip.open(file_path) as file: | ||
return file.readline().decode() |
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
Empty file.
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
from enum import StrEnum | ||
|
||
OSTYPE: str = "Unix/MacOS" | ||
ROOT_TO_TRIM: str = "/home" | ||
|
||
DESTINATION_ATTRIBUTE: str = "destination" | ||
SOURCE_ATTRIBUTE: str = "source" | ||
|
||
|
||
class DataflowEndpoints(StrEnum): | ||
"""Enum containing all DDN dataflow endpoints used.""" | ||
|
||
ARCHIVE_FILES = "files/archive" | ||
DELETE_FILE = "files/delete" | ||
GET_AUTH_TOKEN = "auth/token" | ||
REFRESH_AUTH_TOKEN = "auth/token/refresh" | ||
RETRIEVE_FILES = "files/retrieve" | ||
GET_JOB_STATUS = "activity/jobs/" | ||
|
||
|
||
class JobStatus(StrEnum): | ||
"""Enum for the different job statuses which can be returned via Miria.""" | ||
|
||
CANCELED = "Canceled" | ||
COMPLETED = "Completed" | ||
DENIED = "Denied" | ||
CREATION_IN_PROGRESS = "Creation in progress" | ||
IN_QUEUE = "In Queue" | ||
INVALID_LICENSE = "Invalid license" | ||
ON_VALIDATION = "On validation" | ||
REFUSED = "Refused" | ||
RUNNING = "Running" | ||
SUSPENDED = "Suspended" | ||
TERMINATED_ON_ERROR = "Terminated on error" | ||
TERMINATED_ON_WARNING = "Terminated on warning" | ||
|
||
|
||
FAILED_JOB_STATUSES: list[str] = [ | ||
JobStatus.CANCELED, | ||
JobStatus.DENIED, | ||
JobStatus.INVALID_LICENSE, | ||
JobStatus.REFUSED, | ||
JobStatus.TERMINATED_ON_ERROR, | ||
JobStatus.TERMINATED_ON_WARNING, | ||
] | ||
ONGOING_JOB_STATUSES: list[str] = [ | ||
JobStatus.CREATION_IN_PROGRESS, | ||
JobStatus.IN_QUEUE, | ||
JobStatus.ON_VALIDATION, | ||
JobStatus.RUNNING, | ||
] |
264 changes: 18 additions & 246 deletions
264
cg/meta/archive/ddn_dataflow.py → cg/meta/archive/ddn/ddn_data_flow_client.py
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.