matthewwardrop / formulaic

A high-performance implementation of Wilkinson formulas for Python.
MIT License
313 stars 21 forks source link

Add token sanitization to make equivalent Python factors share the same formatting. #167

Closed matthewwardrop closed 6 months ago

matthewwardrop commented 6 months ago

Currently we allow for Python factors to differ only in formatting, which causes some unintuitive behaviour in generated formulae (like being able to take the product of equivalent Python factors if you accidentally added a space).

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (0334b38) 99.96% compared to head (84ebde7) 99.96%. Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #167 +/- ## ======================================= Coverage 99.96% 99.96% ======================================= Files 51 53 +2 Lines 2852 2871 +19 ======================================= + Hits 2851 2870 +19 Misses 1 1 ``` | [Flag](https://app.codecov.io/gh/matthewwardrop/formulaic/pull/167/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Wardrop) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/matthewwardrop/formulaic/pull/167/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Wardrop) | `99.96% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Wardrop#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.