Skip to content

Adding more Typing information as generated using monkeytype #709

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

Merged
merged 10 commits into from
Jun 30, 2020

Conversation

vrdmr
Copy link
Member

@vrdmr vrdmr commented Jun 29, 2020

Description

Adding more Typing information as generated using monkeytype.

Get Monkeytype to go through all the functions as invoked by the pytest. This is done by the following-

CORE_TOOLS_EXE_PATH=/usr/local/bin/func monkeytype run `which pytest` --instafail tests/unittests

The above generates a database of all the functions calls and stores it in monkeytype.sqlite3 file. You can get the list of all the modules indexed by the MonkeyType by the following command:

(venv) bash-3.2$ monkeytype list-modules
...
azure_functions_worker.utils.wrappers
azure_functions_worker.utils.tracing
azure_functions_worker.utils.common
azure_functions_worker.testutils
azure_functions_worker.protos.FunctionRpc_pb2_grpc
azure_functions_worker.logging
azure_functions_worker.loader
azure_functions_worker.functions
azure_functions_worker.dispatcher
azure_functions_worker.bindings.tracecontext
azure_functions_worker.bindings.out
azure_functions_worker.bindings.meta
azure_functions_worker.bindings.generic
azure_functions_worker.bindings.datumdef
azure_functions_worker._thirdparty.typing_inspect
...

Applying the MonkeyType information

monkeytype apply <module>

Also - In the PR, I did some very minor fixes in the exposure - I'll mark them in the review.

Fixes #704


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and CI is passing.

Quality of Code and Contribution Guidelines

@vrdmr vrdmr changed the title Vameru/monkeytype information generated Adding more Typing information as generated using monkeytype Jun 30, 2020
@vrdmr vrdmr merged commit 5d21aca into dev Jun 30, 2020
@vrdmr vrdmr deleted the vameru/monkeytype-information-generated branch June 30, 2020 18:56
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.

[Improvement] Adding types to function/method parameters to help with static analysis
2 participants