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

Add support for using cell ID in diffing and merging #639

Merged
merged 35 commits into from
Nov 1, 2023

Commits on Oct 27, 2023

  1. Add DiffConfig

    An object that encapsulates differs and predicates, and also the new "is_atomic", which is added so that we can mark e.g. cell IDs as atomic. DiffConfig could potentially also be used in the future to  better config notebook ignores etc?
    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    7eb83fb View commit details
    Browse the repository at this point in the history
  2. Optimize source diffing

    When comparing identical sources we can avoid a full diff by a quick equality check.
    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    028b618 View commit details
    Browse the repository at this point in the history
  3. Optimize mime diff

    Avoid recursing for string mimetypes that are identical
    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    89dfb23 View commit details
    Browse the repository at this point in the history
  4. Skip diffing if string are equal

    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    496df57 View commit details
    Browse the repository at this point in the history
  5. Add ID check in cell comparison

    In the strictest check, cells without ID is never considered equal to cells with IDs, but they can be in the two less-strict comparisons. I.e. if a notebook ends up with only some cells having IDs, and then IDs are added to those cells later, then in the first pass the existing cells that all had IDs are first matched to each other, and only in the next passes are the cells that gained IDs compared with their old ID-less versions.
    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    4f71a5f View commit details
    Browse the repository at this point in the history
  6. Fix source string diffing

    Always use line based diffing for source.
    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    1b318e6 View commit details
    Browse the repository at this point in the history
  7. Fix tests for cell IDs

    Enable previously not working test
    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    17caf86 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7adf55c View commit details
    Browse the repository at this point in the history
  9. Fix union strategy

    This allows union strategy to correctly be applied. We might want to consider to silently ignore the strategy for dicts instead of raising, but it is hard to decide the best course without any good cases to consider.
    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    a2fe203 View commit details
    Browse the repository at this point in the history
  10. Re-enable interleaving test

    With union strategy, this test can pass. It is probably correct for it to fail without the explicit strategy marked.
    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    f3484e9 View commit details
    Browse the repository at this point in the history
  11. Have cell prettyprint include cell ID

    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    28936ff View commit details
    Browse the repository at this point in the history
  12. Fix deprecation warning

    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    0de0827 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    17c105a View commit details
    Browse the repository at this point in the history
  14. Tweak id pretty print

    Only show it if `details` flag is set, and display it like any other field.
    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    f21c125 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b00f951 View commit details
    Browse the repository at this point in the history
  16. Comment copy-paste update

    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    e530d81 View commit details
    Browse the repository at this point in the history
  17. Change the logic of cell ID comparison

    Now, we use cell IDs as the highest ranking comparison, and any cells that map equal will take priority in computing snakes of matching cells. Any further comparisons (strict, moderate, approximate) will be as before, but with the implication that the cells being compared do not have an ID match on the other side, so considering ID has no meaning.
    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    29cb8ef View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    7b57f97 View commit details
    Browse the repository at this point in the history
  19. Improve tests

    Remove some skips that are no longer needed, fix tests that were marked xfail due to not being completed, and split some tests that had some hard-coded logical branches (`if 0:`) - fixing the previously disabled branch.
    vidartf authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    a2ff4fe View commit details
    Browse the repository at this point in the history
  20. Expose cell ID in the UI

    krassowski authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    7973968 View commit details
    Browse the repository at this point in the history
  21. Add "Cell ID" prefix

    krassowski authored and fcollonval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    7baf832 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    591548f View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    dc6d5d7 View commit details
    Browse the repository at this point in the history
  24. Add capability to output merge decisions to file

    Good for collecting debug data on merge decisions.
    vidartf committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    51b0571 View commit details
    Browse the repository at this point in the history
  25. whitelist -> allowlist

    vidartf committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    70670f7 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    a6b7b65 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    15e6be4 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    37e2fb2 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2023

  1. Update tests with new behavior

    Adds tests for the recently added ability to output merge decisions as raw JSON. As the tests indicate, this is a breaking behavior, but this is a major version release, so should be ok.
    vidartf committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    9630642 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cc0be95 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e8e2dff View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2023

  1. Remove ID conflict for UI test merge_test1

    This is needed to have download test work (assumes no conflicts).
    vidartf committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    e247fea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    efbcdff View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    08636b8 View commit details
    Browse the repository at this point in the history
  4. Fix mergeview gutter click buttons

    Click should only register as final after mouse up with primary button.
    vidartf committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    9884381 View commit details
    Browse the repository at this point in the history