Skip to content

Commit

Permalink
update bash options
Browse files Browse the repository at this point in the history
  • Loading branch information
gboeing committed Dec 12, 2024
1 parent bd18b26 commit 609722c
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

defaults:
run:
shell: bash -elo pipefail {0}
shell: bash -euo pipefail {0}

steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

defaults:
run:
shell: bash -elo pipefail {0}
shell: bash -euo pipefail {0}

steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-docs-linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

defaults:
run:
shell: bash -elo pipefail {0}
shell: bash -euo pipefail {0}

steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-latest-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

defaults:
run:
shell: bash -elo pipefail {0}
shell: bash -euo pipefail {0}

steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-minimum-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

defaults:
run:
shell: bash -elo pipefail {0}
shell: bash -euo pipefail {0}

steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion environments/docker/build-image.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -euo pipefail
echo "Run this script from the repository root."
docker login
docker buildx build --no-cache --pull --push --platform=linux/amd64,linux/arm64 -f ./environments/docker/Dockerfile -t gboeing/osmnx:test .
Expand Down
11 changes: 6 additions & 5 deletions environments/unix-create-env.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#!/bin/bash
set -e
set -euo pipefail
echo "Run conda deactivate before running this script."
ENV=ox
ENV_PATH=$(conda info --base)/envs/$ENV
PACKAGE=osmnx
eval "$(conda shell.bash hook)"
conda activate base
conda env remove -n $ENV --yes
mamba create -n $ENV --yes -c conda-forge --strict-channel-priority --file requirements.txt
eval "$(conda shell.bash hook)"
conda env remove --yes -n $ENV || true
conda update --yes -c conda-forge --strict-channel-priority -n base conda mamba
mamba create --yes -c conda-forge --strict-channel-priority -n $ENV --file requirements.txt
conda activate $ENV
python -m pip --python $ENV_PATH uninstall $PACKAGE --yes
python -m pip --python $ENV_PATH install -e ../.
python -m pip --python $ENV_PATH check
python -m ipykernel install --prefix $ENV_PATH --name $ENV --display-name "Python ($ENV)"
conda list -n $ENV
python -m pip --python $ENV_PATH check
jupyter kernelspec list
ipython -c "import $PACKAGE; print('$PACKAGE version', $PACKAGE.__version__)"
2 changes: 1 addition & 1 deletion tests/lint_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -euo pipefail

# delete temp files and folders
rm -r -f ./.coverage* ./.pytest_cache ./.temp ./dist ./docs/build ./*/__pycache__
Expand Down
2 changes: 1 addition & 1 deletion tests/prune.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# prune conda, docker, and git
set -e
set -euo pipefail
eval "$(conda shell.bash hook)"
conda activate base
conda clean --all --yes
Expand Down

0 comments on commit 609722c

Please sign in to comment.