mirror of
https://github.com/Cian-H/read_aconity_layers.git
synced 2026-06-23 01:55:43 +01:00
ada32e43a9
* WIP: Fixed non-deterministic test error * Updated tooling to use uv/ty instead of poetry/mypy * Updated python/rust/maturin versions * Added mac os to testing pipelines * Properly enforced fixed with csv reading * Minor tweaks for maintainability * Minor version bump * track npz files with git-lfs * fix: add macos dynamic lookup linker flags for pyo3
57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
default_language_version:
|
|
python: python3.13
|
|
|
|
repos:
|
|
- repo: https://github.com/doublify/pre-commit-rust
|
|
rev: v1.0
|
|
hooks:
|
|
- id: fmt
|
|
- id: cargo-check
|
|
|
|
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
rev: 0.11.22
|
|
hooks:
|
|
- id: uv-lock
|
|
- id: uv-export
|
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.15.18
|
|
hooks:
|
|
- id: ruff-check
|
|
exclude: docs/
|
|
- id: ruff-format
|
|
|
|
- repo: https://github.com/astral-sh/ty-pre-commit
|
|
rev: v0.0.51
|
|
hooks:
|
|
- id: ty
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: build-readme
|
|
name: build-readme
|
|
entry: |
|
|
bash -c 'cat docs/readme_top.rst docs/readme_bottom.rst > README.rst'
|
|
language: system
|
|
files: "docs/readme*.rst"
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: version-bump-check
|
|
name: version-bump-check
|
|
entry: |
|
|
bash -c '
|
|
current_version=$(grep "^version = " Cargo.toml | sed "s/version = \"\(.*\)\"/\1/");
|
|
git fetch origin main 2>/dev/null || true;
|
|
remote_version=$(git show origin/main:Cargo.toml 2>/dev/null | grep "^version = " | sed "s/version = \"\(.*\)\"/\1/" || echo "0.0.0");
|
|
if [ "$current_version" = "$remote_version" ]; then
|
|
echo "❌ Version must be bumped before push! Run: cargo bump patch|minor|major";
|
|
echo "Local: $current_version, Remote: $remote_version";
|
|
exit 1;
|
|
fi;
|
|
echo "✅ Version bumped: $remote_version -> $current_version"
|
|
'
|
|
language: system
|
|
files: 'Cargo\.toml$'
|
|
stages: [pre-push]
|