This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git


The following commit(s) were added to refs/heads/master by this push:
     new 78f035eb8 [CI] Add `pre-commit` hook `name-tests-test` for Python test 
files (#1646)
78f035eb8 is described below

commit 78f035eb8ce3ecd7e3c335b536cdce2d5909a78d
Author: John Bampton <[email protected]>
AuthorDate: Sat Oct 26 03:01:34 2024 +1000

    [CI] Add `pre-commit` hook `name-tests-test` for Python test files (#1646)
    
    
https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#name-tests-test
    
    --pytest-test-first: ensure tests match test_.*\.py
    
    https://pre-commit.com/#regular-expressions
    
    Co-authored-by: Jia Yu <[email protected]>
---
 .pre-commit-config.yaml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index df652e118..a004ae230 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -78,6 +78,18 @@ repos:
       - id: forbid-submodules
       - id: mixed-line-ending
         exclude: \.csv$
+      - id: name-tests-test
+        args: [--pytest-test-first]
+        exclude: |
+          (?x)^(
+              python/tests/properties/crs_transform\.py|
+              python/tests/properties/linestring_properties\.py|
+              python/tests/properties/point_properties\.py|
+              python/tests/properties/polygon_properties\.py|
+              python/tests/sql/resource/sample_data\.py|
+              python/tests/streaming/spark/cases_builder\.py|
+              python/tests/tools\.py
+          )$
       - id: requirements-txt-fixer
         files: ^docker/sedona-spark-jupyterlab/requirements\.txt$
       - id: trailing-whitespace

Reply via email to