Skip to content

Inconsistency between Orders' and Data's checksum parameters #862

@kevinlacaille

Description

@kevinlacaille

Orders client: validate_checksum takes in the filename and the type of checksum (MD5 or SHA256)
Data client: validate_checksum takes in the asset and the filename and performs an MD5 checksum

This inconsistency dampens the UX when asking the client or CLI to perform a checksum. For instance, for the Data CLI, when performing your checksum after downloading an asset, you do not need to choose between MD5 and SHA256, because it'll simply perform an MD5 checksum.

I suggest we either ask the Data client to perform both checksums or make the Orders API only perform the MD5 checksum.

Previous
Orders client:

def validate_checksum(directory: Path, checksum: str):
    ...

Data client:

def validate_checksum(asset: dict, filename: Path):
    ...

Suggested change
Orders client:

def validate_checksum(filename: Path, checksum: str):
    ...

Data client:

def validate_checksum(asset: dict, filename: Path, checksum: str):
    ...

OR

Orders client:

def validate_checksum(filename: Path):
    ...
def validate_checksum(asset: dict, filename: Path):
    ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions