tundish 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.
- tundish-0.1.1/.gitignore +30 -0
- tundish-0.1.1/CONTRIBUTING.md +162 -0
- tundish-0.1.1/Cargo.lock +3907 -0
- tundish-0.1.1/Cargo.toml +62 -0
- tundish-0.1.1/LICENSE +21 -0
- tundish-0.1.1/PKG-INFO +116 -0
- tundish-0.1.1/README.md +102 -0
- tundish-0.1.1/SECURITY.md +69 -0
- tundish-0.1.1/build.rs +3 -0
- tundish-0.1.1/diataxis.yml +2 -0
- tundish-0.1.1/docs/cli-reference.md +471 -0
- tundish-0.1.1/docs/getting-started.md +109 -0
- tundish-0.1.1/docs/how-to-gaff.md +127 -0
- tundish-0.1.1/docs/how-to-publish.md +125 -0
- tundish-0.1.1/docs/what-is-tundish.md +148 -0
- tundish-0.1.1/pyproject.toml +29 -0
- tundish-0.1.1/python/tundish/__init__.py +5 -0
- tundish-0.1.1/python/tundish/_cli.py +9 -0
- tundish-0.1.1/python/tundish/_cli_main.py +5 -0
- tundish-0.1.1/rust-toolchain.toml +10 -0
- tundish-0.1.1/skills/tundish/SKILL.md +120 -0
- tundish-0.1.1/skills/tundish-publish/SKILL.md +79 -0
- tundish-0.1.1/src/cli.rs +504 -0
- tundish-0.1.1/src/config.rs +106 -0
- tundish-0.1.1/src/error.rs +30 -0
- tundish-0.1.1/src/expr.rs +74 -0
- tundish-0.1.1/src/lib.rs +15 -0
- tundish-0.1.1/src/main.rs +3 -0
- tundish-0.1.1/src/mangen.rs +31 -0
- tundish-0.1.1/src/python.rs +62 -0
- tundish-0.1.1/src/rules.rs +205 -0
- tundish-0.1.1/src/store.rs +1399 -0
tundish-0.1.1/.gitignore
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/target
|
|
2
|
+
/dist
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.so
|
|
5
|
+
|
|
6
|
+
# Coding-agent and editor local state. Machine-specific, and one of
|
|
7
|
+
# these reached public history before.
|
|
8
|
+
/.claude/
|
|
9
|
+
/.cursor/
|
|
10
|
+
/.aider*
|
|
11
|
+
/.gaff-state/
|
|
12
|
+
*.swp
|
|
13
|
+
*~
|
|
14
|
+
\#*\#
|
|
15
|
+
.DS_Store
|
|
16
|
+
|
|
17
|
+
# Local dependency overrides. A path override names a directory on one
|
|
18
|
+
# machine, so it exposes the account layout and breaks every other
|
|
19
|
+
# clone. Keep them here, never in Cargo.toml.
|
|
20
|
+
/.cargo/config.toml
|
|
21
|
+
/config.toml
|
|
22
|
+
|
|
23
|
+
# Nix build output.
|
|
24
|
+
/result
|
|
25
|
+
/result-*
|
|
26
|
+
|
|
27
|
+
# Generated by npm/generate.mjs at release time: one package per
|
|
28
|
+
# platform, each holding a built binary. A binary does not belong in
|
|
29
|
+
# git, and one committed by accident ships inside the crate.
|
|
30
|
+
npm/tundish-*/
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Use of AI
|
|
4
|
+
|
|
5
|
+
Say in the pull request when AI generated part of the change. Be able to
|
|
6
|
+
explain the change in your own words, and write your own comments on the
|
|
7
|
+
pull request. A pull request the author cannot
|
|
8
|
+
explain is closed.
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
Install Rust through rustup and a C compiler for the bundled SQLite
|
|
13
|
+
library. `rust-toolchain.toml` selects the Rust toolchain. The
|
|
14
|
+
`--all-features` build includes the Python module and needs a Python
|
|
15
|
+
interpreter and its development library. CI uses Python 3.12.
|
|
16
|
+
|
|
17
|
+
Install `jq` and `uv` with your package manager. Install gaff for the
|
|
18
|
+
merge-gate tests and missouri for the suite under `tests/missouri/`:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
cargo install --locked --git https://github.com/cjohnhanson/missouri
|
|
22
|
+
cargo install --locked --git https://github.com/cjohnhanson/gaff
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then build and test tundish:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
git clone https://github.com/cjohnhanson/tundish
|
|
29
|
+
cd tundish
|
|
30
|
+
cargo build
|
|
31
|
+
cargo test --workspace --all-features
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The missouri setup builds tundish and copies the binary into the suite's
|
|
35
|
+
command directory. Its wrapper sets database and config paths inside
|
|
36
|
+
each state directory.
|
|
37
|
+
|
|
38
|
+
## Before a large change
|
|
39
|
+
|
|
40
|
+
Open a GitHub issue first. A small fix needs none.
|
|
41
|
+
|
|
42
|
+
## What CI checks
|
|
43
|
+
|
|
44
|
+
For an outside contribution, open the pull request and stop there. The
|
|
45
|
+
maintainer records the required sign-off note on its head commit.
|
|
46
|
+
|
|
47
|
+
Three workflows check a change, and `release.yml` publishes a tag.
|
|
48
|
+
`verify` runs on every push. `gate` runs on pull requests and invokes
|
|
49
|
+
the local gates through `gaff ci`. `review-gate` checks the pull request's
|
|
50
|
+
sign-off note under the base branch's policy. It reads no code from the
|
|
51
|
+
pull request, so the branch cannot weaken that policy for itself.
|
|
52
|
+
|
|
53
|
+
The local commit gate checks formatting and clippy. It first refuses
|
|
54
|
+
unstaged Rust changes, so the checked files match the index. The merge
|
|
55
|
+
gate runs the Rust tests, Python tests, and missouri suite, then checks
|
|
56
|
+
the sign-off note. `verify` runs the same formatting, clippy, and test
|
|
57
|
+
commands:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
cargo fmt --all --check
|
|
61
|
+
cargo clippy --workspace --all-targets --all-features -- -D warnings
|
|
62
|
+
cargo test --workspace --all-features
|
|
63
|
+
uv run --isolated --with pytest pytest -q tests/python
|
|
64
|
+
cd tests/missouri && missouri run
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The missouri suite covers publishing through argv and stdin, pulling,
|
|
68
|
+
acks and competing acks, inspection commands, and delivery intervals.
|
|
69
|
+
The merge gate requires at least one passing path and no failures.
|
|
70
|
+
CI sets `MISSOURI_SANDBOX=preinstalled` for this suite.
|
|
71
|
+
|
|
72
|
+
The merge gate checks that every required sign-off has vendored criteria
|
|
73
|
+
and that every vendored criterion is required. `.gaff/gaff.yml`
|
|
74
|
+
names `review-tests`, `review-docs`, `review-code`, `review-deps`, and
|
|
75
|
+
`review-usability`. `gaff reviews` prints the list.
|
|
76
|
+
|
|
77
|
+
Each sign-off line names the criteria, verdict, commit, and evidence:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
signoff[review-tests] PASS <sha> <evidence>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Put every line in one git note on that commit:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
git notes --ref=reviews add -m '<the lines>' <sha>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`.agents/skills/signoff-driver/SKILL.md` has the procedure.
|
|
90
|
+
|
|
91
|
+
The checks read the note on the branch head, not GitHub's synthetic merge
|
|
92
|
+
commit. `gaff reviews check` refuses a missing sign-off, a `FAIL` verdict,
|
|
93
|
+
a line naming another commit, or two lines for one criterion. A sha must
|
|
94
|
+
have at least seven characters. Evidence must have at least three words.
|
|
95
|
+
Prose around the sign-off lines is ignored.
|
|
96
|
+
|
|
97
|
+
## Running the gates locally
|
|
98
|
+
|
|
99
|
+
`.gaff/gaff.yml` declares the gates. `gaff init --github` generates the
|
|
100
|
+
`verify` and `gate` workflows; `gaff init --git` installs the local git
|
|
101
|
+
hooks. To run the gates against `HEAD` without making a commit:
|
|
102
|
+
|
|
103
|
+
```sh
|
|
104
|
+
gaff ci
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The pre-push hook refuses a push without the required sign-off note. For a
|
|
108
|
+
one-off contribution, leave the hooks uninstalled and let CI run on the
|
|
109
|
+
pull request. The local test commands read the working tree; the sign-off
|
|
110
|
+
note names the pushed commit.
|
|
111
|
+
|
|
112
|
+
## Pull requests
|
|
113
|
+
|
|
114
|
+
Branch from `main` and open the pull request from a fork. Keep a change
|
|
115
|
+
and its tests in one pull request. Write the commit message in the
|
|
116
|
+
imperative present. State what the change does and, where the diff does
|
|
117
|
+
not show it, why.
|
|
118
|
+
|
|
119
|
+
## Releases
|
|
120
|
+
|
|
121
|
+
Before a tag, run `sh scripts/prepublish.sh` from the repository root.
|
|
122
|
+
It needs `cargo-hack`, `cargo-audit`, `python3`, `curl`, and `rustup`
|
|
123
|
+
with the toolchain pinned in `rust-toolchain.toml`. The test prerequisites
|
|
124
|
+
above apply here too. It checks each feature and the feature powerset,
|
|
125
|
+
runs tests, clippy, and fmt, and audits the lockfile. It also runs a
|
|
126
|
+
publish dry run from an archive of `HEAD` and checks that the version
|
|
127
|
+
is absent from crates.io.
|
|
128
|
+
|
|
129
|
+
The release workflow needs `NPM_TOKEN` to publish npm packages and
|
|
130
|
+
`HOMEBREW_TAP_TOKEN` to update the tap.
|
|
131
|
+
|
|
132
|
+
Bump the version in `Cargo.toml`, commit it on `main`, tag `v<version>`,
|
|
133
|
+
and push the tag. The workflow checks that the tag is on `main` and
|
|
134
|
+
matches the manifest. It runs the Rust checks, the missouri suite, and
|
|
135
|
+
`cargo package --locked` before building the archives, wheels, source
|
|
136
|
+
distribution, npm packages, and Debian packages.
|
|
137
|
+
|
|
138
|
+
Registry publishing runs in order: crates.io, PyPI, then npm. The GitHub
|
|
139
|
+
release stays a draft until its required jobs pass. The Homebrew formula
|
|
140
|
+
updates after the release becomes public. A `workflow_dispatch` run
|
|
141
|
+
rehearses the builds without publishing a release or registry package.
|
|
142
|
+
|
|
143
|
+
## What not to commit
|
|
144
|
+
|
|
145
|
+
`.gitignore` covers `target/`, `dist/`, generated npm platform packages,
|
|
146
|
+
editor and agent state, and `.cargo/config.toml`. Do not commit local
|
|
147
|
+
databases or service tokens. An absolute home-directory path exposes an
|
|
148
|
+
account name and breaks other clones. Keep local dependency overrides
|
|
149
|
+
in `.cargo/config.toml`, not `Cargo.toml`.
|
|
150
|
+
|
|
151
|
+
## Questions
|
|
152
|
+
|
|
153
|
+
Open a GitHub issue.
|
|
154
|
+
|
|
155
|
+
## Security
|
|
156
|
+
|
|
157
|
+
Do not open a public issue for a vulnerability. See
|
|
158
|
+
[SECURITY.md](SECURITY.md).
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
|
|
162
|
+
Contributions are licensed under MIT, the same as the project.
|