Skip to content

Commit

Permalink
SNOW-1516075: update relase scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mraba committed Jul 2, 2024
1 parent 2fd03f2 commit c1c862e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,25 @@
# Build snowflake-sqlalchemy
set -o pipefail

PYTHON="python3.7"
PYTHON="python3.8"
THIS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SQLALCHEMY_DIR="$(dirname "${THIS_DIR}")"
DIST_DIR="${SQLALCHEMY_DIR}/dist"

cd "$SQLALCHEMY_DIR"
# Clean up previously built DIST_DIR
if [ -d "${DIST_DIR}" ]; then
echo "[WARN] ${DIST_DIR} already existing, deleting it..."
rm -rf "${DIST_DIR}"
echo "[WARN] ${DIST_DIR} already existing, deleting it..."
rm -rf "${DIST_DIR}"
fi

# Constants and setup

echo "[Info] Building snowflake-sqlalchemy with $PYTHON"
# Clean up possible build artifacts
rm -rf build generated_version.py
${PYTHON} -m pip install --upgrade pip setuptools wheel build
${PYTHON} -m build --outdir ${DIST_DIR} .
# ${PYTHON} -m pip install --upgrade pip setuptools wheel build
# ${PYTHON} -m build --outdir ${DIST_DIR} .
export UV_NO_CACHE=true
${PYTHON} -m pip install uv hatch
${PYTHON} -m hatch build
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ test-dialect-compatibility = "pytest -ra -vvv --tb=short --cov snowflake.sqlalch
gh-cache-sum = "python -VV | sha256sum | cut -d' ' -f1"
check-import = "python -c 'import snowflake.sqlalchemy; print(snowflake.sqlalchemy.__version__)'"

[[tool.hatch.envs.release.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
features = ["development", "pandas"]

[tool.hatch.envs.release.scripts]
test-dialect = "pytest -ra -vvv --tb=short --ignore=tests/sqlalchemy_test_suite tests/"
test-compatibility = "pytest -ra -vvv --tb=short tests/sqlalchemy_test_suite tests/"

[tool.ruff]
line-length = 88

Expand Down

0 comments on commit c1c862e

Please sign in to comment.