Skip to content

Phase 1: engineering foundation - #2

Open
jameshoweee wants to merge 1 commit into
jh/phase0-bugfixesfrom
jh/phase1-engineering
Open

Phase 1: engineering foundation#2
jameshoweee wants to merge 1 commit into
jh/phase0-bugfixesfrom
jh/phase1-engineering

Conversation

@jameshoweee

Copy link
Copy Markdown
Owner

Modernizes the project setup so we can actually run things reliably:

  • pyproject.toml replaces requirements.txt — Python >=3.10, proper deps
  • pytest test suite (82 tests) with conftest.py fixtures and parametrized vectors
  • test_tables.py: lint PDT/RCDT tables against mpmath at 400-bit precision (tolerance 100 for rounding)
  • GitHub Actions CI on Python 3.10/3.12
  • .gitignore for pycache, test_vectors, .pytest_cache, etc
  • saga.py: added to_dict(), to_json(), effect_sizes() for programmatic access, made tau/chi2_bucket/pmin constructor params

- pyproject.toml replacing requirements.txt (Python >=3.10,
  scipy >=1.11, numpy >=1.24, pandas >=2.0, pytest + mpmath as dev)
- Pytest test suite: 82 parametrized tests from generated vectors
  (good/bad/mediocre), plus table lint via mpmath recomputation
- GitHub Actions CI: matrix on Python 3.10/3.12, generates vectors
  on the fly, no large testdata download needed
- Table lint (test_tables.py): recomputes half-Gaussian PDT/CDT
  at 400-bit precision with mpmath, verifies Python and C tables
  match — deterministic detector for table errors like the Phase 0
  PDT/RCDT confusion
- Structured output: to_dict()/to_json() on UnivariateSamples and
  MultivariateSamples for machine-readable results
- Configurable params: tau, chi2_bucket, pmin are now constructor
  args with defaults, no longer module-level globals
- Fixed doornik_hansen rank-deficient path (column projection +
  index reset so dot products align)
- Cleaned up unused imports from test_rejind removal
- .gitignore for __pycache__, test_vectors, .eps, .pytest_cache
@jameshoweee

Copy link
Copy Markdown
Owner Author

consolidating into a single PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant