Skip to content

feat(hop): add hop ranges and labeling #8190

feat(hop): add hop ranges and labeling

feat(hop): add hop ranges and labeling #8190

Workflow file for this run

name: CI Tests
on:
#NOTE: All jobs gated by auth job
#Regular dev
push:
pull_request:
#Enable UI-driven branch testing
workflow_dispatch:
#Test main bidaily @ 1a
schedule:
- cron: '0 1 1-31/2 * *'
jobs:
changes:
# Determine which files changed to run only relevant jobs
runs-on: ubuntu-latest
outputs:
python: ${{ steps.filter.outputs.python }}
docs: ${{ steps.filter.outputs.docs }}
infra: ${{ steps.filter.outputs.infra }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
# Infrastructure changes that affect all tests
infra:
- '.github/workflows/ci.yml'
- 'docker/**'
- 'bin/**'
- 'setup.py'
- 'setup.cfg'
- 'MANIFEST.in'
# Python code changes
python:
- '**.py'
- 'graphistry/**'
- 'setup.py'
- 'setup.cfg'
- 'pytest.ini'
- 'mypy.ini'
- 'bin/lint.sh'
- 'bin/typecheck.sh'
# Documentation changes
docs:
- 'docs/**'
- '**.md'
- '**.rst'
- 'demos/**'
- 'notebooks/**'
python-lint-types:
needs: changes
# Run if Python files changed OR infrastructure changed OR manual/scheduled run
if: ${{ needs.changes.outputs.python == 'true' || needs.changes.outputs.infra == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11, 3.12, '3.13', '3.14'] # Run lint/types on all versions
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
lfs: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m venv pygraphistry
source pygraphistry/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .[test]
- name: Lint
run: |
source pygraphistry/bin/activate
./bin/lint.sh
- name: Type check
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
source pygraphistry/bin/activate
./bin/typecheck.sh
test-minimal-python:
needs: [changes, python-lint-types]
# Run if Python files changed OR infrastructure changed OR manual/scheduled run
if: ${{ needs.changes.outputs.python == 'true' || needs.changes.outputs.infra == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
runs-on: ubuntu-latest
timeout-minutes: 6
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11, 3.12, '3.13', '3.14']
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
lfs: true
- name: Checkout LFS objects
run: git lfs pull
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: |
python -m venv pygraphistry
source pygraphistry/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .[test]
- name: Test pip install (Docker)
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
./docker/test-pip-install.sh
- name: Minimal tests
run: |
source pygraphistry/bin/activate
./bin/test-minimal.sh
test-core-python:
needs: [ test-minimal-python ]
# Inherit condition from test-minimal-python
if: ${{ success() }}
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11, 3.12, '3.13', '3.14']
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
lfs: true
- name: Checkout LFS objects
run: git lfs pull
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: |
python -m venv pygraphistry
source pygraphistry/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .[test,build,bolt,igraph,networkx,gremlin,nodexl,jupyter]
- name: Core tests
run: |
source pygraphistry/bin/activate
./bin/test.sh
test-graphviz:
needs: [ test-minimal-python ]
# Inherit condition from test-minimal-python
if: ${{ success() }}
runs-on: ubuntu-latest
timeout-minutes: 10 # Accommodate retry logic: 3 attempts × 2min + 1.5min backoff/cleanup
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11, 3.12, '3.13', '3.14']
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
lfs: true
- name: Checkout LFS objects
run: git lfs pull
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
# Install graphviz system packages (typically fast: 10-30s)
sudo apt-get install -y graphviz graphviz-dev
- name: Install Python dependencies with retry
run: |
python -m venv pygraphistry
source pygraphistry/bin/activate
# Retry pip install up to 3 times with exponential backoff
# This handles network issues and transient PyPI problems
for attempt in 1 2 3; do
echo "==== Attempt $attempt of 3 ===="
if python -m pip install -e .[test,pygraphviz] \
--timeout 120 \
--retries 3; then
echo "✅ Installation successful on attempt $attempt"
break
fi
if [ $attempt -lt 3 ]; then
wait_time=$((attempt * 30))
echo "⚠️ Installation failed, retrying in ${wait_time}s..."
# Clear pip cache after failure to avoid bad intermediate state
echo "🧹 Clearing pip cache to ensure fresh state..."
python -m pip cache purge || true
sleep $wait_time
else
echo "❌ Installation failed after 3 attempts"
exit 1
fi
done
- name: Graphviz tests
run: |
source pygraphistry/bin/activate
./bin/test-graphviz.sh
test-core-umap:
needs: [ test-minimal-python ]
# Inherit condition from test-minimal-python
if: ${{ success() }}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
# RAPIDS (umap-learn/numba) lacks Python 3.14 wheels as of 2025-11, so keep <=3.13 here
python-version: [3.9, '3.10', 3.11, 3.12, '3.13']
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
lfs: true
- name: Checkout LFS objects
run: git lfs pull
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: |
python -m venv pygraphistry
source pygraphistry/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .[test,testai,umap-learn]
- name: Core feature tests (weak featurize)
run: |
source pygraphistry/bin/activate
./bin/test-features.sh
- name: Core umap tests (weak featurize)
run: |
source pygraphistry/bin/activate
./bin/test-umap-learn-core.sh
test-full-ai:
needs: [ test-minimal-python ]
# Inherit condition from test-minimal-python
if: ${{ success() }}
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
# RAPIDS stack not available on Python 3.14 yet
python-version: [3.9, '3.10', 3.11, 3.12, '3.13']
#include:
# - python-version: 3.12
# continue-on-error: true
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
lfs: true
- name: Checkout LFS objects
run: git lfs pull
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: |
python -m venv pygraphistry
source pygraphistry/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .[test,testai,ai]
echo "skrub: `pip show skrub | grep Version`"
echo "pandas: `pip show pandas | grep Version`"
echo "numpy: `pip show numpy | grep Version`"
echo "scikit-learn: `pip show scikit-learn | grep Version`"
echo "scipy: `pip show scipy | grep Version`"
echo "umap-learn: `pip show umap-learn | grep Version`"
- name: Full dbscan tests (rich featurize)
run: |
source pygraphistry/bin/activate
./bin/test-dbscan.sh
- name: Full feature tests (rich featurize)
run: |
source pygraphistry/bin/activate
./bin/test-features.sh
- name: Full search tests (rich featurize)
run: |
source pygraphistry/bin/activate
./bin/test-text.sh
- name: Full umap tests (rich featurize)
run: |
source pygraphistry/bin/activate
./bin/test-umap-learn-core.sh
- name: Full embed tests (rich featurize)
run: |
source pygraphistry/bin/activate
./bin/test-embed.sh
- name: Full DGL tests (rich featurize)
run: |
source pygraphistry/bin/activate
./bin/test-dgl.sh
test-neo4j:
needs: [ test-minimal-python ]
# Inherit condition from test-minimal-python
if: ${{ success() }}
runs-on: ubuntu-latest
timeout-minutes: 3
env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Checkout LFS objects
run: git lfs pull
- name: Neo4j connector tests
run: |
cd docker && WITH_SUDO=" " ./test-cpu-local-neo4j-only.sh
test-build:
needs: [ test-minimal-python ]
# Inherit condition from test-minimal-python
if: ${{ success() }}
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Checkout LFS objects
run: git lfs pull
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[build]
- name: Test building
run: |
./bin/build.sh
- name: Validate py.typed in wheel
run: |
unzip -l dist/graphistry*.whl | grep -q "graphistry/py.typed" || (echo "ERROR: py.typed marker missing from wheel - users won't get type information" && exit 1)
echo "✅ py.typed marker confirmed in wheel distribution"
test-docs:
needs: [changes, python-lint-types]
# Run if docs changed OR Python changed OR infrastructure changed OR manual/scheduled run
if: ${{ needs.changes.outputs.docs == 'true' || needs.changes.outputs.python == 'true' || needs.changes.outputs.infra == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Test building docs
env:
VALIDATE_NOTEBOOK_EXECUTION: 1
run: |
cd docs && ./ci.sh
test-readme:
needs: [changes]
# Run if docs changed OR infrastructure changed OR manual/scheduled run
if: ${{ needs.changes.outputs.docs == 'true' || needs.changes.outputs.infra == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Test building docs
continue-on-error: true
run: |
docker run --rm -v "$(pwd)/README.md:/workdir/README.md:ro" -v "$(pwd)/.markdownlint.yaml:/workdir/.markdownlint.yaml:ro" ghcr.io/igorshubovych/markdownlint-cli:v0.37.0 README.md