ripplediff 0.5.0__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.
- ripplediff-0.5.0/.github/CODEOWNERS +2 -0
- ripplediff-0.5.0/.github/FUNDING.yml +2 -0
- ripplediff-0.5.0/.github/ISSUE_TEMPLATE/bug_report.md +18 -0
- ripplediff-0.5.0/.github/ISSUE_TEMPLATE/feature_request.md +12 -0
- ripplediff-0.5.0/.github/dependabot.yml +29 -0
- ripplediff-0.5.0/.github/pull_request_template.md +11 -0
- ripplediff-0.5.0/.github/workflows/ci.yml +87 -0
- ripplediff-0.5.0/.github/workflows/release.yml +187 -0
- ripplediff-0.5.0/.gitignore +8 -0
- ripplediff-0.5.0/CHANGELOG.md +43 -0
- ripplediff-0.5.0/CODE_OF_CONDUCT.md +7 -0
- ripplediff-0.5.0/CONTRIBUTING.md +30 -0
- ripplediff-0.5.0/Cargo.lock +1462 -0
- ripplediff-0.5.0/Cargo.toml +53 -0
- ripplediff-0.5.0/LICENSE +202 -0
- ripplediff-0.5.0/NOTICE +25 -0
- ripplediff-0.5.0/PKG-INFO +129 -0
- ripplediff-0.5.0/README.md +94 -0
- ripplediff-0.5.0/SECURITY.md +23 -0
- ripplediff-0.5.0/assets/report/app.css +2 -0
- ripplediff-0.5.0/assets/report/app.js +47 -0
- ripplediff-0.5.0/assets/report/simulator.wasm +0 -0
- ripplediff-0.5.0/deny.toml +31 -0
- ripplediff-0.5.0/docs/BACKLOG.md +73 -0
- ripplediff-0.5.0/docs/NAMING.md +14 -0
- ripplediff-0.5.0/docs/OPEN_SOURCE.md +17 -0
- ripplediff-0.5.0/docs/PILOT.md +161 -0
- ripplediff-0.5.0/docs/RELEASING.md +61 -0
- ripplediff-0.5.0/docs/REPORT_GUIDE.md +29 -0
- ripplediff-0.5.0/docs/ROADMAP.md +35 -0
- ripplediff-0.5.0/docs/SDD.md +549 -0
- ripplediff-0.5.0/docs/SIMULATION.md +109 -0
- ripplediff-0.5.0/docs/TEST_PLAN.md +37 -0
- ripplediff-0.5.0/docs/THIRD_PARTY_REPORT.md +31 -0
- ripplediff-0.5.0/docs/adr/0001-engine-selection.md +41 -0
- ripplediff-0.5.0/docs/adr/0002-simulation-runtime.md +46 -0
- ripplediff-0.5.0/docs/adr/0003-stable-node-ids.md +77 -0
- ripplediff-0.5.0/docs/adr/README.md +3 -0
- ripplediff-0.5.0/docs/images/overview-annotated.png +0 -0
- ripplediff-0.5.0/docs/images/report-annotated.png +0 -0
- ripplediff-0.5.0/docs/schema/analysis.schema.json +1724 -0
- ripplediff-0.5.0/docs/schema/scenario.schema.json +259 -0
- ripplediff-0.5.0/examples/ci/Jenkinsfile +28 -0
- ripplediff-0.5.0/examples/ci/github-actions.yml +67 -0
- ripplediff-0.5.0/fixtures/checkout/after/shop/__init__.py +0 -0
- ripplediff-0.5.0/fixtures/checkout/after/shop/api.py +6 -0
- ripplediff-0.5.0/fixtures/checkout/after/shop/audit.py +6 -0
- ripplediff-0.5.0/fixtures/checkout/after/shop/external.py +2 -0
- ripplediff-0.5.0/fixtures/checkout/after/shop/orders.py +15 -0
- ripplediff-0.5.0/fixtures/checkout/after/shop/other.py +6 -0
- ripplediff-0.5.0/fixtures/checkout/after/shop/pricing.py +2 -0
- ripplediff-0.5.0/fixtures/checkout/before/shop/__init__.py +0 -0
- ripplediff-0.5.0/fixtures/checkout/before/shop/api.py +6 -0
- ripplediff-0.5.0/fixtures/checkout/before/shop/audit.py +6 -0
- ripplediff-0.5.0/fixtures/checkout/before/shop/external.py +2 -0
- ripplediff-0.5.0/fixtures/checkout/before/shop/orders.py +15 -0
- ripplediff-0.5.0/fixtures/checkout/before/shop/other.py +6 -0
- ripplediff-0.5.0/fixtures/checkout/before/shop/pricing.py +2 -0
- ripplediff-0.5.0/fixtures/checkout/check_oracle.py +28 -0
- ripplediff-0.5.0/fixtures/checkout/expected.json +40 -0
- ripplediff-0.5.0/fixtures/checkout/make_repo.sh +22 -0
- ripplediff-0.5.0/fixtures/checkout/scenarios/discount-10.json +7 -0
- ripplediff-0.5.0/fixtures/checkout/scenarios/discount-25.json +7 -0
- ripplediff-0.5.0/fixtures/checkout/scenarios/discount-30.json +7 -0
- ripplediff-0.5.0/fixtures/checkout/scenarios/discount-40.json +7 -0
- ripplediff-0.5.0/fixtures/orders/after/shop3/__init__.py +1 -0
- ripplediff-0.5.0/fixtures/orders/after/shop3/api.py +37 -0
- ripplediff-0.5.0/fixtures/orders/after/shop3/models.py +24 -0
- ripplediff-0.5.0/fixtures/orders/after/shop3/rules.py +7 -0
- ripplediff-0.5.0/fixtures/orders/before/shop3/__init__.py +1 -0
- ripplediff-0.5.0/fixtures/orders/before/shop3/api.py +37 -0
- ripplediff-0.5.0/fixtures/orders/before/shop3/models.py +24 -0
- ripplediff-0.5.0/fixtures/orders/before/shop3/rules.py +7 -0
- ripplediff-0.5.0/fixtures/orders/check_oracle.py +47 -0
- ripplediff-0.5.0/fixtures/orders/make_repo.sh +20 -0
- ripplediff-0.5.0/fixtures/orders/scenarios/shipped-web.json +6 -0
- ripplediff-0.5.0/fixtures/pipeline/after/shop2/__init__.py +0 -0
- ripplediff-0.5.0/fixtures/pipeline/after/shop2/api.py +12 -0
- ripplediff-0.5.0/fixtures/pipeline/after/shop2/discounts.py +10 -0
- ripplediff-0.5.0/fixtures/pipeline/after/shop2/limits.py +4 -0
- ripplediff-0.5.0/fixtures/pipeline/after/shop2/pricing.py +2 -0
- ripplediff-0.5.0/fixtures/pipeline/after/shop2/reports.py +5 -0
- ripplediff-0.5.0/fixtures/pipeline/before/shop2/__init__.py +0 -0
- ripplediff-0.5.0/fixtures/pipeline/before/shop2/api.py +12 -0
- ripplediff-0.5.0/fixtures/pipeline/before/shop2/discounts.py +10 -0
- ripplediff-0.5.0/fixtures/pipeline/before/shop2/limits.py +4 -0
- ripplediff-0.5.0/fixtures/pipeline/before/shop2/pricing.py +2 -0
- ripplediff-0.5.0/fixtures/pipeline/before/shop2/reports.py +5 -0
- ripplediff-0.5.0/fixtures/pipeline/check_oracle.py +25 -0
- ripplediff-0.5.0/fixtures/pipeline/make_repo.sh +20 -0
- ripplediff-0.5.0/fixtures/pipeline/scenarios/qty-10.json +6 -0
- ripplediff-0.5.0/fixtures/pipeline/scenarios/qty-11.json +6 -0
- ripplediff-0.5.0/frontend/package-lock.json +1162 -0
- ripplediff-0.5.0/frontend/package.json +22 -0
- ripplediff-0.5.0/frontend/src/App.jsx +348 -0
- ripplediff-0.5.0/frontend/src/Explore.jsx +262 -0
- ripplediff-0.5.0/frontend/src/Graph.jsx +203 -0
- ripplediff-0.5.0/frontend/src/Inspector.jsx +115 -0
- ripplediff-0.5.0/frontend/src/Scenarios.jsx +334 -0
- ripplediff-0.5.0/frontend/src/data.js +175 -0
- ripplediff-0.5.0/frontend/src/main.jsx +11 -0
- ripplediff-0.5.0/frontend/src/sim.js +110 -0
- ripplediff-0.5.0/frontend/src/styles.css +172 -0
- ripplediff-0.5.0/frontend/src/values.js +180 -0
- ripplediff-0.5.0/frontend/vite.config.js +22 -0
- ripplediff-0.5.0/prototype/report.html +16 -0
- ripplediff-0.5.0/pyproject.toml +60 -0
- ripplediff-0.5.0/rust-toolchain.toml +5 -0
- ripplediff-0.5.0/scripts/build-report-assets.sh +28 -0
- ripplediff-0.5.0/src/analysis/change_sets.rs +177 -0
- ripplediff-0.5.0/src/analysis/mod.rs +154 -0
- ripplediff-0.5.0/src/analysis/value.rs +174 -0
- ripplediff-0.5.0/src/cli.rs +989 -0
- ripplediff-0.5.0/src/diff/mod.rs +198 -0
- ripplediff-0.5.0/src/error.rs +13 -0
- ripplediff-0.5.0/src/git/mod.rs +236 -0
- ripplediff-0.5.0/src/languages/mod.rs +5 -0
- ripplediff-0.5.0/src/languages/python/bundle.rs +385 -0
- ripplediff-0.5.0/src/languages/python/dates.rs +412 -0
- ripplediff-0.5.0/src/languages/python/decimal.rs +615 -0
- ripplediff-0.5.0/src/languages/python/enums.rs +1427 -0
- ripplediff-0.5.0/src/languages/python/eval.rs +5220 -0
- ripplediff-0.5.0/src/languages/python/flow.rs +894 -0
- ripplediff-0.5.0/src/languages/python/mod.rs +1294 -0
- ripplediff-0.5.0/src/languages/python/paths.rs +244 -0
- ripplediff-0.5.0/src/languages/python/value.rs +3461 -0
- ripplediff-0.5.0/src/lib.rs +24 -0
- ripplediff-0.5.0/src/main.rs +6 -0
- ripplediff-0.5.0/src/model/mod.rs +607 -0
- ripplediff-0.5.0/src/report/html.rs +142 -0
- ripplediff-0.5.0/src/report/markdown.rs +330 -0
- ripplediff-0.5.0/src/report/mod.rs +70 -0
- ripplediff-0.5.0/src/simulation/explore.rs +1849 -0
- ripplediff-0.5.0/src/simulation/mod.rs +1122 -0
- ripplediff-0.5.0/tests/cli.rs +3811 -0
- ripplediff-0.5.0/tests/e2e/report.e2e.mjs +270 -0
- ripplediff-0.5.0/tests/report.rs +233 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Wrong result, crash or confusing output
|
|
4
|
+
labels: bug
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**What happened**
|
|
8
|
+
|
|
9
|
+
**What you expected**
|
|
10
|
+
|
|
11
|
+
**How to reproduce**
|
|
12
|
+
A minimal synthetic Python example (two versions) is ideal. Do not paste private code or reports of private repositories.
|
|
13
|
+
|
|
14
|
+
**Version**
|
|
15
|
+
Output of `ripplediff --version`, OS, and how it was installed.
|
|
16
|
+
|
|
17
|
+
**Report excerpt**
|
|
18
|
+
The relevant part of `analysis.json` or `summary.md`, with anything private removed.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Dependency update pull requests. Nothing merges without the maintainer.
|
|
2
|
+
#
|
|
3
|
+
# - Version updates run on the schedule below, grouped into one pull request
|
|
4
|
+
# per ecosystem, so there are at most a couple of pull requests a month.
|
|
5
|
+
# - Security updates (Settings -> Code security -> Dependabot security
|
|
6
|
+
# updates) open a pull request as soon as an advisory affects a dependency,
|
|
7
|
+
# independent of this schedule.
|
|
8
|
+
version: 2
|
|
9
|
+
updates:
|
|
10
|
+
- package-ecosystem: github-actions
|
|
11
|
+
directory: /
|
|
12
|
+
schedule:
|
|
13
|
+
interval: monthly
|
|
14
|
+
groups:
|
|
15
|
+
actions:
|
|
16
|
+
patterns: ["*"]
|
|
17
|
+
|
|
18
|
+
- package-ecosystem: cargo
|
|
19
|
+
directory: /
|
|
20
|
+
schedule:
|
|
21
|
+
interval: monthly
|
|
22
|
+
open-pull-requests-limit: 5
|
|
23
|
+
groups:
|
|
24
|
+
cargo-minor:
|
|
25
|
+
update-types: [minor, patch]
|
|
26
|
+
ignore:
|
|
27
|
+
# The Ruff parser crates must match the version PyCG pins (ADR 0001);
|
|
28
|
+
# they move together with a PyCG update, by hand.
|
|
29
|
+
- dependency-name: "ruff_*"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## What changes
|
|
2
|
+
|
|
3
|
+
## How it is tested
|
|
4
|
+
<!-- A test that fails before and passes after. For simulation semantics, CPython differential probes. -->
|
|
5
|
+
|
|
6
|
+
## Checklist
|
|
7
|
+
- [ ] `cargo fmt --check`, `cargo clippy` (default and `--no-default-features`) and `cargo test` pass
|
|
8
|
+
- [ ] Schema files updated if `analysis.json` or scenario files change
|
|
9
|
+
- [ ] `scripts/build-report-assets.sh` run if the frontend, wasm or evaluator changed
|
|
10
|
+
- [ ] New dependencies are on the `deny.toml` allowlist
|
|
11
|
+
- [ ] No private code, tokens or reports
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
timeout-minutes: 45
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
17
|
+
with:
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
|
|
20
|
+
- name: Rust toolchain (from rust-toolchain.toml)
|
|
21
|
+
run: rustup show active-toolchain || rustup toolchain install
|
|
22
|
+
|
|
23
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
24
|
+
with:
|
|
25
|
+
# The evaluator follows CPython 3.13 (for example int terms in a
|
|
26
|
+
# float sum are added without compensation); the oracle tests
|
|
27
|
+
# compare against it.
|
|
28
|
+
python-version: "3.13"
|
|
29
|
+
|
|
30
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
31
|
+
with:
|
|
32
|
+
node-version: 22
|
|
33
|
+
|
|
34
|
+
- name: Playwright for the browser test
|
|
35
|
+
run: |
|
|
36
|
+
npm install -g playwright@1
|
|
37
|
+
npx playwright install --with-deps chromium
|
|
38
|
+
echo "NODE_PATH=$(npm root -g)" >> "$GITHUB_ENV"
|
|
39
|
+
|
|
40
|
+
- name: Format and lint
|
|
41
|
+
run: |
|
|
42
|
+
cargo fmt --check
|
|
43
|
+
cargo clippy --all-targets --locked -- -D warnings
|
|
44
|
+
cargo clippy --lib --no-default-features --locked -- -D warnings
|
|
45
|
+
|
|
46
|
+
- name: Tests
|
|
47
|
+
run: cargo test --locked
|
|
48
|
+
|
|
49
|
+
- name: Dependency licenses and sources
|
|
50
|
+
uses: EmbarkStudios/cargo-deny-action@bb119f768ea239e765aeaef5769558d4f21213aa # v2.1.5
|
|
51
|
+
with:
|
|
52
|
+
command: check licenses bans sources
|
|
53
|
+
|
|
54
|
+
- name: Report assets are up to date
|
|
55
|
+
run: |
|
|
56
|
+
rustup target add wasm32-unknown-unknown
|
|
57
|
+
scripts/build-report-assets.sh
|
|
58
|
+
git diff --exit-code -- assets/report
|
|
59
|
+
|
|
60
|
+
coverage:
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
timeout-minutes: 45
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
65
|
+
with:
|
|
66
|
+
persist-credentials: false
|
|
67
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
68
|
+
with:
|
|
69
|
+
# The evaluator follows CPython 3.13 (for example int terms in a
|
|
70
|
+
# float sum are added without compensation); the oracle tests
|
|
71
|
+
# compare against it.
|
|
72
|
+
python-version: "3.13"
|
|
73
|
+
|
|
74
|
+
- name: Rust toolchain and coverage tools
|
|
75
|
+
run: |
|
|
76
|
+
rustup show active-toolchain || rustup toolchain install
|
|
77
|
+
rustup component add llvm-tools-preview
|
|
78
|
+
cargo install cargo-llvm-cov --version 0.9.2 --locked
|
|
79
|
+
- name: Line coverage
|
|
80
|
+
run: |
|
|
81
|
+
cargo llvm-cov --locked --summary-only | tee coverage.txt
|
|
82
|
+
{
|
|
83
|
+
echo '### Line coverage'
|
|
84
|
+
echo '```'
|
|
85
|
+
cat coverage.txt
|
|
86
|
+
echo '```'
|
|
87
|
+
} >> "$GITHUB_STEP_SUMMARY"
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Release: pushing a tag `vX.Y.Z` builds wheels for every platform and an
|
|
2
|
+
# sdist, smoke-tests each wheel, publishes them to PyPI with trusted
|
|
3
|
+
# publishing (OIDC, no stored token) and creates the GitHub release. The tag
|
|
4
|
+
# must match the version in Cargo.toml. The `pypi` environment can require a
|
|
5
|
+
# maintainer's approval before upload (docs/RELEASING.md). Started by hand,
|
|
6
|
+
# the workflow only builds, unless `publish` is checked.
|
|
7
|
+
name: Release
|
|
8
|
+
|
|
9
|
+
on:
|
|
10
|
+
push:
|
|
11
|
+
tags: ["v*"]
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
inputs:
|
|
14
|
+
publish:
|
|
15
|
+
description: "Publish the built distributions to PyPI (needs approval of the pypi environment)"
|
|
16
|
+
type: boolean
|
|
17
|
+
default: false
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
check-version:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
timeout-minutes: 5
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
28
|
+
with:
|
|
29
|
+
persist-credentials: false
|
|
30
|
+
- name: The tag matches Cargo.toml
|
|
31
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
32
|
+
run: |
|
|
33
|
+
version=$(sed -n 's/^version = "\(.*\)"$/\1/p' Cargo.toml | head -1)
|
|
34
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
35
|
+
echo "Cargo.toml: $version, tag: $tag"
|
|
36
|
+
test "$version" = "$tag"
|
|
37
|
+
|
|
38
|
+
wheels:
|
|
39
|
+
needs: check-version
|
|
40
|
+
strategy:
|
|
41
|
+
fail-fast: false
|
|
42
|
+
matrix:
|
|
43
|
+
include:
|
|
44
|
+
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu, manylinux: "2_28" }
|
|
45
|
+
- { os: ubuntu-24.04-arm, target: aarch64-unknown-linux-gnu, manylinux: "2_28" }
|
|
46
|
+
- { os: macos-15-intel, target: x86_64-apple-darwin }
|
|
47
|
+
# macOS arm64 runners are often unavailable (GitHub capacity):
|
|
48
|
+
# cross-compile on Intel and check the binary instead of running it.
|
|
49
|
+
- { os: macos-15-intel, target: aarch64-apple-darwin, cross: true }
|
|
50
|
+
- { os: windows-latest, target: x86_64-pc-windows-msvc }
|
|
51
|
+
runs-on: ${{ matrix.os }}
|
|
52
|
+
timeout-minutes: 60
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
55
|
+
with:
|
|
56
|
+
persist-credentials: false
|
|
57
|
+
# PyCG (a git dependency) has test fixtures with very long paths, which
|
|
58
|
+
# exceed Windows' 260-character limit inside Cargo's git checkout.
|
|
59
|
+
- name: Allow long paths on Windows
|
|
60
|
+
if: runner.os == 'Windows'
|
|
61
|
+
shell: bash
|
|
62
|
+
run: |
|
|
63
|
+
git config --global core.longpaths true
|
|
64
|
+
# A short Cargo home leaves more room for the fixture paths.
|
|
65
|
+
echo "CARGO_HOME=C:\\ch" >> "$GITHUB_ENV"
|
|
66
|
+
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" >> "$GITHUB_ENV"
|
|
67
|
+
- name: Build wheel
|
|
68
|
+
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
69
|
+
with:
|
|
70
|
+
target: ${{ matrix.target }}
|
|
71
|
+
manylinux: ${{ matrix.manylinux || 'auto' }}
|
|
72
|
+
args: --release --locked --out dist
|
|
73
|
+
env:
|
|
74
|
+
# Keep local paths out of the binary.
|
|
75
|
+
RUSTFLAGS: --remap-path-prefix=${{ github.workspace }}=/ripplediff
|
|
76
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
77
|
+
with:
|
|
78
|
+
python-version: "3.12"
|
|
79
|
+
- name: Check the cross-compiled wheel
|
|
80
|
+
if: ${{ matrix.cross }}
|
|
81
|
+
shell: bash
|
|
82
|
+
run: |
|
|
83
|
+
ls dist
|
|
84
|
+
wheel=$(ls dist/*.whl)
|
|
85
|
+
case "$wheel" in *arm64*) ;; *) echo "not an arm64 wheel: $wheel"; exit 1 ;; esac
|
|
86
|
+
mkdir unpacked && cd unpacked && unzip -q "../$wheel"
|
|
87
|
+
bin=$(find . -path '*scripts/ripplediff' -type f)
|
|
88
|
+
lipo -archs "$bin" | tee /dev/stderr | grep -qx arm64
|
|
89
|
+
- name: Smoke test in a clean environment
|
|
90
|
+
if: ${{ !matrix.cross }}
|
|
91
|
+
shell: bash
|
|
92
|
+
run: |
|
|
93
|
+
python -m venv smoke
|
|
94
|
+
if [ -f smoke/bin/activate ]; then . smoke/bin/activate; else . smoke/Scripts/activate; fi
|
|
95
|
+
pip install --no-index --find-links dist ripplediff
|
|
96
|
+
ripplediff --version
|
|
97
|
+
ripplediff analyze --help > /dev/null
|
|
98
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
99
|
+
with:
|
|
100
|
+
name: wheel-${{ matrix.target }}
|
|
101
|
+
path: dist/*.whl
|
|
102
|
+
retention-days: 30
|
|
103
|
+
|
|
104
|
+
sdist:
|
|
105
|
+
needs: check-version
|
|
106
|
+
runs-on: ubuntu-latest
|
|
107
|
+
timeout-minutes: 20
|
|
108
|
+
steps:
|
|
109
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
110
|
+
with:
|
|
111
|
+
persist-credentials: false
|
|
112
|
+
- name: Build sdist
|
|
113
|
+
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
114
|
+
with:
|
|
115
|
+
command: sdist
|
|
116
|
+
args: --out dist
|
|
117
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
118
|
+
with:
|
|
119
|
+
name: sdist
|
|
120
|
+
path: dist/*.tar.gz
|
|
121
|
+
retention-days: 30
|
|
122
|
+
|
|
123
|
+
publish:
|
|
124
|
+
if: ${{ startsWith(github.ref, 'refs/tags/v') || inputs.publish }}
|
|
125
|
+
needs: [wheels, sdist]
|
|
126
|
+
runs-on: ubuntu-latest
|
|
127
|
+
timeout-minutes: 15
|
|
128
|
+
# Configure this environment with required reviewers, and register this
|
|
129
|
+
# workflow as a trusted publisher of the project on PyPI.
|
|
130
|
+
environment:
|
|
131
|
+
name: pypi
|
|
132
|
+
url: https://pypi.org/project/ripplediff/
|
|
133
|
+
permissions:
|
|
134
|
+
id-token: write
|
|
135
|
+
actions: read
|
|
136
|
+
steps:
|
|
137
|
+
- name: Download this run's distributions
|
|
138
|
+
env:
|
|
139
|
+
GH_TOKEN: ${{ github.token }}
|
|
140
|
+
run: |
|
|
141
|
+
gh run download "${{ github.run_id }}" --repo "${{ github.repository }}" --dir artifacts
|
|
142
|
+
mkdir dist
|
|
143
|
+
find artifacts -type f \( -name '*.whl' -o -name '*.tar.gz' \) -exec mv {} dist/ \;
|
|
144
|
+
ls -l dist
|
|
145
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
146
|
+
with:
|
|
147
|
+
python-version: "3.12"
|
|
148
|
+
- name: Check and publish
|
|
149
|
+
run: |
|
|
150
|
+
python -m pip install "twine==7.0.0" "uv==0.13.10"
|
|
151
|
+
python -m twine check --strict dist/*
|
|
152
|
+
uv publish --trusted-publishing always dist/*
|
|
153
|
+
|
|
154
|
+
github-release:
|
|
155
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
156
|
+
needs: publish
|
|
157
|
+
runs-on: ubuntu-latest
|
|
158
|
+
timeout-minutes: 10
|
|
159
|
+
permissions:
|
|
160
|
+
contents: write
|
|
161
|
+
actions: read
|
|
162
|
+
steps:
|
|
163
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
164
|
+
with:
|
|
165
|
+
persist-credentials: false
|
|
166
|
+
- name: Create the GitHub release with the distributions
|
|
167
|
+
env:
|
|
168
|
+
GH_TOKEN: ${{ github.token }}
|
|
169
|
+
run: |
|
|
170
|
+
gh run download "${{ github.run_id }}" --repo "${{ github.repository }}" --dir artifacts
|
|
171
|
+
mkdir dist
|
|
172
|
+
find artifacts -type f \( -name '*.whl' -o -name '*.tar.gz' \) -exec mv {} dist/ \;
|
|
173
|
+
version="${GITHUB_REF_NAME#v}"
|
|
174
|
+
# The changelog section of this version, up to the next heading.
|
|
175
|
+
awk -v v="$version" '$0 ~ "^## "v"( |$)" {on=1; next} /^## / && on {exit} on' CHANGELOG.md > notes.md
|
|
176
|
+
# The tag may come from a release published on the website: then
|
|
177
|
+
# attach the files to it (keeping its notes if it has any).
|
|
178
|
+
if gh release view "$GITHUB_REF_NAME" --repo "${{ github.repository }}" > /dev/null 2>&1; then
|
|
179
|
+
gh release upload "$GITHUB_REF_NAME" dist/* --repo "${{ github.repository }}" --clobber
|
|
180
|
+
body=$(gh release view "$GITHUB_REF_NAME" --repo "${{ github.repository }}" --json body --jq .body)
|
|
181
|
+
if [ -z "$body" ]; then
|
|
182
|
+
gh release edit "$GITHUB_REF_NAME" --repo "${{ github.repository }}" --notes-file notes.md
|
|
183
|
+
fi
|
|
184
|
+
else
|
|
185
|
+
gh release create "$GITHUB_REF_NAME" dist/* --repo "${{ github.repository }}" \
|
|
186
|
+
--title "RippleDiff $version" --notes-file notes.md --verify-tag
|
|
187
|
+
fi
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes are listed here. Versions before 1.0 are development milestones; nothing has been published to a package registry yet.
|
|
4
|
+
|
|
5
|
+
## 0.5.0
|
|
6
|
+
|
|
7
|
+
- Release preparation: README rewritten as the PyPI description (badges, install, quick start, absolute links), `docs/SIMULATION.md` (the simulation subset), `docs/RELEASING.md`; PyPI metadata (classifiers, project URLs); the release workflow builds an sdist and can publish to PyPI with trusted publishing after approval of the `pypi` environment; a CI job reports line coverage (77%).
|
|
8
|
+
- More of Python, checked against CPython (a 26-case battery): `str.format`, `format()` and the format spec mini-language, bitwise operators, `divmod`, `reversed`, `int(s, base)`, `round` with negative ndigits, more list/dict/tuple/str methods, starred assignment, caught exception objects (`str(e)`, `type(e).__name__`, `raise e`).
|
|
9
|
+
- Third pilot (10 projects, 20 pull requests, docs/PILOT.md). Fixed: stale container state could give wrong known values (now unknown), nested function defaults, a stack overflow on objects that refer to each other, false differences for renamed functions and for runs that stop at an unknown value; exploration skips tests, examples and functions present in one version, explores changed functions first, has a step budget, and stubs calls into project code whose result is unknown (the real call stays an option). The report shows exploration right after the graph, explains how values are chosen, lets the reviewer pick 64, 256 or 1024 cases per function, and escapes results that print alike but differ.
|
|
10
|
+
- Second pilot (semver, dateutil, requests; 13 pull requests, docs/PILOT.md): methods as exploration entries and `{"new": ...}` scenario objects, lambdas, `functools.partial`, `slice`/`filter`/`map`/key functions, `assert`/`del`/`with`, computed class constants, type aliases; exploration no longer stubs unmodeled builtins, and error changes compare exception types.
|
|
11
|
+
- First pilot on open-source code (docs/PILOT.md): humanize PR #173's regression is found by exploration alone. Added along the way: `try`/`except`/`else`/`finally`, imports inside functions, `Enum[name]` and Enum ordering via `total_ordering`/`__lt__`, float `//` and `%`, `%`-formatting, gettext without a locale (noted as an assumption), `math` functions and constants, `isinstance` with datetime/decimal types, union and string type aliases in exploration, sub-day negative timedeltas as candidates; exploration covers only changed functions, their callers and callees. Checked against CPython (26 cases).
|
|
12
|
+
- `decimal.Decimal` (28-digit default context, CPython exponent rules, `quantize` with all rounding modes) and naive `date`, `datetime`, `timedelta`; constants of these types; scenario values, exploration candidates (boundaries from constants and offsets) and clock calls as stub dimensions; editor fields. Checked against CPython (25 cases). New dependencies: `num-bigint`, `num-integer`, `num-traits` (MIT/Apache-2.0).
|
|
13
|
+
- Objects: dataclasses, NamedTuples and plain classes (constructors, attributes, methods, properties, class constants, inheritance, `isinstance`), scenario objects `{"object": ..., "fields": ...}`, exploration of record parameters field by field, and object fields in the report editor; slice bundles include the methods of classes a function names. Checked against CPython (21 cases).
|
|
14
|
+
- Lists, tuples, dicts, ranges, `for`/`while` loops, comprehensions and the common builtins and methods on them, with Python aliasing; container module constants; container scenario values (JSON arrays, objects, `{"tuple": ...}`, `{"dict": ...}`), exploration of `list[T]`, `tuple[...]`, `dict[K, V]`, and JSON fields in the report editor. Checked against CPython 3.13 (30 cases). One list of simulated calls is shared by exploration and the report.
|
|
15
|
+
- `int()`, `float()`, `bool()`, `round()` (with ndigits), f-strings (`!s`, `!r`, specs `d` and `.Nf`) and `Literal[...]` annotations in exploration; checked against CPython.
|
|
16
|
+
- Module constants: top-level names assigned once to constant expressions are known values in simulation (also through imports) and boundaries in exploration; reassigned, `global` or deleted names stay unknown, as do locals read before assignment.
|
|
17
|
+
- `str` values and Enum members in the evaluator, scenarios, exploration and the report editor: comparisons, `is`, `in`, `len`, `str`, ASCII str methods; Enum classes, members (`auto()`, aliases), `.name`, `.value` and `Class(value)` resolved through imports without running code. Checked against CPython (31 cases). Typed values gain `text` (str) and `symbol` (Enum member). New fixture `fixtures/orders/` (an Enum condition widened in a helper).
|
|
18
|
+
- Input exploration: `analyze --explore` (and the report button "Explore all functions") generates values for every function of a change set (boundary numbers from the code and their neighbours, defaults, stub values), runs each case on both versions and lists the cases where the output, a branch or an exception differs, with the input values that trigger them. Schema 0.5 adds `explorations`; `--explore-cases <n>` caps cases per function (default 64).
|
|
19
|
+
- Callees in `impacts`: functions after the changed one that receive the changed value; value flow now starts from every changed node, not only returns.
|
|
20
|
+
- Pipeline fixture: a change in the middle of a call chain (`fixtures/pipeline/`, checked against CPython by `check_oracle.py`).
|
|
21
|
+
- `summary.md`: compact Markdown with one section per change set and small sanitized Mermaid diagrams, for pull request comments and CI job summaries; `--artifact-url` links the report.
|
|
22
|
+
- `--strict`: exit code 5 when the analysis is partial (reports are still written).
|
|
23
|
+
- CI examples for GitHub Actions and Jenkins (`examples/ci/`); repository CI and a manual release build workflow (no publishing).
|
|
24
|
+
- Python wheels with Maturin (`bindings = "bin"`), with LICENSE, NOTICE and a CycloneDX SBOM.
|
|
25
|
+
- Reproducible report assets without local paths.
|
|
26
|
+
- Copyright holder recorded in NOTICE and package metadata: Yurii Abramenko.
|
|
27
|
+
- Open-source files: CONTRIBUTING, SECURITY, CODE_OF_CONDUCT, NOTICE, issue and pull request templates, `deny.toml`.
|
|
28
|
+
|
|
29
|
+
## 0.4.0-dev
|
|
30
|
+
|
|
31
|
+
- Offline interactive `report.html` with in-browser simulation (WebAssembly), Before/Compare/After graph, inspector, scenario editor, sweep and case filters; independent change sets with an overview page and one page per set.
|
|
32
|
+
|
|
33
|
+
## 0.3.0-dev
|
|
34
|
+
|
|
35
|
+
- Scenario simulation (`--scenario`, `scenario-template`) with paired before/after comparison.
|
|
36
|
+
|
|
37
|
+
## 0.2.0-dev
|
|
38
|
+
|
|
39
|
+
- Value and control flow, per-caller value impact, snapshot alignment and call changes.
|
|
40
|
+
|
|
41
|
+
## 0.1.0-dev
|
|
42
|
+
|
|
43
|
+
- `ripplediff analyze`: immutable Git snapshots, changed symbols, PyCG call graph with evidence, direct and transitive callers, `analysis.json`.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Code of conduct
|
|
2
|
+
|
|
3
|
+
This project follows the [Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
|
|
4
|
+
|
|
5
|
+
In short: be respectful and constructive, assume good faith, and keep discussions about the work. Harassment and personal attacks are not tolerated.
|
|
6
|
+
|
|
7
|
+
Report unacceptable behavior to the maintainer through the contact listed on the repository owner's GitHub profile, or privately through GitHub's reporting tools. Reports are handled confidentially.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Contributing to RippleDiff
|
|
2
|
+
|
|
3
|
+
Thanks for helping. RippleDiff is young; small, focused pull requests with tests are the easiest to review.
|
|
4
|
+
|
|
5
|
+
## How the project is built
|
|
6
|
+
|
|
7
|
+
RippleDiff is developed openly with AI coding assistants under the maintainer's direction (see the README). Contributions of any origin are welcome on the same terms: you are responsible for what you submit, it must be your own work or compatible with the Apache-2.0 license, and it must come with tests that prove the behavior.
|
|
8
|
+
|
|
9
|
+
## Ground rules
|
|
10
|
+
|
|
11
|
+
- **The analyzed code is data.** Never import, run or install the code under analysis. Simulation evaluates the syntax tree with the bounded evaluator (ADR 0002); there is no host Python and no `eval`.
|
|
12
|
+
- **Evidence over guesses.** A reported relationship needs a source location or an explicit reason why it is unknown. Prefer `UNKNOWN` to an invented value or target.
|
|
13
|
+
- **Tests come with behavior.** A fixture or test should fail before your change and pass after it. Do not weaken or skip tests to get green.
|
|
14
|
+
- **Semantics are differential.** Any construct added to the simulation subset needs probes that compare it with CPython (`tests/cli.rs`, `evaluator_matches_cpython`).
|
|
15
|
+
- **Decisions go in ADRs.** Substantial trade-offs (new engines, schema changes, new capabilities) need an ADR in `docs/adr/`.
|
|
16
|
+
- **No private code.** Fixtures must be synthetic or explicitly licensed. Never commit company code, traces, tokens or reports of private repositories.
|
|
17
|
+
|
|
18
|
+
## Development setup
|
|
19
|
+
|
|
20
|
+
- Rust: the toolchain is pinned in `rust-toolchain.toml` (rustup installs it).
|
|
21
|
+
- Tests: `cargo test` (the browser test needs Node.js and Playwright with Chromium; it is skipped otherwise).
|
|
22
|
+
- Lint: `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo clippy --lib --no-default-features -- -D warnings` (the wasm build).
|
|
23
|
+
- Report assets: after changing `frontend/`, `wasm/`, `src/simulation/` or the evaluator, run `scripts/build-report-assets.sh` (needs the `wasm32-unknown-unknown` target, Node.js and npm) and commit `assets/report/`. CI checks they are up to date.
|
|
24
|
+
- Licenses: `cargo deny check licenses` (configuration in `deny.toml`).
|
|
25
|
+
|
|
26
|
+
## Pull requests
|
|
27
|
+
|
|
28
|
+
- Describe the behavior change and how it is tested.
|
|
29
|
+
- Keep public output changes visible: update `docs/schema/*.json` and the schema version for `analysis.json` changes.
|
|
30
|
+
- Note any new dependency with its license; it must be on the `deny.toml` allowlist.
|