Data Release Python Module

Data release policy for command line tools.

pacifica.policy.data_release.collate_objs_from_key(resp, objs, date_key)[source]

Deduplicate objs and make sure they have dates.

pacifica.policy.data_release.data_release(args)[source]

Data release main subcommand.

The logic is to query updated objects between now and args.time_ago. If the objects args.keyword is set to something calculate the suspense date as args.time_after the keyword date. Then save the object back to the metadata server.

The follow on task is to use orm_obj to calculate the released data based on the set suspense dates and add that released data to the transaction_release table.

pacifica.policy.data_release.relavent_data_release_objs(time_ago, orm_obj, exclude_list)[source]

Query projects or transactions that has gone past their suspense date.

pacifica.policy.data_release.relavent_suspense_date_objs(time_ago, orm_obj, date_key)[source]

generate a list of relavent orm_objs saving date_key.

pacifica.policy.data_release.update_data_release(objs)[source]

Add objs transactions to the released transactions table.

pacifica.policy.data_release.update_suspense_date_objs(objs, time_after, orm_obj)[source]

update the list of objs given date_key adding time_after.