Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 12 additions & 30 deletions packages/cdk/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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):
Expand Down
7 changes: 4 additions & 3 deletions packages/wes_adapter/install.sh
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ def run_workflow(
}

for arg in args:

if arg in ("workflow_attachment"):
# file lists
args[arg] = request.files.getlist(arg)
Expand Down
15 changes: 11 additions & 4 deletions scripts/cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -17,6 +18,7 @@ selectArch () {
}

selectCliFile () {
echo "Selecting cli File"
selectArch archKind
local fileName="agc"

Expand All @@ -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!"
2 changes: 1 addition & 1 deletion scripts/cli/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions scripts/run-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down