Skip to content

Conversation

@benjeffery
Copy link
Member

WIP!

@benjeffery
Copy link
Member Author

I've removed some flags here, which were unused. I guess this is technically a breaking change.

@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #2260 (5672bd2) into main (5cd1c42) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2260      +/-   ##
==========================================
- Coverage   93.29%   93.29%   -0.01%     
==========================================
  Files          27       27              
  Lines       26076    26073       -3     
  Branches     1167     1167              
==========================================
- Hits        24328    24325       -3     
  Misses       1718     1718              
  Partials       30       30              
Flag Coverage Δ
c-tests 92.23% <100.00%> (-0.01%) ⬇️
lwt-tests 89.05% <ø> (ø)
python-c-tests 71.97% <ø> (ø)
python-tests 98.88% <ø> (ø)

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

Impacted Files Coverage Δ
c/tskit/core.h 100.00% <ø> (ø)
c/tskit/core.c 97.88% <100.00%> (-0.02%) ⬇️
c/tskit/genotypes.c 90.17% <100.00%> (ø)
c/tskit/haplotype_matching.c 95.08% <100.00%> (ø)

Continue to review full report at Codecov.

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

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.

Wow, thanks so much for doing this @benjeffery 🤩

This is great.

c/tskit/core.h Outdated
*/
#define TSK_ERR_BAD_OFFSET -200
#define TSK_ERR_OUT_OF_BOUNDS -201
/* 201 was the now unused TSK_OUT_OF_BOUNDS */
Copy link
Member

Choose a reason for hiding this comment

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

We might as well use 201, maybe move TSK_ERR_SEEK_OUT_OF_BOUNDS up here and change its code to 201? That's the least noisy change, and it's vanishingly unlikely anyone is depending on its specific value.

pytest-cov
pytest-xdist
PyVCF
#PyVCF
Copy link
Member

Choose a reason for hiding this comment

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

This is accidental I assume?

Copy link
Member Author

Choose a reason for hiding this comment

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

Cruft from when I was attempting Py3.11.

@benjeffery
Copy link
Member Author

@jeromekelleher As I'm finishing this up I realise that some of the errors I am documenting are only thrown by undocumented parts of C (although they maybe documented in Python) This is quite fiddly to check for each one, so I am defaulting to documenting them. The only issue I can see with this is if someone decides to use the error macros, which seems unlikely and not a great thing for someone to do anyway.

@jeromekelleher
Copy link
Member

Agreed

@benjeffery benjeffery force-pushed the doc_err branch 2 times, most recently from db206b1 to d0c5243 Compare May 13, 2022 10:20
@benjeffery benjeffery marked this pull request as ready for review May 17, 2022 12:12
@benjeffery benjeffery marked this pull request as draft May 17, 2022 12:15
@benjeffery benjeffery marked this pull request as ready for review May 17, 2022 12:18
@benjeffery
Copy link
Member Author

@jeromekelleher This is ready to go, did another pass through and found a couple of tweaks (e.g. max alleles is not 127 anymore!)

@benjeffery benjeffery force-pushed the doc_err branch 2 times, most recently from c1b0425 to 4e6c287 Compare May 17, 2022 12:25
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! I wonder if we should leave some of the groups out from the final docs, but it's up to you.

.. doxygengroup:: DISTANCE_ERROR_GROUP
:content-only:

-------------------------
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should leave HAPLOTYPE_ERROR_GROUP, DISTANCE_ERROR_GROUP, IBD_ERROR_GROUP, MAPPING_ERROR_GROUP, and STATS_ERROR_GROUP out for now? Seems odd to put these in to the end-user documentation when we're not providing the corresponding functions in the API. You've done the hard work, to adding the groups back in to the RST here will be very easy later.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, got a bit carried away. Will fix in the in-progress polish PR.

@mergify mergify bot merged commit 4e7a85b into tskit-dev:main May 17, 2022
@benjeffery benjeffery deleted the doc_err branch May 17, 2022 19:40
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.

2 participants