Skip to content

Commit

Permalink
chore: cruft update
Browse files Browse the repository at this point in the history
  • Loading branch information
tekumara committed Jul 17, 2024
1 parent 713d93d commit 72b791b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "[email protected]:tekumara/python-typed-template.git",
"commit": "ca7eab6f521b6b27582ddbbae3fede882c7304a4",
"commit": "0f4759d4049e0ec77f9b351e39197cc01e0cb770",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
default_stages: [push]
repos:
- repo: https://github.com/crate-ci/typos
rev: v1.19.0
rev: v1.23.2
hooks:
- id: typos
# formatters and linters are available in the virtualenv so they can be run from the makefile & vscode
Expand Down
12 changes: 8 additions & 4 deletions Makefile-common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ help:
@awk '/^##.*$$/,/^[~\/\.0-9a-zA-Z_-]+:/' $(MAKEFILE_LIST) | awk '!(NR%2){print $$0p}{p=$$0}' | awk 'BEGIN {FS = ":.*?##"}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' | sort

venv ?= .venv
pip := $(venv)/bin/pip
# this is a symlink so we set the --check-symlink-times makeflag above
python := $(venv)/bin/python
# use uv if present, else fall back to pip
pip = $(shell command -v uv >/dev/null && echo "uv pip" || echo "$(venv)/bin/pip")

$(pip): $(if $(value CI),|,) .python-version
$(python): $(if $(value CI),|,) .python-version
# create venv using system python even when another venv is active
PATH=$${PATH#$${VIRTUAL_ENV}/bin:} python3 -m venv --clear $(venv)
$(venv)/bin/python --version
$(python) --version
$(pip) install --upgrade pip~=24.0

$(venv): $(if $(value CI),|,) pyproject.toml $(pip)
$(venv): $(if $(value CI),|,) pyproject.toml $(python)
$(pip) install -e '.[dev$(if $(value CI),,,notebook)]'
touch $(venv)

Expand Down Expand Up @@ -49,6 +52,7 @@ test: $(venv)

## build python distribution
dist: $(venv)
# start with a clean slate (see setuptools/#2347)
rm -rf dist *.egg-info
$(venv)/bin/python -m build --sdist --wheel

Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dev = [
"snowflake-connector-python[pandas, secure-local-storage]",
"pre-commit~=3.4",
"pytest~=8.0",
"ruff~=0.4.2",
"ruff~=0.5.1",
"twine~=5.0",
"snowflake-sqlalchemy~=1.5.0",
]
Expand All @@ -51,7 +51,9 @@ strictListInference = true
strictDictionaryInference = true
strictParameterNoneValue = true
reportTypedDictNotRequiredAccess = false
reportIncompatibleVariableOverride = true
reportIncompatibleMethodOverride = true
reportMatchNotExhaustive = true
reportUnnecessaryTypeIgnoreComment = true

[tool.ruff]
Expand Down

0 comments on commit 72b791b

Please sign in to comment.