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

compute mutation parents on text input #2730

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

petrelharp
Copy link
Contributor

@petrelharp petrelharp commented Apr 3, 2023

Over in #2729 we saw a bug due to not computing mutation parents on text input. This isn't really a bug, as the text input is not part of the public API, but I could easily imagine us making the same error in test code.

(More generally we ought to think about doing this as part of tree sequence instantiation; I seem to recall us having a reason not to do it, but I don't remember specifically what it was?)

@petrelharp
Copy link
Contributor Author

Closes #2729.

@benjeffery
Copy link
Member

@Mergifyio rebase

@petrelharp
Copy link
Contributor Author

Whoops; looks like I've made some silly mistake.

@petrelharp petrelharp removed the AUTOMERGE-REQUESTED Ask Mergify to merge this PR label Apr 3, 2023
@petrelharp
Copy link
Contributor Author

Okay - I got this to work; I had to rearrange the tables in one of the tests.

HOWEVER, I'm worried that putting in compute_mutation_parents might not be the right way to go here. This is because there may be some operations we want to do without having indexes or mutation parents, so I am nervous putting these into all our examples.

@codecov
Copy link

codecov bot commented Apr 3, 2023

Codecov Report

Merging #2730 (a1f89a2) into main (23d35ac) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2730   +/-   ##
=======================================
  Coverage   94.08%   94.08%           
=======================================
  Files          29       29           
  Lines       28516    28516           
  Branches     1609     1609           
=======================================
  Hits        26828    26828           
  Misses       1653     1653           
  Partials       35       35           
Flag Coverage Δ
c-tests 92.36% <ø> (ø)
lwt-tests 89.05% <ø> (ø)
python-c-tests 70.89% <ø> (ø)
python-tests 99.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23d35ac...a1f89a2. Read the comment docs.

@jeromekelleher
Copy link
Member

HOWEVER, I'm worried that putting in compute_mutation_parents might not be the right way to go here. This is because there may be some operations we want to do without having indexes or mutation parents, so I am nervous putting these into all our examples.

I'm tending to agree actually. These functions are just for creating test examples, and it'll be easy to forget that any mutation parents you specify will be nuked by this call.

Maybe we should either leave it as it is, or only compute mutation parents when that column is missing from the input?

@mergify
Copy link
Contributor

mergify bot commented Apr 4, 2023

rebase

✅ Branch has been successfully rebased

@petrelharp
Copy link
Contributor Author

Maybe we add a flag to the function, that if true does indexes and computes mutation parents, and if false then does not? That'd make it real hard to miss the fact that the function does or doesn't do it.

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.

None yet

3 participants