-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
695 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/bin/bash | ||
|
||
# https://stackoverflow.com/questions/2683279/how-to-detect-if-a-script-is-being-sourced | ||
sourced=0 | ||
if [ -n "$ZSH_VERSION" ]; then | ||
case $ZSH_EVAL_CONTEXT in *:file) sourced=1;; esac | ||
elif [ -n "$KSH_VERSION" ]; then | ||
# shellcheck disable=SC2296 | ||
[ "$(cd -- "$(dirname -- "$0")" && pwd -P)/$(basename -- "$0")" != "$(cd -- "$(dirname -- "${.sh.file}")" && pwd -P)/$(basename -- "${.sh.file}")" ] && sourced=1 | ||
elif [ -n "$BASH_VERSION" ]; then | ||
(return 0 2>/dev/null) && sourced=1 | ||
else | ||
# All other shells: examine $0 for known shell binary filenames. | ||
# Detects `sh` and `dash`; add additional shell filenames as needed. | ||
case ${0##*/} in sh|-sh|dash|-dash) | ||
if [ -z "$PROJECT_ROOT" ]; then | ||
echo "POSIX environments need PROJECT_ROOT in the environment for 'source run.sh activate' to work" | ||
echo "This must be set to the root of this repository" | ||
return 1 | ||
fi | ||
;; | ||
esac | ||
fi | ||
|
||
# Bash does not make it easy to find where this file is | ||
# Here I'm making it so it doesn't matter what directory you are in | ||
# when you execute this script. And it doesn't matter whether you're | ||
# executing a symlink to this script | ||
# Note the `-h` in the while loop asks if this path is a symlink | ||
pushd . >'/dev/null' | ||
DIRECTORY_BEFORE="$(pwd)" | ||
SCRIPT_PATH="${BASH_SOURCE[0]:-$0}" | ||
|
||
find_here() { | ||
while [ -h "$SCRIPT_PATH" ]; do | ||
cd "$(dirname -- "$SCRIPT_PATH")" || return 1 | ||
SCRIPT_PATH="$(readlink -f -- "$SCRIPT_PATH")" | ||
done | ||
cd "$(dirname -- "$SCRIPT_PATH")" >'/dev/null' || return 1 | ||
} | ||
|
||
if ! find_here; then | ||
if [ "$sourced" = "1" ]; then | ||
return 1 | ||
else | ||
exit 1 | ||
fi | ||
fi | ||
|
||
PROJECT_ROOT=$(pwd) | ||
export PROJECT_ROOT | ||
|
||
if ! ./tools/uv sync --locked -q; then | ||
if [ "$sourced" = "1" ]; then | ||
return 1 | ||
else | ||
exit 1 | ||
fi | ||
fi | ||
|
||
if [ -f ./tools/requirements.local.txt ]; then | ||
if ! ./tools/uv pip install -q -r ./tools/requirements.local.txt; then | ||
if [ "$sourced" = "1" ]; then | ||
return 1 | ||
else | ||
exit 1 | ||
fi | ||
fi | ||
fi | ||
|
||
if [ "$sourced" = "1" ]; then | ||
# shellcheck source=/dev/null | ||
source .venv/bin/activate | ||
cd "$DIRECTORY_BEFORE" || return 1 | ||
else | ||
exec uv run ./tools/run.py "$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Helper for searching code base without searching through external code | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
( | ||
cd $DIR | ||
exec ack "$@" \ | ||
--ignore-directory .tox \ | ||
--ignore-directory .mypy_cache \ | ||
--ignore-directory dist \ | ||
--ignore-directory build \ | ||
--ignore-directory tools \ | ||
) | ||
cd "$(git rev-parse --show-toplevel)" | ||
|
||
exec ack "$@" \ | ||
--ignore-directory .tox \ | ||
--ignore-directory .mypy_cache \ | ||
--ignore-directory .dmypy.json \ | ||
--ignore-directory dist \ | ||
--ignore-directory build \ | ||
--ignore-directory "*.egg-info" \ | ||
--ignore-directory tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ set -e | |
|
||
cd "$(git rev-parse --show-toplevel)" | ||
|
||
./tools/venv format "$@" | ||
exec ./dev format "$@" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VERSION = "0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "alt-pytest-asyncio-test-driver" | ||
dynamic = ["version"] | ||
license = { text = "MIT" } | ||
authors = [ | ||
{ name = "Stephen Moore", email = "stephen@delfick.com" }, | ||
] | ||
dependencies = [ | ||
"nest-asyncio==1.6.0", | ||
"noseOfYeti[black]==2.4.9", | ||
"pytest==8.2.1", | ||
"pytest-order==1.2.1" | ||
] | ||
|
||
[tool.hatch.metadata] | ||
allow-direct-references = true | ||
|
||
[tool.hatch.version] | ||
path = "alt_pytest_asyncio_test_driver/version.py" | ||
|
||
[tool.hatch.build.targets.wheel] | ||
include = [ | ||
"/alt_pytest_asyncio_test_driver", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ set -e | |
|
||
cd "$(git rev-parse --show-toplevel)" | ||
|
||
exec ./tools/venv lint "$@" | ||
exec ./dev lint "$@" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.