starlinglab / integrity-backend

Backend server for registering and configurable processing of authenticated assets in the Starling Integrity framework.
MIT License
10 stars 3 forks source link

c2pa_proofmode action #94

Closed makew0rld closed 2 years ago

makew0rld commented 2 years ago

Fixes #93

benhylau commented 2 years ago

@YurkoWasHere @makeworld-the-better-one

From now on, get is for configs from JSON, and path_for is a path from asset_helper. All pathing logic should be encapsulated inside of asset_helper and explicitly described, in scope and function, in the func name. For example:

    collection = config.ORGANIZATION_CONFIG.get_collection(org_id, collection_id)
    action = config.ORGANIZATION_CONFIG.get_action(org_id, collection_id, action_name)
    action_params = action.get("params")
    action_dir = asset_helper.path_for_action(collection_id, action_name)
    action_output_dir = asset_helper.path_for_action_output(collection_id, action_name)
    action_tmp_dir = asset_helper.path_for_action_tmp(collection_id, action_name)

Where tmp is, output is, for example, is known only to asset_helper.

benhylau commented 2 years ago

Comments addressed here https://github.com/starlinglab/integrity-backend/pull/95/commits/770206e9adcf27f170ae7bf057498e9808f49d59

Thanks for the review!