Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ github:
# Enable projects for project management boards
projects: false
# Enable GitHub discussion
discussions: false
discussions: false
2 changes: 1 addition & 1 deletion .github/workflows/build-py-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: spatialbench-cli/dist
path: spatialbench-cli/dist
2 changes: 1 addition & 1 deletion .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ jobs:
if: success() && github.repository == 'apache/sedona-spatialbench'
run: |
cd pages-clone
git push
git push
53 changes: 53 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: pre-commit

on: [pull_request]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
pre-commit:
name: Run pre-commit # https://pre-commit.com/
runs-on: ubuntu-latest
steps:
- name: 'Checkout ${{ github.ref }} ( ${{ github.sha }} )'
uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-python@v6 # https://www.python.org/
with:
python-version: '3.13' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Install dependencies # https://pip.pypa.io/en/stable/
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v5
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
run: pre-commit run --color=always --all-files
2 changes: 1 addition & 1 deletion .github/workflows/spatialbench-cli-publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing dist/*
args: --non-interactive --skip-existing dist/*
2 changes: 1 addition & 1 deletion .github/workflows/spatialbench-publish-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
working-directory: ${{ matrix.package }}
run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ __old/
Cargo.lock
.idea
.venv/
site/
site/
91 changes: 91 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

---
repos:
- repo: meta
hooks:
- id: identity
name: run identity check
description: check you have set your git identity
- id: check-hooks-apply
name: run check hooks apply
description: check that all the hooks apply to the repository
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-ast
name: run check-ast
description: check Python files for syntax errors
- id: check-builtin-literals
name: run check-builtin-literals
description: check Python files for proper use of built-in literals
- id: check-case-conflict
name: run check-case-conflict
description: check for case conflicts in file names
- id: check-docstring-first
name: run check-docstring-first
description: check that docstrings are at the start of functions
- id: check-executables-have-shebangs
name: run check-executables-have-shebangs
description: check that executable scripts have shebang lines
- id: check-illegal-windows-names
name: run check-illegal-windows-names
description: check for Windows-illegal file names
- id: check-json
name: run check-json
description: check JSON files for syntax errors
- id: check-merge-conflict
name: run check-merge-conflict
description: check for merge conflict markers
- id: check-shebang-scripts-are-executable
name: run check-shebang-scripts-are-executable
description: check that scripts with shebangs are executable
- id: check-toml
name: run check-toml
description: check TOML files for syntax errors
- id: check-vcs-permalinks
name: run check-vcs-permalinks
description: ensures that links to vcs websites are permalinks
- id: check-xml
name: run check-xml
description: attempts to load all xml files to verify syntax
- id: check-yaml
name: run check-yaml
description: attempts to load all yaml files to verify syntax
- id: debug-statements
name: run debug-statements
description: check for debugger imports and py37+ `breakpoint()` calls in python source.
- id: destroyed-symlinks
name: run destroyed-symlinks
description: detects symlinks which are changed to regular files with a content of a path which that symlink was pointing to
- id: detect-aws-credentials
name: run detect-aws-credentials
description: checks for the existence of AWS secrets that you have set up with the AWS CLI
args: [--allow-missing-credentials]
- id: detect-private-key
name: run detect-private-key
description: checks for the existence of private keys
- id: end-of-file-fixer
name: run end-of-file-fixer
description: makes sure files end in a newline and only a newline
- id: fix-byte-order-marker
name: run fix-byte-order-marker
description: removes UTF-8 byte order marker
- id: forbid-submodules
name: run forbid-submodules
description: forbids any submodules in the repository
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

# CONTRIBUTING.md

See the [contributors-guide.md](docs/contributors-guide.md)
See the [contributors-guide.md](docs/contributors-guide.md)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
Loading