Skip to content

Latest commit

 

History

History
110 lines (75 loc) · 1.92 KB

development.md

File metadata and controls

110 lines (75 loc) · 1.92 KB

Development guide

Local setup

This project uses pyproject.toml and uv.lock for dependency management.

Standard setup (PyPI dependencies)

pyenv local 3.11
make first-time-setup

Local SDK development setup

pyenv local 3.11
SOCKET_SDK_PATH=~/path/to/socketdev make first-time-local-setup

Default local SDK path is ../socketdev when SOCKET_SDK_PATH is not set.

Ongoing workflows

After dependency changes:

make update-deps

After pulling latest changes:

make sync-all

Run tests:

make test

This runs both the unit and core suites. To focus on the CLI exit-code contract:

uv run pytest tests/core/test_cli_exit_contract.py tests/core/test_exit_codes.py

Run lint/format checks:

make lint

Make targets

High-level:

  • make first-time-setup
  • make first-time-local-setup
  • make update-lock
  • make sync-all
  • make dev-setup

Implementation:

  • make local-dev
  • make setup
  • make sync
  • make clean
  • make test
  • make lint

Environment variables

Core:

  • SOCKET_SECURITY_API_TOKEN (also supports SOCKET_SECURITY_API_KEY, SOCKET_API_KEY, SOCKET_API_TOKEN)
  • SOCKET_SDK_PATH (default ../socketdev)

GitLab:

  • GITLAB_TOKEN
  • CI_JOB_TOKEN

Manual setup (without make)

python -m venv .venv
source .venv/bin/activate
uv sync

Version-sync hook

Install pre-commit outside the project's virtual environment. If your existing hook was installed from .venv, reinstall it with the commands below so it continues to work after uv sync removes the project copy of pre-commit.

uv tool install pre-commit
"$(uv tool dir --bin)/pre-commit" install

Related docs