diff --git a/.github/workflows/parity-drift.yml b/.github/workflows/parity-drift.yml new file mode 100644 index 0000000..3b70623 --- /dev/null +++ b/.github/workflows/parity-drift.yml @@ -0,0 +1,66 @@ +name: Parity drift + +# Detects when the upstream R packages (moderndive, infer) change in a way the +# Python port hasn't caught up with — a version bump, an added/removed export, or +# a dataset whose dimensions/columns changed — and opens (or comments on) an issue. +on: + schedule: + - cron: "0 6 * * MON" + workflow_dispatch: + +permissions: + contents: read + issues: write + +concurrency: + group: parity-drift + cancel-in-progress: true + +jobs: + drift: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - name: Set up R + uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - name: Install upstream R packages (latest from GitHub) + run: | + Rscript -e 'install.packages(c("remotes", "jsonlite"))' + Rscript -e 'remotes::install_github(c("moderndive/moderndive", "tidymodels/infer"), upgrade = "never")' + + - name: Set up uv + uses: astral-sh/setup-uv@v7 + with: + python-version: "3.12" + + - name: Install the Python package + run: uv sync + + - name: Probe upstream + run: Rscript tools/parity_probe.R > upstream.json + + - name: Check parity + id: check + run: | + set +e + uv run python tools/check_parity.py upstream.json | tee report.md + code=${PIPESTATUS[0]} + set -e + if [ "$code" -ne 0 ]; then echo "drift=1" >> "$GITHUB_OUTPUT"; else echo "drift=0" >> "$GITHUB_OUTPUT"; fi + + - name: Open or update a drift issue + if: steps.check.outputs.drift == '1' + env: + GH_TOKEN: ${{ github.token }} + run: | + title="Upstream parity drift detected" + num=$(gh issue list --state open --search "$title in:title" --json number --jq '.[0].number // empty') + if [ -n "$num" ]; then + gh issue comment "$num" --body-file report.md + else + gh issue create --title "$title" --body-file report.md + fi diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 7154c30..7d91901 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,6 +6,11 @@ build: os: ubuntu-24.04 tools: python: "3.12" + jobs: + # The docs execute {python} cells with myst-nb and render plotly figures as + # static PNGs via kaleido, which (>=1.0) needs a Chrome it doesn't bundle. + post_install: + - python -c "import kaleido; kaleido.get_chrome_sync()" sphinx: configuration: doc/conf.py diff --git a/doc/_build/html/.doctrees/api.doctree b/doc/_build/html/.doctrees/api.doctree index 64d997a..d698c72 100644 Binary files a/doc/_build/html/.doctrees/api.doctree and b/doc/_build/html/.doctrees/api.doctree differ diff --git a/doc/_build/html/.doctrees/coming-from-r.doctree b/doc/_build/html/.doctrees/coming-from-r.doctree new file mode 100644 index 0000000..5d5bff1 Binary files /dev/null and b/doc/_build/html/.doctrees/coming-from-r.doctree differ diff --git a/doc/_build/html/.doctrees/datasets.doctree b/doc/_build/html/.doctrees/datasets.doctree new file mode 100644 index 0000000..90a8328 Binary files /dev/null and b/doc/_build/html/.doctrees/datasets.doctree differ diff --git a/doc/_build/html/.doctrees/environment.pickle b/doc/_build/html/.doctrees/environment.pickle index 981c093..79600fa 100644 Binary files a/doc/_build/html/.doctrees/environment.pickle and b/doc/_build/html/.doctrees/environment.pickle differ diff --git a/doc/_build/html/.doctrees/getting-started.doctree b/doc/_build/html/.doctrees/getting-started.doctree new file mode 100644 index 0000000..ccf9438 Binary files /dev/null and b/doc/_build/html/.doctrees/getting-started.doctree differ diff --git a/doc/_build/html/.doctrees/guides/confidence-intervals.doctree b/doc/_build/html/.doctrees/guides/confidence-intervals.doctree new file mode 100644 index 0000000..769452c Binary files /dev/null and b/doc/_build/html/.doctrees/guides/confidence-intervals.doctree differ diff --git a/doc/_build/html/.doctrees/guides/hypothesis-testing.doctree b/doc/_build/html/.doctrees/guides/hypothesis-testing.doctree new file mode 100644 index 0000000..0faac88 Binary files /dev/null and b/doc/_build/html/.doctrees/guides/hypothesis-testing.doctree differ diff --git a/doc/_build/html/.doctrees/guides/plotting.doctree b/doc/_build/html/.doctrees/guides/plotting.doctree new file mode 100644 index 0000000..dcf4999 Binary files /dev/null and b/doc/_build/html/.doctrees/guides/plotting.doctree differ diff --git a/doc/_build/html/.doctrees/guides/regression.doctree b/doc/_build/html/.doctrees/guides/regression.doctree new file mode 100644 index 0000000..5e28d0e Binary files /dev/null and b/doc/_build/html/.doctrees/guides/regression.doctree differ diff --git a/doc/_build/html/.doctrees/guides/sampling.doctree b/doc/_build/html/.doctrees/guides/sampling.doctree new file mode 100644 index 0000000..aa81791 Binary files /dev/null and b/doc/_build/html/.doctrees/guides/sampling.doctree differ diff --git a/doc/_build/html/.doctrees/guides/theory-based.doctree b/doc/_build/html/.doctrees/guides/theory-based.doctree new file mode 100644 index 0000000..cafca0b Binary files /dev/null and b/doc/_build/html/.doctrees/guides/theory-based.doctree differ diff --git a/doc/_build/html/.doctrees/index.doctree b/doc/_build/html/.doctrees/index.doctree index 1835873..13a6ef0 100644 Binary files a/doc/_build/html/.doctrees/index.doctree and b/doc/_build/html/.doctrees/index.doctree differ diff --git a/doc/_build/html/_images/0cbf7366b5b2086def6aceec9bf8e8320703e5fcdb1857544f8d601b5ef8edd9.png b/doc/_build/html/_images/0cbf7366b5b2086def6aceec9bf8e8320703e5fcdb1857544f8d601b5ef8edd9.png new file mode 100644 index 0000000..5604621 Binary files /dev/null and b/doc/_build/html/_images/0cbf7366b5b2086def6aceec9bf8e8320703e5fcdb1857544f8d601b5ef8edd9.png differ diff --git a/doc/_build/html/_images/146f21e1e2cfebef569cb551e24b0c5826d3fe84072e2197538258975eba8070.png b/doc/_build/html/_images/146f21e1e2cfebef569cb551e24b0c5826d3fe84072e2197538258975eba8070.png new file mode 100644 index 0000000..1dac2fc Binary files /dev/null and b/doc/_build/html/_images/146f21e1e2cfebef569cb551e24b0c5826d3fe84072e2197538258975eba8070.png differ diff --git a/doc/_build/html/_images/1d823747e0f1ecebe3da106ec64b1ad73d4d55547d8814ff4c011efafc6354bc.png b/doc/_build/html/_images/1d823747e0f1ecebe3da106ec64b1ad73d4d55547d8814ff4c011efafc6354bc.png new file mode 100644 index 0000000..a6f6500 Binary files /dev/null and b/doc/_build/html/_images/1d823747e0f1ecebe3da106ec64b1ad73d4d55547d8814ff4c011efafc6354bc.png differ diff --git a/doc/_build/html/_images/4f6137e2efe6c6b33540a969fb71e0dc9370f9392a068c674921b84116e9ca18.png b/doc/_build/html/_images/4f6137e2efe6c6b33540a969fb71e0dc9370f9392a068c674921b84116e9ca18.png new file mode 100644 index 0000000..020fa18 Binary files /dev/null and b/doc/_build/html/_images/4f6137e2efe6c6b33540a969fb71e0dc9370f9392a068c674921b84116e9ca18.png differ diff --git a/doc/_build/html/_images/57bcfc0de676a5294afac27836489f257436cfdc208aba5a2907c8b2aa95d9f8.png b/doc/_build/html/_images/57bcfc0de676a5294afac27836489f257436cfdc208aba5a2907c8b2aa95d9f8.png new file mode 100644 index 0000000..aa8f2c6 Binary files /dev/null and b/doc/_build/html/_images/57bcfc0de676a5294afac27836489f257436cfdc208aba5a2907c8b2aa95d9f8.png differ diff --git a/doc/_build/html/_images/65edcbd2c398320bee92dd5442e64f14d1af22f756a002ca29e0d49a56241eaa.png b/doc/_build/html/_images/65edcbd2c398320bee92dd5442e64f14d1af22f756a002ca29e0d49a56241eaa.png new file mode 100644 index 0000000..acf5425 Binary files /dev/null and b/doc/_build/html/_images/65edcbd2c398320bee92dd5442e64f14d1af22f756a002ca29e0d49a56241eaa.png differ diff --git a/doc/_build/html/_images/a1ca833e74d2d2988b8271748b2439c6db0fb6d52aa565c9c0cf8dfd523736eb.png b/doc/_build/html/_images/a1ca833e74d2d2988b8271748b2439c6db0fb6d52aa565c9c0cf8dfd523736eb.png new file mode 100644 index 0000000..3ee44e6 Binary files /dev/null and b/doc/_build/html/_images/a1ca833e74d2d2988b8271748b2439c6db0fb6d52aa565c9c0cf8dfd523736eb.png differ diff --git a/doc/_build/html/_images/a716ffc5702927ebba6a9176ddba190577d8d13ed180fbd9a689d9d06129dac6.png b/doc/_build/html/_images/a716ffc5702927ebba6a9176ddba190577d8d13ed180fbd9a689d9d06129dac6.png new file mode 100644 index 0000000..b9976d4 Binary files /dev/null and b/doc/_build/html/_images/a716ffc5702927ebba6a9176ddba190577d8d13ed180fbd9a689d9d06129dac6.png differ diff --git a/doc/_build/html/_images/ac66f688faad576ec00fb6dfa22ab9d34977edb8a0a5ff3cadb158ce22be94fd.png b/doc/_build/html/_images/ac66f688faad576ec00fb6dfa22ab9d34977edb8a0a5ff3cadb158ce22be94fd.png new file mode 100644 index 0000000..4b468dc Binary files /dev/null and b/doc/_build/html/_images/ac66f688faad576ec00fb6dfa22ab9d34977edb8a0a5ff3cadb158ce22be94fd.png differ diff --git a/doc/_build/html/_images/ac9c0dd7643fbf405d9039110a0f70c17f154b4de622875f4f1404927f71b3a3.png b/doc/_build/html/_images/ac9c0dd7643fbf405d9039110a0f70c17f154b4de622875f4f1404927f71b3a3.png new file mode 100644 index 0000000..1dbbadc Binary files /dev/null and b/doc/_build/html/_images/ac9c0dd7643fbf405d9039110a0f70c17f154b4de622875f4f1404927f71b3a3.png differ diff --git a/doc/_build/html/_images/b356fae18e59a76c6630e1f9a522d1b99306e56b3817f2c09a7547d10157d1df.png b/doc/_build/html/_images/b356fae18e59a76c6630e1f9a522d1b99306e56b3817f2c09a7547d10157d1df.png new file mode 100644 index 0000000..a272160 Binary files /dev/null and b/doc/_build/html/_images/b356fae18e59a76c6630e1f9a522d1b99306e56b3817f2c09a7547d10157d1df.png differ diff --git a/doc/_build/html/_images/b366a9ba76d2135e3480197df1efa63a52fcc6c3aade26c457542b5eae9607b8.png b/doc/_build/html/_images/b366a9ba76d2135e3480197df1efa63a52fcc6c3aade26c457542b5eae9607b8.png new file mode 100644 index 0000000..115fd4e Binary files /dev/null and b/doc/_build/html/_images/b366a9ba76d2135e3480197df1efa63a52fcc6c3aade26c457542b5eae9607b8.png differ diff --git a/doc/_build/html/_images/c095fdc806a901609764f3a83013d31798e7b884fd7e4d4c51f4edb0142b30cf.png b/doc/_build/html/_images/c095fdc806a901609764f3a83013d31798e7b884fd7e4d4c51f4edb0142b30cf.png new file mode 100644 index 0000000..8bd188b Binary files /dev/null and b/doc/_build/html/_images/c095fdc806a901609764f3a83013d31798e7b884fd7e4d4c51f4edb0142b30cf.png differ diff --git a/doc/_build/html/_modules/index.html b/doc/_build/html/_modules/index.html index a1ad52f..3da3475 100644 --- a/doc/_build/html/_modules/index.html +++ b/doc/_build/html/_modules/index.html @@ -10,6 +10,7 @@ + @@ -194,9 +195,23 @@