Skip to content

Add type stubs#56

Merged
MarshalX merged 12 commits into
MarshalX:mainfrom
zzstoatzz:main
Jun 20, 2025
Merged

Add type stubs#56
MarshalX merged 12 commits into
MarshalX:mainfrom
zzstoatzz:main

Conversation

@zzstoatzz

@zzstoatzz zzstoatzz commented Mar 6, 2025

Copy link
Copy Markdown
Contributor

adds a python/libipld to house the .pyi file and the __all__

following the _{module_name} pattern that I use (and got from pydantic-core), note that maturin develop knows about the module-name set in pyproject.toml

let me know if there are any python type translations I messed up!

before

image

after

image

@zzstoatzz zzstoatzz force-pushed the main branch 3 times, most recently from 32a751d to 24e87cb Compare March 6, 2025 07:27
try again

clean up

3rd times a charm

one more
Comment thread pyproject.toml
@zzstoatzz zzstoatzz marked this pull request as ready for review March 6, 2025 21:20
@zzstoatzz

Copy link
Copy Markdown
Contributor Author

gentle ping for whenever you have a moment to look @MarshalX - I know there's probably more pressing things so I'll check back later 🙂

@MarshalX

MarshalX commented Mar 7, 2025

Copy link
Copy Markdown
Owner

That's an amazing job, thank you!!

I saw it already but did not comment immediately because this PR also integrates UV. I am still thinking about it but if we want to speed up it let's just include .pyi file :)

@zzstoatzz

zzstoatzz commented Mar 7, 2025

Copy link
Copy Markdown
Contributor Author

i don't think anything (else, after removing uv.lock) here is uv specific, for example dep groups are a python thing but I can remove it if you want (it shouldn't affect pip setups or anything about your distribution metadata like an extra would)

EDIT: doh the lockfile! duh, let me remove that

@codspeed-hq

codspeed-hq Bot commented Mar 8, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #56 will degrade performances by 19.95%

Comparing zzstoatzz:main (a2dba1a) with main (f375d8f)

Summary

❌ 9 regressions
✅ 183 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
test_dag_cbor_decode_fixtures[dagpb_11unnamedlinks+data] 60.5 µs 68.3 µs -11.39%
test_dag_cbor_decode_fixtures[float--8.940696716308594e-8] 14.7 µs 16.4 µs -10.79%
test_dag_cbor_decode_fixtures[int--11959030306112471732] 15.5 µs 17.3 µs -10.44%
test_dag_cbor_decode_fixtures[int--2784428724] 15.5 µs 17.3 µs -10.26%
test_dag_cbor_decode_real_data[citm_catalog.json] 24.1 ms 27.4 ms -12%
test_dag_cbor_decode_real_data[github.json] 1.1 ms 1.3 ms -14.61%
test_dag_cbor_decode_real_data[twitter.json] 11.3 ms 13.3 ms -14.57%
test_dag_cbor_decode_torture_cids 71.6 ms 89.4 ms -19.95%
test_decode_car 694.6 ms 836.9 ms -17.01%

@zzstoatzz

Copy link
Copy Markdown
Contributor Author

Summary

⚡ 6 improvements ❌ 4 regressions ✅ 182 untouched benchmarks

not sure if related to my changes (i suspect not) or if these just have high variance

@MarshalX

Copy link
Copy Markdown
Owner

@zzstoatzz that's just a noise from small bechmarks. ignore it :)

@MarshalX

MarshalX commented Jun 20, 2025

Copy link
Copy Markdown
Owner

@zzstoatzz let's give UV a shot! because i do not like this deps list duplication in requirements.txt and in pyproject.toml

@MarshalX MarshalX changed the title add type stubs Add type stubs Jun 20, 2025
@MarshalX MarshalX merged commit 389ebfa into MarshalX:main Jun 20, 2025
2 of 3 checks passed
@MarshalX

Copy link
Copy Markdown
Owner

thanks a lot!! and huge sorry for the so long delay; tbh it was never what to add except stubs to the new release; but now good bug reports came and has been fixed

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