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 'mid' property to Interval class #2960

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Add 'mid' property to Interval class #2960

merged 1 commit into from
Sep 20, 2024

Conversation

currocam
Copy link
Contributor

@currocam currocam commented Jun 18, 2024

Description

Add mid property to the Interval and Tree class, as requested in #2903

PR Checklist:

  • Tests that fully cover new/changed functionality.
  • Documentation including tutorial content if appropriate.
  • Changelogs, if there are API changes.

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.72%. Comparing base (a0baaaf) to head (b023b11).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2960   +/-   ##
=======================================
  Coverage   89.72%   89.72%           
=======================================
  Files          29       29           
  Lines       31567    31573    +6     
  Branches     6113     6115    +2     
=======================================
+ Hits        28322    28328    +6     
  Misses       1853     1853           
  Partials     1392     1392           
Flag Coverage Δ
c-tests 86.55% <ø> (ø)
lwt-tests 80.78% <ø> (ø)
python-c-tests 88.98% <ø> (ø)
python-tests 99.01% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
python/tskit/trees.py 98.78% <100.00%> (+<0.01%) ⬆️

@currocam currocam marked this pull request as ready for review June 18, 2024 17:48
@currocam
Copy link
Contributor Author

ci/circleci: build-32 and codecov/project don't pass, but I don't know how those errors are related with my PR

@petrelharp
Copy link
Contributor

Hm - well, there's currently just one test, but two methods added (although one calls the other). Perhaps add another test for the Interval property (so it is tested autonomously)? The CI failures might be just transient.

@currocam
Copy link
Contributor Author

Hi,
I just added the second test! Thank you for reviewing the changes

And for making such amazing piece of software! I've used a lot doing my master's thesis and I hope I will keep doing after I finish :)

Copy link
Member

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @currocam!

Before we merge we'll need to rebase and squash the commits, but probably better to wait until after #2961 is done first (the changelog will be confusing otherwise)

@jeromekelleher jeromekelleher linked an issue Jun 20, 2024 that may be closed by this pull request
@jeromekelleher
Copy link
Member

Looks like you have a few lint issues that need to be fixed also.

@jeromekelleher
Copy link
Member

Thanks @currocam! It's probably worth installing pre-commit, following the dev docs here. (pre-commit install, should do it).

It would be good to rebase and squash the commits also, as this is a small change. This guide may be helpful.

@currocam
Copy link
Contributor Author

currocam commented Jun 21, 2024

Hi! Thank you very much!
I was in fact in the process of install pre-commit, thanks for pointing that out!

@jeromekelleher
Copy link
Member

Great, looks ready to merge 👍

@benjeffery
Copy link
Member

@Mergifyio rebase

Copy link
Contributor

mergify bot commented Jun 27, 2024

rebase

☑️ Nothing to do

  • -conflict [📌 rebase requirement]
  • -closed [📌 rebase requirement]
  • queue-position=-1 [📌 rebase requirement]
  • any of:
    • #commits-behind>0 [📌 rebase requirement]
    • #commits>1 [📌 rebase requirement]
    • -linear-history [📌 rebase requirement]

@benjeffery benjeffery added the AUTOMERGE-REQUESTED Ask Mergify to merge this PR label Sep 20, 2024
@mergify mergify bot merged commit a771c84 into tskit-dev:main Sep 20, 2024
21 checks passed
@mergify mergify bot removed the AUTOMERGE-REQUESTED Ask Mergify to merge this PR label Sep 20, 2024
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.

Add 'mid' property to Interval class
4 participants