Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify marker simplification #530

Merged
merged 7 commits into from
Dec 18, 2022

Commits on Dec 18, 2022

  1. simplify marker simplification

    dimbleby authored and radoering committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    1e73477 View commit details
    Browse the repository at this point in the history
  2. code review

    don't get too hung up on symmetry for union and intersection
    dimbleby authored and radoering committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    9cb4ade View commit details
    Browse the repository at this point in the history
  3. further simplification

    dimbleby authored and radoering committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    2b85704 View commit details
    Browse the repository at this point in the history
  4. simplify markers fully in _compact_markers

    Exploit the same cnf / dnf trick that is used in marker union
    dimbleby authored and radoering committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    8bf5787 View commit details
    Browse the repository at this point in the history
  5. Deduplicate during _flatten_markers()

    The potential downside of the approach in this series of commits is that
    cnf() and dnf() can, in the worst case, be exponentially expensive.
    
    eg `cnf((a1 and b1) or (a2 and b2) or ... (an and bn))` generates 2^n
    intersections.
    
    In practice, markers on python packages seem not to get long enough for
    this to be an issue.
    
    Deduplicating the markers on unions and intersections is the lowest of
    low-hanging fruit in mitigating this.
    dimbleby authored and radoering committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    2b1d652 View commit details
    Browse the repository at this point in the history
  6. add tests for cnf

    radoering committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    dea4676 View commit details
    Browse the repository at this point in the history
  7. add intersection and union function, which take an arbitrary amount o…

    …f markers, and move duplicated code into these functions
    radoering committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    744e720 View commit details
    Browse the repository at this point in the history