foothold 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- foothold-0.1.1/.foothold.toml +14 -0
- foothold-0.1.1/.github/ISSUE_TEMPLATE/bug.yml +20 -0
- foothold-0.1.1/.github/ISSUE_TEMPLATE/ranking.yml +17 -0
- foothold-0.1.1/.github/PULL_REQUEST_TEMPLATE.md +11 -0
- foothold-0.1.1/.github/workflows/ci.yml +34 -0
- foothold-0.1.1/.github/workflows/release.yml +39 -0
- foothold-0.1.1/.gitignore +12 -0
- foothold-0.1.1/.pre-commit-config.yaml +13 -0
- foothold-0.1.1/ARCHITECTURE.md +71 -0
- foothold-0.1.1/CHANGELOG.md +42 -0
- foothold-0.1.1/CODE_OF_CONDUCT.md +6 -0
- foothold-0.1.1/CONTRIBUTING.md +111 -0
- foothold-0.1.1/LICENSE +202 -0
- foothold-0.1.1/PKG-INFO +214 -0
- foothold-0.1.1/README.md +182 -0
- foothold-0.1.1/SECURITY.md +29 -0
- foothold-0.1.1/docs/cost-model.md +55 -0
- foothold-0.1.1/pyproject.toml +63 -0
- foothold-0.1.1/src/foothold/__init__.py +3 -0
- foothold-0.1.1/src/foothold/analyze.py +40 -0
- foothold-0.1.1/src/foothold/cli.py +151 -0
- foothold-0.1.1/src/foothold/collectors/__init__.py +5 -0
- foothold-0.1.1/src/foothold/collectors/git_history.py +43 -0
- foothold-0.1.1/src/foothold/collectors/markers.py +31 -0
- foothold-0.1.1/src/foothold/collectors/python_ast.py +108 -0
- foothold-0.1.1/src/foothold/config.py +70 -0
- foothold-0.1.1/src/foothold/graph/__init__.py +4 -0
- foothold-0.1.1/src/foothold/graph/build.py +79 -0
- foothold-0.1.1/src/foothold/graph/rank.py +117 -0
- foothold-0.1.1/src/foothold/issues.py +71 -0
- foothold-0.1.1/src/foothold/models.py +70 -0
- foothold-0.1.1/src/foothold/narrator/__init__.py +3 -0
- foothold-0.1.1/src/foothold/narrator/client.py +85 -0
- foothold-0.1.1/src/foothold/render/__init__.py +5 -0
- foothold-0.1.1/src/foothold/render/markdown.py +57 -0
- foothold-0.1.1/src/foothold/render/mermaid.py +24 -0
- foothold-0.1.1/src/foothold/render/terminal.py +47 -0
- foothold-0.1.1/tests/conftest.py +23 -0
- foothold-0.1.1/tests/fixtures/minirepo/main.py +5 -0
- foothold-0.1.1/tests/fixtures/minirepo/pkg/__init__.py +1 -0
- foothold-0.1.1/tests/fixtures/minirepo/pkg/api.py +8 -0
- foothold-0.1.1/tests/fixtures/minirepo/pkg/core.py +5 -0
- foothold-0.1.1/tests/fixtures/minirepo/pkg/util/__init__.py +0 -0
- foothold-0.1.1/tests/fixtures/minirepo/pkg/util/helpers.py +6 -0
- foothold-0.1.1/tests/fixtures/minirepo/tests/test_core.py +5 -0
- foothold-0.1.1/tests/unit/test_cli.py +45 -0
- foothold-0.1.1/tests/unit/test_git_history.py +34 -0
- foothold-0.1.1/tests/unit/test_graph.py +74 -0
- foothold-0.1.1/tests/unit/test_rank.py +48 -0
- foothold-0.1.1/tests/unit/test_render_and_issues.py +34 -0
- foothold-0.1.1/uv.lock +990 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Foothold's configuration for its own repository.
|
|
2
|
+
[foothold]
|
|
3
|
+
top = 20
|
|
4
|
+
model = "gpt-4o-mini"
|
|
5
|
+
max_input_tokens = 12000
|
|
6
|
+
|
|
7
|
+
# Weights are deliberately visible: a ranking you cannot interrogate is a ranking
|
|
8
|
+
# you cannot trust. Raise `churn` on a repository with long history, raise
|
|
9
|
+
# `centrality` on a young one.
|
|
10
|
+
[foothold.weights]
|
|
11
|
+
centrality = 0.45
|
|
12
|
+
churn = 0.30
|
|
13
|
+
fan_in = 0.15
|
|
14
|
+
size = 0.10
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Something behaves incorrectly
|
|
3
|
+
labels: [bug]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: what
|
|
7
|
+
attributes:
|
|
8
|
+
label: What happened
|
|
9
|
+
description: Include the output of `foothold map . --json` if you can share it.
|
|
10
|
+
validations: { required: true }
|
|
11
|
+
- type: input
|
|
12
|
+
id: repo
|
|
13
|
+
attributes:
|
|
14
|
+
label: Repository you ran it against
|
|
15
|
+
description: A link is enough if it is public.
|
|
16
|
+
- type: input
|
|
17
|
+
id: version
|
|
18
|
+
attributes:
|
|
19
|
+
label: foothold --version and Python version
|
|
20
|
+
validations: { required: true }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Bad ranking
|
|
2
|
+
description: The file order or architecture summary was misleading
|
|
3
|
+
labels: [ranking, help wanted]
|
|
4
|
+
body:
|
|
5
|
+
- type: input
|
|
6
|
+
id: repo
|
|
7
|
+
attributes:
|
|
8
|
+
label: Public repository URL
|
|
9
|
+
validations: { required: true }
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: expected
|
|
12
|
+
attributes:
|
|
13
|
+
label: What ranking did you expect, and why?
|
|
14
|
+
description: >
|
|
15
|
+
This is the most valuable report we receive. Ranking quality is the product;
|
|
16
|
+
a concrete disagreement from someone who knows the codebase is how it improves.
|
|
17
|
+
validations: { required: true }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Closes #
|
|
2
|
+
|
|
3
|
+
## What changed
|
|
4
|
+
|
|
5
|
+
## Checklist
|
|
6
|
+
|
|
7
|
+
- [ ] `uv run pytest` passes
|
|
8
|
+
- [ ] `uv run mypy` passes
|
|
9
|
+
- [ ] New behaviour has a test; new collectors ship a fixture repo with a hand-written graph
|
|
10
|
+
- [ ] If ranking changed: before/after `foothold map` output on two repositories is pasted below
|
|
11
|
+
- [ ] If token usage changed: `docs/cost-model.md` updated
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push: { branches: [main] }
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
18
|
+
python: ["3.10", "3.11", "3.12", "3.13"]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
with: { fetch-depth: 0 } # churn signal needs real history
|
|
22
|
+
- uses: astral-sh/setup-uv@v3
|
|
23
|
+
with: { enable-cache: true }
|
|
24
|
+
- run: uv python install ${{ matrix.python }}
|
|
25
|
+
- run: uv sync --all-extras
|
|
26
|
+
- run: uv run ruff check .
|
|
27
|
+
- run: uv run ruff format --check .
|
|
28
|
+
- run: uv run mypy
|
|
29
|
+
- run: uv run pytest --cov=foothold --cov-fail-under=80
|
|
30
|
+
- name: Dogfood - the tool must survive its own repository
|
|
31
|
+
run: |
|
|
32
|
+
uv run foothold map . --top 10
|
|
33
|
+
uv run foothold issues . --max 5
|
|
34
|
+
uv run foothold docs . --out "${{ runner.temp }}/ARCHITECTURE.md"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: astral-sh/setup-uv@v3
|
|
16
|
+
with: { enable-cache: true }
|
|
17
|
+
- run: uv build
|
|
18
|
+
- uses: actions/upload-artifact@v4
|
|
19
|
+
with:
|
|
20
|
+
name: dist
|
|
21
|
+
path: dist/
|
|
22
|
+
|
|
23
|
+
publish:
|
|
24
|
+
# Publishing is off until PyPI trusted publishing is configured. To turn it on:
|
|
25
|
+
# 1. pypi.org -> Account -> Publishing -> add a pending publisher for this repo
|
|
26
|
+
# and the workflow file release.yml, environment "release"
|
|
27
|
+
# 2. Settings -> Environments -> New environment -> "release"
|
|
28
|
+
# 3. Settings -> Secrets and variables -> Actions -> Variables -> PYPI_PUBLISH = true
|
|
29
|
+
# Until then the tag still produces a build artifact, and the run stays green.
|
|
30
|
+
if: vars.PYPI_PUBLISH == 'true'
|
|
31
|
+
needs: build
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
environment: release
|
|
34
|
+
permissions:
|
|
35
|
+
id-token: write # trusted publishing - no API token in secrets
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/download-artifact@v4
|
|
38
|
+
with: { name: dist, path: dist }
|
|
39
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.6.9
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
9
|
+
rev: v1.11.2
|
|
10
|
+
hooks:
|
|
11
|
+
- id: mypy
|
|
12
|
+
additional_dependencies: [types-setuptools]
|
|
13
|
+
pass_filenames: false
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
<!-- Generated by foothold. Re-run `foothold docs` to refresh. -->
|
|
4
|
+
|
|
5
|
+
31 modules (19 source), 1,298 lines, 202 import statements.
|
|
6
|
+
|
|
7
|
+
## Where to start
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Core modules
|
|
11
|
+
|
|
12
|
+
| File | Score | Imported by | Lines | Signals |
|
|
13
|
+
|---|---:|---:|---:|---|
|
|
14
|
+
| `src/foothold/models.py` | 0.678 | 10 | 71 | imported by 10 modules, high transitive reach |
|
|
15
|
+
| `src/foothold/config.py` | 0.185 | 5 | 71 | — |
|
|
16
|
+
| `src/foothold/narrator/client.py` | 0.168 | 3 | 86 | — |
|
|
17
|
+
| `src/foothold/graph/build.py` | 0.153 | 3 | 80 | — |
|
|
18
|
+
| `src/foothold/collectors/python_ast.py` | 0.145 | 3 | 109 | — |
|
|
19
|
+
| `src/foothold/graph/rank.py` | 0.145 | 3 | 118 | — |
|
|
20
|
+
| `src/foothold/cli.py` | 0.124 | 1 | 152 | — |
|
|
21
|
+
| `src/foothold/analyze.py` | 0.106 | 3 | 41 | — |
|
|
22
|
+
| `src/foothold/issues.py` | 0.101 | 2 | 72 | — |
|
|
23
|
+
| `src/foothold/render/mermaid.py` | 0.096 | 2 | 25 | — |
|
|
24
|
+
| `src/foothold/render/markdown.py` | 0.081 | 1 | 58 | — |
|
|
25
|
+
| `src/foothold/render/terminal.py` | 0.076 | 1 | 48 | — |
|
|
26
|
+
| `src/foothold/collectors/git_history.py` | 0.071 | 1 | 44 | — |
|
|
27
|
+
| `src/foothold/collectors/markers.py` | 0.062 | 1 | 32 | — |
|
|
28
|
+
| `src/foothold/render/__init__.py` | 0.039 | 2 | 6 | — |
|
|
29
|
+
| `src/foothold/collectors/__init__.py` | 0.015 | 1 | 6 | — |
|
|
30
|
+
| `src/foothold/graph/__init__.py` | 0.011 | 1 | 5 | — |
|
|
31
|
+
| `src/foothold/narrator/__init__.py` | 0.003 | 1 | 4 | — |
|
|
32
|
+
| `src/foothold/__init__.py` | 0.000 | 1 | 4 | — |
|
|
33
|
+
|
|
34
|
+
## Dependency graph
|
|
35
|
+
|
|
36
|
+
```mermaid
|
|
37
|
+
graph LR
|
|
38
|
+
foothold_models["src/foothold/models.py"]
|
|
39
|
+
foothold_config["src/foothold/config.py"]
|
|
40
|
+
foothold_narrator_client["src/foothold/narrator/client.py"]
|
|
41
|
+
foothold_graph_build["src/foothold/graph/build.py"]
|
|
42
|
+
foothold_collectors_python_ast["src/foothold/collectors/python_ast.py"]
|
|
43
|
+
foothold_graph_rank["src/foothold/graph/rank.py"]
|
|
44
|
+
foothold_cli["src/foothold/cli.py"]
|
|
45
|
+
foothold_analyze["src/foothold/analyze.py"]
|
|
46
|
+
foothold_issues["src/foothold/issues.py"]
|
|
47
|
+
foothold_render_mermaid["src/foothold/render/mermaid.py"]
|
|
48
|
+
foothold_render_markdown["src/foothold/render/markdown.py"]
|
|
49
|
+
foothold_render_terminal["src/foothold/render/terminal.py"]
|
|
50
|
+
foothold_analyze --> foothold_config
|
|
51
|
+
foothold_analyze --> foothold_graph_rank
|
|
52
|
+
foothold_analyze --> foothold_models
|
|
53
|
+
foothold_cli --> foothold_analyze
|
|
54
|
+
foothold_cli --> foothold_config
|
|
55
|
+
foothold_cli --> foothold_issues
|
|
56
|
+
foothold_cli --> foothold_narrator_client
|
|
57
|
+
foothold_collectors_python_ast --> foothold_models
|
|
58
|
+
foothold_graph_build --> foothold_models
|
|
59
|
+
foothold_graph_rank --> foothold_config
|
|
60
|
+
foothold_graph_rank --> foothold_models
|
|
61
|
+
foothold_issues --> foothold_models
|
|
62
|
+
foothold_narrator_client --> foothold_models
|
|
63
|
+
foothold_render_markdown --> foothold_models
|
|
64
|
+
foothold_render_markdown --> foothold_render_mermaid
|
|
65
|
+
foothold_render_mermaid --> foothold_models
|
|
66
|
+
foothold_render_terminal --> foothold_models
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## How this file is scored
|
|
70
|
+
|
|
71
|
+
`score = 0.45·pagerank + 0.30·churn + 0.15·fan-in + 0.10·log(loc)`, each term min-max normalised across the repository. Weights are configurable in `.foothold.toml`.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes are documented here. Format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.1.1]
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- `docs` now reports an unwritable `--out` path as a one-line error instead of a
|
|
14
|
+
traceback. Found by the Windows CI matrix, which is why the matrix exists.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- `uv.lock` is committed, so CI resolves the same dependency set every run.
|
|
19
|
+
- Tagging builds a distribution artifact; publishing to PyPI is gated behind the
|
|
20
|
+
`PYPI_PUBLISH` repository variable until trusted publishing is configured.
|
|
21
|
+
- `ARCHITECTURE.md` is refreshed at release time. An earlier attempt to assert it
|
|
22
|
+
byte-for-byte in CI was removed: churn is an input to the ranking, so the document
|
|
23
|
+
legitimately changes with every commit and the check failed by construction.
|
|
24
|
+
|
|
25
|
+
## [0.1.0]
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- `foothold map` — offline ranking of the files that hold a Python repository together,
|
|
30
|
+
combining PageRank over the in-project import graph, git churn, fan-in and size.
|
|
31
|
+
- `foothold docs` — deterministic `ARCHITECTURE.md` with a Mermaid dependency graph.
|
|
32
|
+
- `foothold issues` — good-first-issue candidates from TODO markers, untested modules
|
|
33
|
+
and undocumented public APIs, restricted to modules off the critical path.
|
|
34
|
+
- `foothold explain` — model-written prose over the ranked map, with `--dry-run` to
|
|
35
|
+
inspect the exact payload and a confirmation prompt before any spend.
|
|
36
|
+
- `.foothold.toml` for ranking weights, excludes and model selection.
|
|
37
|
+
|
|
38
|
+
### Notes
|
|
39
|
+
|
|
40
|
+
- Python only. Multi-language support via tree-sitter is v0.3.
|
|
41
|
+
- PageRank is implemented in pure Python to avoid a scipy/numpy dependency: three small
|
|
42
|
+
runtime dependencies total.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Contributing to Foothold
|
|
2
|
+
|
|
3
|
+
This document should get you from a fresh clone to a merged pull request without needing
|
|
4
|
+
to ask anyone anything. If it fails at that, the failure is a bug worth an issue.
|
|
5
|
+
|
|
6
|
+
## Orientation
|
|
7
|
+
|
|
8
|
+
The fastest path into this codebase is the tool itself:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
git clone https://github.com/serdairy/foothold && cd foothold
|
|
12
|
+
uv sync --all-extras
|
|
13
|
+
uv run foothold map . # offline, no API key
|
|
14
|
+
uv run foothold issues . # what needs doing, ranked off the critical path
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`src/foothold/models.py` is the shared vocabulary and is imported by ten modules — read
|
|
18
|
+
it first. Then `analyze.py`, which is 40 lines and shows the whole pipeline. Then whichever
|
|
19
|
+
stage you are changing.
|
|
20
|
+
|
|
21
|
+
## Development setup
|
|
22
|
+
|
|
23
|
+
Requirements: Python 3.10+ and [uv](https://github.com/astral-sh/uv).
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
uv sync --all-extras # runtime + dev + narrate extras
|
|
27
|
+
uv run pre-commit install # ruff + mypy on commit
|
|
28
|
+
uv run pytest # 23 tests, ~0.2s, no network
|
|
29
|
+
uv run mypy # strict, and it must stay clean
|
|
30
|
+
uv run pytest -m e2e # requires OPENAI_API_KEY
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Unit tests must never open a socket. The `no_network` fixture in `tests/conftest.py` is
|
|
34
|
+
applied automatically and fails any test that tries; only tests marked `e2e` are exempt.
|
|
35
|
+
|
|
36
|
+
## Project conventions
|
|
37
|
+
|
|
38
|
+
- **Type hints are mandatory.** `mypy --strict` runs in CI and blocks merge.
|
|
39
|
+
- **Formatting and linting**: `ruff format` and `ruff check`, enforced by pre-commit.
|
|
40
|
+
- **Commits**: [Conventional Commits](https://www.conventionalcommits.org/) —
|
|
41
|
+
`feat:`, `fix:`, `docs:`, `perf:`, `refactor:`, `test:`, `chore:`.
|
|
42
|
+
- **Branches**: `feat/short-description`, `fix/issue-123`.
|
|
43
|
+
- **New collectors** implement the pattern in `collectors/` — a pure function from a path
|
|
44
|
+
to data, no side effects — and ship with a fixture repository under
|
|
45
|
+
`tests/fixtures/` whose correct graph is written by hand. No fixture, no merge.
|
|
46
|
+
- **Ranking changes** require before/after `foothold map` output on at least two real
|
|
47
|
+
repositories in the PR description. Ranking quality is the product; a change to
|
|
48
|
+
`graph/rank.py` without evidence is not reviewable.
|
|
49
|
+
- **Prompt changes** require the same: before/after generated output on two fixtures.
|
|
50
|
+
|
|
51
|
+
## Two invariants that must not break
|
|
52
|
+
|
|
53
|
+
1. **Foothold never executes the code it analyses.** Parsing is stdlib `ast`. Any change
|
|
54
|
+
that imports, `exec`s, or otherwise runs a target repository will be rejected.
|
|
55
|
+
2. **Source code never leaves the machine.** `narrator/client.build_context` sends paths,
|
|
56
|
+
scores and docstring first lines only. `test_context_is_bounded_and_excludes_source`
|
|
57
|
+
guards this. If you need more context for a prompt, say so in an issue first.
|
|
58
|
+
|
|
59
|
+
## Where to start
|
|
60
|
+
|
|
61
|
+
| Label | What it means |
|
|
62
|
+
|---|---|
|
|
63
|
+
| `good first issue` | Self-contained, under ~50 lines, no architectural decisions |
|
|
64
|
+
| `ranking` | The output was misleading on a real repository — highest-value work here |
|
|
65
|
+
| `parser` | Language support: tree-sitter grammars for v0.3 |
|
|
66
|
+
| `help wanted` | Well-specified but larger |
|
|
67
|
+
| `needs-design` | Discuss in the issue before writing code |
|
|
68
|
+
|
|
69
|
+
If nothing fits, open an issue describing what you want to build before you build it. A
|
|
70
|
+
short discussion up front is cheaper for both of us than a rejected pull request.
|
|
71
|
+
|
|
72
|
+
## Pull request checklist
|
|
73
|
+
|
|
74
|
+
1. An issue exists and is referenced (`Closes #123`).
|
|
75
|
+
2. `uv run pytest` and `uv run mypy` pass locally.
|
|
76
|
+
3. New behaviour has a test. Coverage must stay above 80% — CI enforces it.
|
|
77
|
+
4. User-visible changes update `README.md` in the same PR.
|
|
78
|
+
5. If token usage changed, `docs/cost-model.md` is updated with fresh measurements.
|
|
79
|
+
|
|
80
|
+
Pull requests get an automated review pass for style and obvious defects, then a human
|
|
81
|
+
review. The automated pass is advisory; a maintainer makes the merge decision.
|
|
82
|
+
|
|
83
|
+
## Releasing
|
|
84
|
+
|
|
85
|
+
1. `uv run foothold docs . --out ARCHITECTURE.md` — the ranking shifts as git history
|
|
86
|
+
grows, so the committed document is refreshed here rather than asserted in CI.
|
|
87
|
+
2. Update `CHANGELOG.md`.
|
|
88
|
+
3. Tag `vX.Y.Z` and push the tag. Tags are never moved once pushed.
|
|
89
|
+
|
|
90
|
+
## Reporting bugs
|
|
91
|
+
|
|
92
|
+
Open an issue with the output of `foothold map . --json`, your Python version, and the
|
|
93
|
+
repository you ran against (a link is enough if it is public).
|
|
94
|
+
|
|
95
|
+
For output-quality problems — a wrong reading order, a misleading summary — use the **bad
|
|
96
|
+
ranking** template and say what ordering you expected instead. Those reports are the most
|
|
97
|
+
valuable ones this project receives, because they are the only external check on whether
|
|
98
|
+
the ranking formula is right.
|
|
99
|
+
|
|
100
|
+
## Security
|
|
101
|
+
|
|
102
|
+
Do not open a public issue for security problems. See [SECURITY.md](SECURITY.md).
|
|
103
|
+
|
|
104
|
+
## Code of conduct
|
|
105
|
+
|
|
106
|
+
This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md).
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
By contributing you agree that your contributions are licensed under Apache-2.0. No CLA
|
|
111
|
+
is required.
|
foothold-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|