Skip to content

Json struct c docs#3439

Merged
petrelharp merged 2 commits intotskit-dev:mainfrom
petrelharp:json-struct-c-docs
Apr 14, 2026
Merged

Json struct c docs#3439
petrelharp merged 2 commits intotskit-dev:mainfrom
petrelharp:json-struct-c-docs

Conversation

@petrelharp
Copy link
Copy Markdown
Contributor

@petrelharp petrelharp commented Mar 20, 2026

I think that removing the json+struct C code from tskit itself and providing an example in the C docs is probably the way to go. @bhaller provided the C code, modified from the method and tests in #3437.

Currently this has the additional docs that are also in #3440.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 0% with 84 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.68%. Comparing base (2f26dc6) to head (c5c9157).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3439      +/-   ##
==========================================
- Coverage   91.92%   91.68%   -0.24%     
==========================================
  Files          37       38       +1     
  Lines       32153    32242      +89     
  Branches     5143     5158      +15     
==========================================
+ Hits        29556    29561       +5     
- Misses       2264     2348      +84     
  Partials      333      333              
Flag Coverage Δ
C 82.30% <0.00%> (-0.41%) ⬇️
c-python 77.34% <ø> (ø)
python-tests 96.40% <ø> (+<0.01%) ⬆️
python-tests-no-jit 33.20% <ø> (-0.02%) ⬇️

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

Components Coverage Δ
Python API 98.70% <ø> (+<0.01%) ⬆️
Python C interface 91.23% <ø> (ø)
C library 91.27% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@petrelharp petrelharp force-pushed the json-struct-c-docs branch 2 times, most recently from f4ed750 to f1593cc Compare March 21, 2026 15:23
@petrelharp petrelharp marked this pull request as ready for review March 21, 2026 15:24
Comment thread docs/metadata.md
Comment thread docs/metadata.md Outdated
Comment thread docs/metadata.md Outdated
@petrelharp petrelharp force-pushed the json-struct-c-docs branch 2 times, most recently from 75037d5 to abaaa1d Compare March 22, 2026 03:39
@petrelharp
Copy link
Copy Markdown
Contributor Author

Codecov is complaining because the example C file is not being hit. AFAICT this is expected, and perhaps we should change this line to ask codecov to just cover c/tskit/ instead of c/?

@petrelharp petrelharp force-pushed the json-struct-c-docs branch from a9389cf to d93c1ca Compare April 3, 2026 23:46
Copy link
Copy Markdown

@bhaller bhaller left a comment

Choose a reason for hiding this comment

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

LGTM!

@petrelharp
Copy link
Copy Markdown
Contributor Author

Indeed, none of the examples/ code is hit by codecov (as we'd expect, just verifying):
Screenshot From 2026-04-14 09-29-29

@petrelharp
Copy link
Copy Markdown
Contributor Author

Merging this since it's been reviewed carefully by Ben H, after consulting with Jerome. I need to double-check the change to .codecov.yml hasn't messed something up; will do that in a separate PR.

@petrelharp petrelharp merged commit c1f8d80 into tskit-dev:main Apr 14, 2026
15 of 17 checks passed
@petrelharp
Copy link
Copy Markdown
Contributor Author

I've checked in #3446 that the change to .codecov.yml didn't break codecov's c coverage.

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