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

Support Josverl/micropython-stubber as stubs repository + Stubs module renovations. #304

Merged
merged 69 commits into from
Dec 11, 2022

Conversation

BradenM
Copy link
Owner

@BradenM BradenM commented Aug 7, 2022

Entry to cleaning up the current messy state that is the stubs module.

The stubs module is currently very dependent on the schema used in micropy-stubs. This is an issue for several reasons, but the biggest one being that it just isn't necessary and introduces many limitations.

This PR focuses primarily on how micropy locates and sources stubs that are not local to the machine (i.e, remote repositories of stubs).

Micropy can now source stubs from either micropy-stubs or https://github.com/Josverl/micropython-stubs and is set up to be easily extendable to enable support for any future formats / methods of stub retrieval that may arise.

Next will be improving how micropy finds and treats stubs that are local to the machine. (In a seperate PR, since the scope of this one already expanded way too much 😉 )

@BradenM
Copy link
Owner Author

BradenM commented Aug 7, 2022

@Josverl

I am thinking of targeting https://github.com/Josverl/micropython-stubs/blob/main/publish/package_data.jsondb to source pypi package names (to ensure I lookup the correct package, for security and such).

Is this output stable? Lemme know what you think.

@Josverl
Copy link

Josverl commented Aug 27, 2022

Likely I'll add one or two attributes and might change the primary key to support upsets before

@BradenM BradenM force-pushed the feat/stubber-stubs branch from f5f226f to 28688b7 Compare November 6, 2022 09:55
@BradenM BradenM force-pushed the feat/stubber-stubs branch 2 times, most recently from b6f436a to 1f0f5d1 Compare November 20, 2022 07:34
@BradenM BradenM changed the title [WIP] Support Josverl/micropython-stubber as stubs repository Support Josverl/micropython-stubber as stubs repository. Nov 27, 2022
@codecov
Copy link

codecov bot commented Nov 27, 2022

Codecov Report

Base: 94.93% // Head: 93.50% // Decreases project coverage by -1.42% ⚠️

Coverage data is based on head (9aa583e) compared to base (9c723df).
Patch coverage: 85.25% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #304      +/-   ##
==========================================
- Coverage   94.93%   93.50%   -1.43%     
==========================================
  Files          37       48      +11     
  Lines        2311     2619     +308     
==========================================
+ Hits         2194     2449     +255     
- Misses        117      170      +53     
Flag Coverage Δ
unittests 93.50% <85.25%> (-1.43%) ⬇️

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

Impacted Files Coverage Δ
micropy/stubs/stubs.py 91.97% <61.53%> (-6.43%) ⬇️
micropy/stubs/repo_package.py 70.73% <70.73%> (ø)
micropy/stubs/repositories/micropython.py 77.41% <77.41%> (ø)
micropy/stubs/repositories/micropy.py 84.61% <84.61%> (ø)
micropy/cli.py 95.26% <87.50%> (-1.41%) ⬇️
micropy/stubs/repo.py 89.70% <89.70%> (ø)
micropy/stubs/package.py 92.30% <92.30%> (ø)
micropy/stubs/manifest.py 94.73% <94.73%> (ø)
micropy/main.py 97.70% <100.00%> (ø)
micropy/stubs/__init__.py 100.00% <100.00%> (ø)
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@BradenM BradenM changed the title Support Josverl/micropython-stubber as stubs repository. Support Josverl/micropython-stubber as stubs repository + Stubs module renovations. Dec 4, 2022
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
…tilize in search/resolve.

Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
… only in search, general improvements in stub repo.

Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
…method.

Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
…from metadata fixes.

Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
…output by repo.

Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
@BradenM BradenM marked this pull request as ready for review December 11, 2022 08:44
@BradenM BradenM merged commit d2d0ed8 into master Dec 11, 2022
@BradenM BradenM deleted the feat/stubber-stubs branch December 11, 2022 09:00
@BradenM BradenM mentioned this pull request Mar 6, 2023
10 tasks
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