diff --git a/DEVELOPERS.md b/DEVELOPERS.md index 6ff577f..e56f691 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -39,7 +39,6 @@ export TEST_ARCHIVIST="https://app.datatrails.ai" export TEST_AUTHTOKEN_FILENAME=credentials/.auth_token export TEST_NAMESPACE="unique label" export TEST_VERBOSE=-v -export TEST_PROOF_MECHANISM="-i SIMPLE_HASH" ``` If TEST_VERBOSE is "-v" debugging output will appear when running the tests. diff --git a/README.md b/README.md index cbe5dad..240791b 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,10 @@ export TEST_ARCHIVIST="https://app.datatrails.ai" export TEST_AUTHTOKEN_FILENAME=credentials/.auth_token export TEST_NAMESPACE="unique label" export TEST_VERBOSE=-v -export TEST_PROOF_MECHANISM="--proof-mechanism=SIMPLE_HASH" ``` If TEST_VERBOSE is "-v" debugging output will appear when running the examples. Otherwise leave blank or undefined. -TEST_PROOF_MECHANISM should be "KHIPU" or "SIMPLE_HASH". If unspecified the default is "SIMPLE_HASH" - Windows using Powershell - at the command prompt set values for environment variables: ```bash @@ -48,7 +45,6 @@ $Env:TEST_ARCHIVIST="https://app.datatrails.ai" $Env:TEST_AUTHTOKEN_FILENAME = '' $Env:TEST_NAMESPACE = Get-Date -UFormat %s $Env:TEST_VERBOSE = '-v' -$Env:TEST_PROOF_MECHANISM="--proof-mechanism=SIMPLE_HASH" ``` TEST_NAMESPACE is set to the date and time value in Unix format, thus providing a unique id upon execution. @@ -73,7 +69,7 @@ Events are created every execution of an example - currently no check is done if All examples use a common set of arguments: ```bash -export AUTH="-u $TEST_ARCHIVIST -t $TEST_AUTHTOKEN_FILENAME $TEST_VERBOSE $TEST_PROOF_MECHANISM" +export AUTH="-u $TEST_ARCHIVIST -t $TEST_AUTHTOKEN_FILENAME $TEST_VERBOSE" export ARGS="$AUTH --namespace $TEST_NAMESPACE" ``` diff --git a/archivist_samples/sample_scripts/c2pa/c2pa_verify.py b/archivist_samples/sample_scripts/c2pa/c2pa_verify.py index 02a42ea..67706b1 100644 --- a/archivist_samples/sample_scripts/c2pa/c2pa_verify.py +++ b/archivist_samples/sample_scripts/c2pa/c2pa_verify.py @@ -15,7 +15,6 @@ from archivist.logger import set_logger from archivist.archivist import Archivist -from archivist.proof_mechanism import ProofMechanism from archivist.utils import get_auth import time diff --git a/archivist_samples/testing/archivist_parser.py b/archivist_samples/testing/archivist_parser.py index 29b4acb..868db48 100644 --- a/archivist_samples/testing/archivist_parser.py +++ b/archivist_samples/testing/archivist_parser.py @@ -15,7 +15,6 @@ from archivist.archivist import Archivist from archivist.logger import set_logger -from archivist.proof_mechanism import ProofMechanism LOGGER = logging.getLogger(__name__) @@ -72,16 +71,6 @@ def common_parser(description): default="https://app.datatrails.ai", help="url of Archivist service", ) - parser.add_argument( - "-p", - "--proof-mechanism", - type=ProofMechanism, - action=EnumAction, - dest="proof_mechanism", - default=ProofMechanism.SIMPLE_HASH, - help="mechanism for proving the evidence for events on the Asset", - ) - parser.add_argument( "-t", "--auth-token", @@ -104,17 +93,12 @@ def endpoint(args): arch = None LOGGER.info("Initialising connection to DataTrails...") - fixtures = { - "assets": { - "proof_mechanism": args.proof_mechanism.name, - }, - } if args.auth_token_file: with open(args.auth_token_file, mode="r", encoding="utf-8") as tokenfile: authtoken = tokenfile.read().strip() - arch = Archivist(args.url, authtoken, fixtures=fixtures) + arch = Archivist(args.url, authtoken) if arch is None: LOGGER.error("Critical error. Aborting.") diff --git a/requirements.txt b/requirements.txt index 9cbd1c7..027435f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,4 @@ pyyaml~=6.0.1 # the following lines. Also do similar in the Dockerfile. # That way one can test an unreleased version of github datatrails-samples. # NB dont forget to uncomment before merging !! -datatrails-archivist==0.30.0 +datatrails-archivist==0.31.0 diff --git a/scripts/api.sh b/scripts/api.sh index 168c76e..34fa9f1 100755 --- a/scripts/api.sh +++ b/scripts/api.sh @@ -17,7 +17,6 @@ docker run \ -e TEST_NAMESPACE \ -e TEST_SELECTOR \ -e TEST_VERBOSE \ - -e TEST_PROOF_MECHANISM \ -e GITHUB_REF \ -e TWINE_USERNAME \ -e TWINE_PASSWORD \ diff --git a/scripts/samples.sh b/scripts/samples.sh index 5f7873f..285d784 100755 --- a/scripts/samples.sh +++ b/scripts/samples.sh @@ -83,7 +83,7 @@ do done export PYTHONWARNINGS="ignore:Unverified HTTPS request" -ARGS="-u $TEST_ARCHIVIST -t $TEST_AUTHTOKEN_FILENAME $TEST_VERBOSE $TEST_PROOF_MECHANISM" +ARGS="-u $TEST_ARCHIVIST -t $TEST_AUTHTOKEN_FILENAME $TEST_VERBOSE" # namespacing ensures that each run of the tests is independent. if [ -n "$TEST_NAMESPACE" ]