How to use the validation tools locally while developing an integration.
uv python install 3.13
uv venv --python 3.13
source .venv/bin/activate # Linux/macOS
# .venv\Scripts\activate # Windows
uv pip install -r requirements-dev.txtSee CONTRIBUTING.md for full setup instructions and project conventions.
When building an integration, run the checks in this order. This matches what CI does on your PR.
python scripts/validate_integration.py my-integrationRun this first — it catches structural problems before you waste time on code quality checks. It validates:
- Folder name is lowercase
- All required files exist (
config.json,__init__.py,requirements.txt,README.md,icon.png/icon.svg) config.jsonhas the required fields and valid schema__init__.pyis minimal (only import +__all__)requirements.txtincludesautohive-integrations-sdktests/folder has__init__.py,context.pyorconftest.py, and at least onetest_*.py- Icon is exactly 512x512 pixels
- OAuth scopes are actually used (heuristic)
python scripts/check_code.py my-integrationThis is the comprehensive check — it runs 9 steps in sequence:
- Installs your
requirements.txtdependencies - Checks Python syntax (
py_compile) - Verifies all imports resolve (
check_imports) - Validates all JSON files parse correctly
- Lints with
ruff check - Checks formatting with
ruff format --check - Scans for security issues with
bandit - Audits dependencies for known CVEs with
pip-audit - Cross-validates
config.jsonagainst your code (check_config_sync)
# Auto-fix lint issues
ruff check --fix --config /path/to/autohive-integrations-tooling/ruff.toml my-integration
# Auto-format code
ruff format --config /path/to/autohive-integrations-tooling/ruff.toml my-integrationNote: Point
--configtoruff.tomlin this tooling repo. If you're working inside the tooling repo, use--config ruff.toml. If your integration lives in a separate repo, use the full path to the tooling repo'sruff.toml.
Then re-run check_code.py to confirm everything passes.
You don't always need the full suite. Use individual scripts when working on specific issues.
# Check a single file
python scripts/check_imports.py my-integration/my_integration.py
# Also verify that imported names exist (imports modules — use with trusted code only)
python scripts/check_imports.py --verify-names my-integration/my_integration.pypython scripts/check_config_sync.py my-integrationUseful when you've added or renamed actions and want to verify config.json matches your @action decorators and inputs access patterns.
All scripts accept multiple directories:
python scripts/validate_integration.py integration-a integration-b
python scripts/check_code.py integration-a integration-b
python scripts/check_config_sync.py integration-a integration-b# Validates every integration folder at the repo root
python scripts/validate_integration.py# See which integration dirs changed compared to main
python scripts/get_changed_dirs.py origin/main
# Run the full CI pipeline locally against those dirs
DIRS=$(python scripts/get_changed_dirs.py origin/main)
python scripts/validate_integration.py $DIRS
python scripts/check_code.py $DIRS
python scripts/check_readme.py origin/main $DIRS
python scripts/check_version_bump.py origin/main $DIRS1. Edit code
2. ruff format --config path/to/ruff.toml my-integration (auto-format)
3. ruff check --fix --config path/to/ruff.toml my-integration (auto-fix lint)
4. python scripts/check_code.py my-integration (full check)
5. Fix any remaining issues
6. Repeat from 1
Once everything passes, run validate_integration.py for a final structure check before pushing.
Unit tests and integration tests are run separately. See the integrations repo's CONTRIBUTING.md for full details.
# Via the tooling runner (installs deps per-integration, runs with coverage)
python scripts/run_tests.py my-integration
# Or directly via pytest (from the integrations repo root)
pytest my-integration/Integration tests (test_*_integration.py) call real APIs and are never run in CI. They must be invoked by passing the file path explicitly:
pytest my-integration/tests/test_my_integration_integration.py -m integrationThey are excluded from auto-discovery by two mechanisms:
python_filesinpyproject.tomlonly matchestest_*_unit.pyaddoptsincludes-m unit, which deselects@pytest.mark.integrationtests
The validate-integration.yml workflow uses the composite action defined in action.yml to run these checks on every PR:
| Step | Script | What It Does |
|---|---|---|
| 1 | get_changed_dirs.py |
Detects which integration folders changed |
| 2 | validate_integration.py |
Structure and config validation |
| 3 | check_code.py |
Syntax, imports, JSON, lint, format, security, deps, config sync |
| 4 | run_tests.py |
Installs each integration's deps, runs test_*_unit.py files (unit tests only) |
| 5 | check_readme.py |
Checks that the main README.md was updated for new integrations |
| 6 | check_version_bump.py |
Checks that config.json version was incremented, recommends bump level |
If no integration directories changed (only scripts/, tests/, etc.), steps 2–6 are skipped.
Results are posted as a sticky PR comment showing ✅ Passed,
Other repositories can use the same action — see Usage as GitHub Action in the README.
| Document | Purpose |
|---|---|
| CONTRIBUTING.md | Start here. Setup, project conventions, folder structure, commit format, PR process. |
| INTEGRATION_CHECKLIST.md | Detailed checklist to review before submitting a PR. Covers every required file, config field, and common mistake. |
| LOCAL_DEVELOPMENT.md | This file. How to use the validation tools locally during development. |
| README.md | Repository overview, CI pipeline diagram, file listing, integrations table. |
Detailed documentation for each validation script — usage, arguments, exit codes, how it works, CI integration.
| Document | Script | When to read it |
|---|---|---|
| validate_integration.md | validate_integration.py |
Understanding what structure/config checks are performed and why |
| check_code.md | check_code.py |
Understanding the 9 code quality checks and their failure output |
| check_imports.md | check_imports.py |
Understanding how imports are resolved (AST parsing, relative imports, --verify-names) |
| check_config_sync.md | check_config_sync.py |
Understanding how config.json is cross-validated against code (AST-based action and input detection) |
| check_readme.md | check_readme.py |
Understanding the README update requirement for new integrations |
| check_version_bump.md | check_version_bump.py |
Understanding the version bump requirement and bump-level recommendations |
| get_changed_dirs.md | get_changed_dirs.py |
Understanding how CI detects which integrations to validate |
Used by self-test.yml to regression-test the validation scripts. Also useful as references.
| Fixture | Purpose |
|---|---|
good-integration/ |
Working reference — passes all validation checks |
Bad-Integration/ |
Deliberately invalid (uppercase name, missing files, bad config) |
bad-icon/ |
Valid structure but wrong icon size (100x100 instead of 512x512) |
config-mismatch/ |
Deliberate config↔code mismatches (missing actions, undocumented params) |
netlify/ |
Real-world-style integration with multiple actions and OAuth auth |
submodule-imports/ |
Import checker fixtures (valid and invalid submodule imports) |
relative-imports/ |
Import checker fixtures (valid and invalid relative imports) |
name-verification/ |
Import checker fixtures for --verify-names flag |