diff --git a/packages/cdk/npm-shrinkwrap.json b/packages/cdk/npm-shrinkwrap.json index a20b7ccc..c6342d8b 100644 --- a/packages/cdk/npm-shrinkwrap.json +++ b/packages/cdk/npm-shrinkwrap.json @@ -1265,36 +1265,29 @@ }, "dependencies": { "@balena/dockerignore": { - "version": "1.0.2", - "resolved": "" + "version": "1.0.2" }, "at-least-node": { - "version": "1.0.0", - "resolved": "" + "version": "1.0.0" }, "balanced-match": { - "version": "1.0.2", - "resolved": "" + "version": "1.0.2" }, "brace-expansion": { "version": "1.1.11", - "resolved": "", "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "case": { - "version": "1.6.3", - "resolved": "" + "version": "1.6.3" }, "concat-map": { - "version": "0.0.1", - "resolved": "" + "version": "0.0.1" }, "fs-extra": { "version": "9.1.0", - "resolved": "", "requires": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -1303,61 +1296,50 @@ } }, "graceful-fs": { - "version": "4.2.10", - "resolved": "" + "version": "4.2.10" }, "ignore": { - "version": "5.2.0", - "resolved": "" + "version": "5.2.0" }, "jsonfile": { "version": "6.1.0", - "resolved": "", "requires": { "graceful-fs": "^4.1.6", "universalify": "^2.0.0" } }, "jsonschema": { - "version": "1.4.1", - "resolved": "" + "version": "1.4.1" }, "lru-cache": { "version": "6.0.0", - "resolved": "", "requires": { "yallist": "^4.0.0" } }, "minimatch": { "version": "3.1.2", - "resolved": "", "requires": { "brace-expansion": "^1.1.7" } }, "punycode": { - "version": "2.1.1", - "resolved": "" + "version": "2.1.1" }, "semver": { "version": "7.3.8", - "resolved": "", "requires": { "lru-cache": "^6.0.0" } }, "universalify": { - "version": "2.0.0", - "resolved": "" + "version": "2.0.0" }, "yallist": { - "version": "4.0.0", - "resolved": "" + "version": "4.0.0" }, "yaml": { - "version": "1.10.2", - "resolved": "" + "version": "1.10.2" } } }, diff --git a/packages/cli/Makefile b/packages/cli/Makefile index 89665240..9eeb70a7 100644 --- a/packages/cli/Makefile +++ b/packages/cli/Makefile @@ -4,7 +4,8 @@ VERSION_FILE=../../version.json GOBIN=${PWD}/bin/tools COVERAGE=coverage.out -DESTINATION=./bin/local/${BINARY_NAME} +PREFIX=${PWD}/../.. +DESTINATION=${PREFIX}/bin/local/${BINARY_NAME} VERSION=$(shell jq .version -r < ${VERSION_FILE}) LINKER_FLAGS=-X github.com/aws/amazon-genomics-cli/internal/pkg/version.Version=${VERSION} diff --git a/packages/wes_adapter/amazon_genomics/wes/adapters/CromwellWESAdapter.py b/packages/wes_adapter/amazon_genomics/wes/adapters/CromwellWESAdapter.py index 8a787430..bde3dd24 100644 --- a/packages/wes_adapter/amazon_genomics/wes/adapters/CromwellWESAdapter.py +++ b/packages/wes_adapter/amazon_genomics/wes/adapters/CromwellWESAdapter.py @@ -215,7 +215,6 @@ def run_workflow( # this is needed for any file downloads # once complete the temp dir will be removed and all open files will be closed with tempfile.TemporaryDirectory() as tmpdir: - self.logger.debug(f"RUN_WORKFLOW :: tmpdir={tmpdir}") data = { @@ -418,7 +417,6 @@ def _translate_from_response_to_state_(self, response): return self._get_workflow_state_(status, status_code) def _get_workflow_state_(self, status, status_code=None): - self.logger.info("_get_workflow_state_(%s, %s)" % (status, status_code)) if (status_code is not None) and (status_code != 200): if (status_code >= 400) and (status_code <= 403): diff --git a/packages/wes_adapter/install.sh b/packages/wes_adapter/install.sh index 22b4c7dd..ad204525 100755 --- a/packages/wes_adapter/install.sh +++ b/packages/wes_adapter/install.sh @@ -1,10 +1,11 @@ #! /bin/bash -if ! hash python3.9; then - echo "python3.9 is not installed" + +if ! hash python3; then + echo "python3 is not installed" exit 1 fi rm -rf ./dist && mkdir ./dist -python3.9 -m pip install -r requirements.txt --target ./dist && (cd ./dist && zip -r ./wes_adapter.zip .) +python3 -m pip install -r requirements.txt --target ./dist && (cd ./dist && zip -r ./wes_adapter.zip .) zip -gr ./dist/wes_adapter.zip ./rest_api ./amazon_genomics ./index.py diff --git a/packages/wes_adapter/rest_api/controllers/workflow_execution_service_controller.py b/packages/wes_adapter/rest_api/controllers/workflow_execution_service_controller.py index cc5a6abe..9a32ea59 100755 --- a/packages/wes_adapter/rest_api/controllers/workflow_execution_service_controller.py +++ b/packages/wes_adapter/rest_api/controllers/workflow_execution_service_controller.py @@ -157,7 +157,6 @@ def run_workflow( } for arg in args: - if arg in ("workflow_attachment"): # file lists args[arg] = request.files.getlist(arg) diff --git a/scripts/cli/install.sh b/scripts/cli/install.sh index ae94fbaa..0732837d 100755 --- a/scripts/cli/install.sh +++ b/scripts/cli/install.sh @@ -7,6 +7,7 @@ BASE_DIR="$HOME/.agc" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" selectArch () { + echo "Selecting arch: $(arch)" if [[ $(arch) == "arm64" ]]; then eval "$1"="arm64" else @@ -17,6 +18,7 @@ selectArch () { } selectCliFile () { + echo "Selecting cli File" selectArch archKind local fileName="agc" @@ -37,28 +39,33 @@ selectCliFile () { } install_cli () { + echo "Installing cli" selectCliFile cliFile if [[ -z "$cliFile" ]]; then + echo "$cliFile not found to install" exit 1 fi mkdir -p "$USER_BIN_DIR" - cp "$SCRIPT_DIR/$cliFile" "$USER_BIN_DIR/agc" + cp "$SCRIPT_DIR/../../packages/cli/bin/local/$cliFile" "$USER_BIN_DIR/agc" echo "Please modify your \$PATH variable to include \$HOME/bin directory" echo "This can be achieved by running: \"export PATH=\$HOME/bin:\$PATH\"" - echo "Please append the command above to shell profile to have agc available within every shell instance." + echo "Please append the command above to shell profile to have agc available within every shell instance." } install_cdk () { + echo "Installing CDK" mkdir -p "$BASE_DIR/cdk" - cp "$SCRIPT_DIR/cdk.tgz" "$BASE_DIR/cdk" + cp "$SCRIPT_DIR/../../packages/cdk/cdk.tgz" "$BASE_DIR/cdk" (cd "$BASE_DIR/cdk" && tar -xzf ./cdk.tgz --strip-components=1 && npm ci --silent) } install_wes () { + echo "Installing WES" mkdir -p "$BASE_DIR/wes" - cp "$SCRIPT_DIR/wes/wes_adapter.zip" "$BASE_DIR/wes" + cp "$SCRIPT_DIR/../../packages/wes_adapter/dist/wes_adapter.zip" "$BASE_DIR/wes" } +echo "Starting installation" install_cli && install_cdk && install_wes && echo "Installation complete. Once \$PATH variable has been adjusted, run 'agc --help' to get started!" diff --git a/scripts/cli/uninstall.sh b/scripts/cli/uninstall.sh index 4a262910..639c24ea 100755 --- a/scripts/cli/uninstall.sh +++ b/scripts/cli/uninstall.sh @@ -4,7 +4,7 @@ set -eo pipefail USER_BIN_DIR="$HOME/bin" BASE_DIR="$HOME/.agc" -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}/../../" )" &> /dev/null && pwd )" uninstall_cli () { rm -f $USER_BIN_DIR/agc diff --git a/scripts/run-dev.sh b/scripts/run-dev.sh index 35ea2f3d..d2ec9a71 100755 --- a/scripts/run-dev.sh +++ b/scripts/run-dev.sh @@ -27,6 +27,7 @@ run_agc_cli () { } build_wes_adapter() { + echo "Building WES Adapter" mkdir -p "$HOME/.agc/wes" (cd "${SCRIPT_DIR}"/../packages/wes_adapter && ./install.sh) mv "${SCRIPT_DIR}"/../packages/wes_adapter/dist/wes_adapter.zip $HOME/.agc/wes/