File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ export TEST_ARCHIVIST="https://app.datatrails.ai"
3939export TEST_AUTHTOKEN_FILENAME=credentials/.auth_token
4040export TEST_NAMESPACE=" unique label"
4141export TEST_VERBOSE=-v
42- export TEST_PROOF_MECHANISM=" -i SIMPLE_HASH"
4342```
4443
4544If TEST_VERBOSE is "-v" debugging output will appear when running the tests.
Original file line number Diff line number Diff line change @@ -34,21 +34,17 @@ export TEST_ARCHIVIST="https://app.datatrails.ai"
3434export TEST_AUTHTOKEN_FILENAME=credentials/.auth_token
3535export TEST_NAMESPACE=" unique label"
3636export TEST_VERBOSE=-v
37- export TEST_PROOF_MECHANISM=" --proof-mechanism=SIMPLE_HASH"
3837```
3938
4039If TEST_VERBOSE is "-v" debugging output will appear when running the examples. Otherwise leave blank or undefined.
4140
42- TEST_PROOF_MECHANISM should be "KHIPU" or "SIMPLE_HASH". If unspecified the default is "SIMPLE_HASH"
43-
4441Windows using Powershell - at the command prompt set values for environment variables:
4542
4643``` bash
4744$Env :TEST_ARCHIVIST=" https://app.datatrails.ai"
4845$Env :TEST_AUTHTOKEN_FILENAME = ' <path of token location>'
4946$Env :TEST_NAMESPACE = Get-Date -UFormat %s
5047$Env :TEST_VERBOSE = ' -v'
51- $Env :TEST_PROOF_MECHANISM=" --proof-mechanism=SIMPLE_HASH"
5248```
5349
5450TEST_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
7369All examples use a common set of arguments:
7470
7571``` bash
76- export AUTH=" -u $TEST_ARCHIVIST -t $TEST_AUTHTOKEN_FILENAME $TEST_VERBOSE $TEST_PROOF_MECHANISM "
72+ export AUTH=" -u $TEST_ARCHIVIST -t $TEST_AUTHTOKEN_FILENAME $TEST_VERBOSE "
7773export ARGS=" $AUTH --namespace $TEST_NAMESPACE "
7874```
7975
Original file line number Diff line number Diff line change 1515
1616from archivist .logger import set_logger
1717from archivist .archivist import Archivist
18- from archivist .proof_mechanism import ProofMechanism
1918from archivist .utils import get_auth
2019
2120import time
Original file line number Diff line number Diff line change 1515
1616from archivist .archivist import Archivist
1717from archivist .logger import set_logger
18- from archivist .proof_mechanism import ProofMechanism
1918
2019LOGGER = logging .getLogger (__name__ )
2120
@@ -72,16 +71,6 @@ def common_parser(description):
7271 default = "https://app.datatrails.ai" ,
7372 help = "url of Archivist service" ,
7473 )
75- parser .add_argument (
76- "-p" ,
77- "--proof-mechanism" ,
78- type = ProofMechanism ,
79- action = EnumAction ,
80- dest = "proof_mechanism" ,
81- default = ProofMechanism .SIMPLE_HASH ,
82- help = "mechanism for proving the evidence for events on the Asset" ,
83- )
84-
8574 parser .add_argument (
8675 "-t" ,
8776 "--auth-token" ,
@@ -104,17 +93,12 @@ def endpoint(args):
10493
10594 arch = None
10695 LOGGER .info ("Initialising connection to DataTrails..." )
107- fixtures = {
108- "assets" : {
109- "proof_mechanism" : args .proof_mechanism .name ,
110- },
111- }
11296
11397 if args .auth_token_file :
11498 with open (args .auth_token_file , mode = "r" , encoding = "utf-8" ) as tokenfile :
11599 authtoken = tokenfile .read ().strip ()
116100
117- arch = Archivist (args .url , authtoken , fixtures = fixtures )
101+ arch = Archivist (args .url , authtoken )
118102
119103 if arch is None :
120104 LOGGER .error ("Critical error. Aborting." )
Original file line number Diff line number Diff line change @@ -7,4 +7,4 @@ pyyaml~=6.0.1
77# the following lines. Also do similar in the Dockerfile.
88# That way one can test an unreleased version of github datatrails-samples.
99# NB dont forget to uncomment before merging !!
10- datatrails-archivist == 0.30 .0
10+ datatrails-archivist == 0.31 .0
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ docker run \
1717 -e TEST_NAMESPACE \
1818 -e TEST_SELECTOR \
1919 -e TEST_VERBOSE \
20- -e TEST_PROOF_MECHANISM \
2120 -e GITHUB_REF \
2221 -e TWINE_USERNAME \
2322 -e TWINE_PASSWORD \
Original file line number Diff line number Diff line change 8383done
8484
8585export PYTHONWARNINGS=" ignore:Unverified HTTPS request"
86- ARGS=" -u $TEST_ARCHIVIST -t $TEST_AUTHTOKEN_FILENAME $TEST_VERBOSE $TEST_PROOF_MECHANISM "
86+ ARGS=" -u $TEST_ARCHIVIST -t $TEST_AUTHTOKEN_FILENAME $TEST_VERBOSE "
8787
8888# namespacing ensures that each run of the tests is independent.
8989if [ -n " $TEST_NAMESPACE " ]
You can’t perform that action at this time.
0 commit comments