Implement typings in conda-smithy#1957
Open
ninetteadhikari wants to merge 14 commits intoconda-forge:mainfrom
Open
Implement typings in conda-smithy#1957ninetteadhikari wants to merge 14 commits intoconda-forge:mainfrom
ninetteadhikari wants to merge 14 commits intoconda-forge:mainfrom
Conversation
82d1fb1 to
b2a66d4
Compare
b2a66d4 to
ed404e5
Compare
Member
|
pre-commit.ci autofix |
00b9c49 to
a4e89f7
Compare
beckermr
requested changes
Aug 23, 2024
Member
beckermr
left a comment
There was a problem hiding this comment.
I'm ok to merge this but I'd rather the type checks be optional and simply reported to people on PRs so they can fix them if they like.
Add mypy to GitHub workflow and to the environment yml
Add mypy type ignore for some tests and conda smithy files, which couldn't be resolved.
47bcea6 to
bafe408
Compare
Author
beckermr
approved these changes
Aug 28, 2024
Member
beckermr
left a comment
There was a problem hiding this comment.
Thank you!
Any comments from any one else on @conda-forge/core?
Member
I feel that if you add types, you should also make use of them and have them checked. Otherwise, it might be even better to not have them as otherwise you will be making false assumptions. |
Member
|
OK @xhochy, then I'd be in favor of removing the types all together. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduction
This work is done according to "Milestone 2: Implement typings in conda-smithy" as stated in the Scope of Work with Sovereign Tech Fund (STF) (https://www.sovereigntechfund.de/).
This PR addresses the typing request from this issue
Setup
Setup details are here: https://github.com/neighbourhoodie/conda-smithy/wiki
Steps followed to add type
As suggested in the ticket in the conda-smithy repo, MonkeyType is used to generate type hints for the python code.
Generate type hints
monkeytype.sqlite3in the current working directory.stubsto save the type hint filesThe above command will create stub files in the
stubsfolder. Here's an example of what the content of a stub file will look like. It gives suggestions for types.Checklist
newsentryNote:
Please note that there are some errors thrown by mypy that couldn't resolved at the moment and there is more room for further type improvements there.