chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:36:30 +08:00
commit 55ab4e4a73
473 changed files with 72932 additions and 0 deletions
@@ -0,0 +1,44 @@
# https://github.com/marketplace/actions/manylinux-wheel-builder
name: pypi deployer
on:
workflow_dispatch
# push
# push:
# tags:
# - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
Linux-build:
runs-on: ubuntu-22.04
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
steps:
- uses: actions/checkout@v2
- name: build and upload manylinux wheels
# cSpell:disable
uses: Niraj-Kamdar/manylinux-wheel-builder@master
# cSpell:enable
Matrix-build:
runs-on: ${{ matrix.os }}
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: build wheel
run: |
pip install wheel
python setup.py bdist_wheel
- name: upload wheel
run: |
pip install twine
twine upload dist/*
continue-on-error: true
@@ -0,0 +1,41 @@
name: Build and Publish to PyPI (macOS)
# on: push
# disabled on push cuz Error: Container action is only supported on Linux
# no solution found yet
on: workflow_dispatch
jobs:
build-n-publish:
# name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
name: Build and publish Python 🐍 distributions 📦 to PyPI
# runs-on: ubuntu-22.04
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to PyPI
# if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,50 @@
name: Build and Publish to PyPI (manylinux)
on: workflow_dispatch
jobs:
build-n-publish:
# name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
name: Build and publish Python 🐍 distributions 📦 to PyPI
# runs-on: ubuntu-22.04
runs-on: ubuntu-22.04
# strategy:
# matrix:
# python-version: ["3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install pypa/build
# run: >-
# python -m
# pip install
# build
# --user
# - name: Build a binary wheel and a source tarball
# run: >-
# python -m
# build
# --sdist
# --wheel
# --outdir dist/
# .
# cSpell:disable
- name: Build on manylinux
uses: RalfG/python-wheels-manylinux-build@v0.4.2-manylinux2014_x86_64
# cSpell:enable
with:
python-versions: "cp36-cp36m cp37-cp37m cp38-cp38m cp39-cp39m"
# build-requirements: "cython numpy"
# system-packages: "lrzip-devel zlib-devel"
# pre-build-command: "sh pre-build-script.sh"
# package-path: "my_project"
# pip-wheel-args: "-w ./dist --no-deps"
# pip-wheel-args: "--sdist --wheel --outdir dist/"
- name: Publish distribution 📦 to PyPI
# if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
+15
View File
@@ -0,0 +1,15 @@
name: "Run Teddy's benchmarking workflow"
on:
# push:
# pull_request:
workflow_dispatch:
jobs:
trigger:
permissions: write-all
name: "Trigger Teddy's benchmarking workflow"
uses: tddschn/easygraph-bench/.github/workflows/bench-all.yaml@master
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseTag: "CI-easygraph-bench"
+16
View File
@@ -0,0 +1,16 @@
name: Create diagram
on:
workflow_dispatch: {}
# push:
# branches:
# - master
jobs:
get_data:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Update diagram
uses: githubocto/repo-visualizer@main
with:
excluded_paths: "ignore,.github"
+50
View File
@@ -0,0 +1,50 @@
name: PR code review
on:
workflow_dispatch:
pull_request:
branches:
- pybind11
push:
branches:
- pybind11
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]
python-version: ["3.9", "3.12"]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Installing dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "requirements.txt"
- name: Add requirements
run: python -m pip install --upgrade setuptools wheel build packaging
- name: Build and install
run: pip install --verbose .
- name: Smoke test
run: python -c "import os, tempfile; os.chdir(tempfile.gettempdir()); import easygraph as eg; G = eg.Graph(); G.add_edge(1, 2); assert G.number_of_nodes() == 2; assert G.number_of_edges() == 1"
+38
View File
@@ -0,0 +1,38 @@
name: pre-commit
on:
workflow_dispatch:
pull_request:
branches:
- pybind11
push:
branches:
- pybind11
jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install pre-commit
run: python -m pip install pre-commit
- name: Run pre-commit on changed files
shell: bash
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
base_ref="${{ github.event.pull_request.base.sha }}"
elif [[ -n "${{ github.event.before }}" && ! "${{ github.event.before }}" =~ ^0+$ ]]; then
base_ref="${{ github.event.before }}"
else
base_ref="$(git rev-parse HEAD~1)"
fi
pre-commit run --show-diff-on-failure --color=always --from-ref "$base_ref" --to-ref "${{ github.sha }}"
+19
View File
@@ -0,0 +1,19 @@
name: "Close stale issues and PRs"
on:
schedule:
- cron: "30 1 * * *"
jobs:
stale:
runs-on: ubuntu-22.04
steps:
- uses: actions/stale@v4
with:
stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days."
stale-pr-message: "This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days."
close-issue-message: "This issue was closed because it has been stalled for 5 days with no activity."
close-pr-message: "This PR was closed because it has been stalled for 10 days with no activity."
days-before-issue-stale: 30
days-before-pr-stale: 45
days-before-issue-close: 5
days-before-pr-close: 10
+46
View File
@@ -0,0 +1,46 @@
name: Test the package with pytest
on:
workflow_dispatch:
pull_request:
branches:
- pybind11
push:
branches:
- pybind11
jobs:
pytest:
name: Test with pytest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
# ubuntu 22.04 has deprecated python 3.6
python-version: [ "3.8", "3.9", "3.10","3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Installing dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "requirements.txt"
- name: Installing test dependencies
run: |
pip install pytest
- name: Build and install package
run: |
pip install .
- name: Test with pytest
run: |
pytest easygraph --disable-warnings
+34
View File
@@ -0,0 +1,34 @@
#name: 'issue-translator'
#on:
# issue_comment:
# types: [created]
# issues:
# types: [opened]
#
#jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: usthe/issues-translate-action@v2.7
# with:
# IS_MODIFY_TITLE: false
# # not require, default false, . Decide whether to modify the issue title
# # if true, the robot account @Issues-translate-bot must have modification permissions, invite @Issues-translate-bot to your project or use your custom bot.
# CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿
# # not require. Customize the translation robot prefix message.
name: 'issue-translator'
on:
issue_comment:
types: [created]
issues:
types: [opened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: usthe/issues-translate-action@v2.7
with:
CUSTOM_BOT_NOTE: hello
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
+75
View File
@@ -0,0 +1,75 @@
name: Build,download and publish wheels
on: workflow_dispatch
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# sdist used to compile in user local environment
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is closing down, macos-15 is apple silicon
# macos-15-intel is for the x86_64
# note: Apple has discontinued support for the x86_64 (Intel) architecture
os: [ ubuntu-latest, windows-latest, macos-15, macos-15-intel]
# modify python version in project.toml
steps:
# 检出代码
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: python -m pip install --upgrade pip setuptools wheel build packaging
- name: Build wheels
uses: pypa/cibuildwheel@v2.23.3
with:
output-dir: dist/
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: dist/*.whl
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@v1.12.4
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true