Skip to content

Commit

Permalink
Bug-fix: Pass verbosity through to testing harness (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzaffi committed Aug 23, 2022
1 parent ca75305 commit 9f49624
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,37 @@ Run `$ pip3 install py-algorand-sdk` to install the package.
Alternatively, choose a [distribution file](https://pypi.org/project/py-algorand-sdk/#files), and run `$ pip3 install [file name]`.

## Supported Python versions

py-algorand-sdk's minimum Python version policy attempts to balance several constraints.

* Make it easy for the community to use py-algorand-sdk by minimizing or excluding the need to customize Python installations.
* Provide maintainers with access to newer language features that produce more robust software.

Given these constraints, the minimum Python version policy is:
Target Python version on newest [Ubuntu LTS](https://wiki.ubuntu.com/Releases) released >= 6 months ago.

The rationale is:

* If a major Linux OS distribution bumps a Python version, then it's sufficiently available to the community for us to upgrade.
* The 6 month time buffer ensures we delay upgrades until the community starts using a recently released LTS version.

## SDK Development

Install dependencies

- `pip3 install -r requirements.txt`
* `pip3 install -r requirements.txt`

Run tests

- `make docker-test`
* `make harness`

Set up the Algorand Sandbox based test-harness without running the tests

* `make docker-test`

Format code:

- `black .`
* `black .`

## Quick start

Expand All @@ -61,6 +68,7 @@ else:
## Node setup

Follow the instructions in Algorand's [developer resources](https://developer.algorand.org/docs/run-a-node/setup/install/) to install a node on your computer.
You can also set up a local [Algorand Sandbox](https://github.com/algorand/sandbox) with `make harness`.

## Running examples/example.py

Expand Down
11 changes: 10 additions & 1 deletion test-harness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ set +a
rootdir=$(dirname "$0")
pushd "$rootdir"

echo "$THIS: VERBOSE_HARNESS=$VERBOSE_HARNESS"

## Reset test harness
if [ -d "$SDK_TESTING_HARNESS" ]; then
pushd "$SDK_TESTING_HARNESS"
Expand All @@ -28,11 +30,14 @@ fi
git clone --depth 1 --single-branch --branch "$SDK_TESTING_BRANCH" "$SDK_TESTING_URL" "$SDK_TESTING_HARNESS"


echo "$THIS: OVERWRITE_TESTING_ENVIRONMENT=$OVERWRITE_TESTING_ENVIRONMENT"
if [[ $OVERWRITE_TESTING_ENVIRONMENT == 1 ]]; then
echo "$THIS: OVERWRITE replaced $SDK_TESTING_HARNESS/.env with $ENV_FILE:"
cp "$ENV_FILE" "$SDK_TESTING_HARNESS"/.env
fi


echo "$THIS: REMOVE_LOCAL_FEATURES=$REMOVE_LOCAL_FEATURES"
## Copy feature files into the project resources
if [[ $REMOVE_LOCAL_FEATURES == 1 ]]; then
echo "$THIS: OVERWRITE wipes clean $TEST_DIR/features"
Expand All @@ -50,7 +55,11 @@ echo "$THIS: seconds it took to get to end of cloning and copying: $(($(date "+%

## Start test harness environment
pushd "$SDK_TESTING_HARNESS"
./scripts/up.sh

[[ "$VERBOSE_HARNESS" = 1 ]] && V_FLAG="-v" || V_FLAG=""
echo "$THIS: standing up harnness with command [./up.sh $V_FLAG]"
./scripts/up.sh "$V_FLAG"

popd
echo "$THIS: seconds it took to finish testing sdk's up.sh: $(($(date "+%s") - START))s"
echo ""
Expand Down

0 comments on commit 9f49624

Please sign in to comment.