From 220a9aba1188afb186f7a63f31002c71961bd683 Mon Sep 17 00:00:00 2001 From: Cuiys <42903451+Cuiyus@users.noreply.github.com> Date: Tue, 30 Dec 2025 15:39:05 +0800 Subject: [PATCH] chore:add git commit msg and branch name in pre-commit and modify org (#1) * chore: add git commit msg and branch name in pre-commit * docs: modify org to alibaba * ci: mac build with make --- .github/workflows/mac_arm64_ci.yml | 6 ++++++ .pre-commit-config.yaml | 32 ++++++++++++++++++++++++++++++ CONTRIBUTING.md | 2 +- README.md | 7 +++---- pyproject.toml | 6 +++--- tools/core/README.md | 2 +- 6 files changed, 46 insertions(+), 9 deletions(-) diff --git a/.github/workflows/mac_arm64_ci.yml b/.github/workflows/mac_arm64_ci.yml index 2b507cd..54bcd6b 100644 --- a/.github/workflows/mac_arm64_ci.yml +++ b/.github/workflows/mac_arm64_ci.yml @@ -69,6 +69,12 @@ jobs: run: | cd "$CLEAN_WORKSPACE" pip install --upgrade pip pytest pytest-cov ruff + + NPROC=$(nproc 2>/dev/null || echo $(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 2)) + echo "ParallelGroup: Using $NPROC parallel jobs for build" + + CMAKE_GENERATOR="Unix Makefiles" \ + CMAKE_BUILD_PARALLEL_LEVEL="$NPROC" \ pip install -v . shell: bash diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4b9beef..abe63c6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,3 +28,35 @@ repos: - id: gitleaks name: Detect hardcoded secrets (gitleaks) description: Scans staged files for secrets using gitleaks rules + + + - repo: https://github.com/compilerla/conventional-pre-commit + rev: v3.0.0 + hooks: + - id: conventional-pre-commit + stages: [ commit-msg ] + args: [ + --types, feat,fix,docs,style,refactor,test,chore,perf,ci,build,revert, + --scope-optional + ] + + + - repo: local + hooks: + - id: branch-name-check + name: Check branch name format + entry: >- + bash -c ' + branch=$(git symbolic-ref --short HEAD); + pattern="^(feat|fix|docs|refactor|test|chore)/[a-z0-9-]+$"; + if [[ $branch =~ $pattern ]]; then + exit 0; + else + echo "Invalid branch name: $branch"; + echo "Must match: /"; + echo "Examples: feat/user-api, fix/header-bug, chore/update-deps"; + exit 1; + fi + ' + language: system + stages: [ pre-push ] \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6a25890..3685f15 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -96,7 +96,7 @@ CMAKE_BUILD_TYPE=Debug CMAKE_GENERATOR="Unix Makefiles" pip install -v . ## Need Help -- Browse [existing issues](https://github.com/graphscope/zvec/issues) +- Browse [existing issues](https://github.com/alibaba/zvec/issues) - For sensitive/security issues: email `zvec@alibaba-inc.com` --- diff --git a/README.md b/README.md index fccd5a0..5cafa30 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,9 @@

- Code Coverage - Linux x64 CI - Latest Release - License + Linux x64 CI + Latest Release + License

# Zvec diff --git a/pyproject.toml b/pyproject.toml index 9f2ef57..85bb751 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,9 +39,9 @@ dependencies = [ ] [project.urls] -Homepage = "https://github.com/graphscope/zvec" -Repository = "https://github.com/graphscope/zvec" -"Bug Tracker" = "https://github.com/graphscope/zvec/issues" +Homepage = "https://github.com/alibaba/zvec" +Repository = "https://github.com/alibaba/zvec" +"Bug Tracker" = "https://github.com/alibaba/zvec/issues" "Documentation" = "https://zvec.org" [project.optional-dependencies] diff --git a/tools/core/README.md b/tools/core/README.md index 3815c5b..8a25d55 100644 --- a/tools/core/README.md +++ b/tools/core/README.md @@ -34,7 +34,7 @@ test.parquet ### Preparing Environment Clone code and init: ```bash -$ git clone git@github.com:GraphScope/zvec.git +$ git clone git@github.com:alibaba/zvec.git $ cd zvec $ git submodule update --init ```