Repository navigation
Development and CI
SergeyGer edited this page Nov 23, 2026
·
7 revisions
git clone https://github.com/SergeyGer/TopoMarket.git
cd TopoMarket
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
python -m pip install --upgrade pip
pip install -e ".[dev]"Quality commands (the same as CI):
python -m compileall -q src tests app.py
ruff check .
ruff format --check .
pytest -q
# opt-in private acceptance (requires the private seed archive; never committed)
TOPOMARKET_SEED_DIR=/path/to/seed/raw pytest -q tests/private_acceptance-
tests/- unit and integration tests using synthetic fixtures or temporary directories only. -
tests/private_acceptance/- opt-in A2 acceptance checks; skipped whenTOPOMARKET_SEED_DIRis unset. - Tests must be deterministic, fast and network-free.
| Workflow | Trigger | Checks |
|---|---|---|
ci |
push to main, pull requests |
Python 3.11 and 3.12: compile, ruff lint, ruff format, pytest |
security |
push to main, PRs, weekly |
pip-audit (installed deps), bandit (src), detect-secrets over tracked files |
codeql |
push to main, PRs, weekly |
CodeQL static analysis (Python, build-mode none) |
main-guard |
push to main
|
Independent audit that main changes arrived through a merged PR (not a direct/forced push) |
main is protected server-side:
- pull requests only; direct pushes rejected,
- required checks:
tests (py3.11),tests (py3.12),dependency audit,analyze (python), - strict required status checks (branch must be up to date with
mainbefore merging), - linear history required; squash merge only; merged branches deleted automatically,
- no force pushes, no branch deletion, admin enforcement enabled, conversation resolution required.
Day-to-day flow:
- Create a branch:
git checkout -b feat/<short-slug>. - Implement with tests; run the quality commands locally.
- Open a PR using the template; link the tracking issue (
Closes #<n>). - Wait for all required checks (green).
- Squash-merge; the branch is deleted. A release is tagged when a step completes.
If a rebase is needed, update the branch locally (git rebase origin/main) and push the branch -
never force-push main.
- Commit messages:
type(scope): summary(feat, fix, docs, test, chore, security, ci). - No private data or credentials in any commit, fixture, log or screenshot.
- No release dates or schedules in README, wiki, issues, PRs or releases; identify releases by step number and semantic version.
- Update documentation and tests with behaviour changes; keep the public demo offline and deterministic.
- Dependencies are declared in
pyproject.toml; Dependabot opens grouped update PRs.
- Issue templates (implementation step, bug), PR template, CODEOWNERS.
- Dependabot version updates for pip and GitHub Actions (monthly, grouped).
-
.github/workflows/release.yml: locked dependency install, compile/lint/format, JUnit test report, offline release checks, sdist/wheel build,twine check, wheel-content/private-input guard and retained release artifacts on PRs,mainand version tags. - Vulnerability alerts, automated security fixes, secret scanning and push protection enabled.
- Releases:
v0.1.0Step 1 throughv0.8.0Step 8 (all implementation steps delivered).