-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Monkeytype and Poe the Poet plugin for Poetry (#1731)
* Add monkeytype and poe the poet plugin for poetry * Fix some wording * Fix typo in trace-tests task * Improve poe tasks - Added monkeytype config - Specified code filter so we only trace packages and modules we actually want traced * Only allow monkeytype to trace our modules - Fixed typos in Poe tasks * Update lock file * Refresh lock file * Formatting * Update build backend - Install wheel before awslambdaric * Update pip before running installs * Quick typo fix * Messing with build deps * Test updated alpine image * Migrate make targets to poe * Update poetry lock file * Fix Dockerfile.lambda - Added rust and cargo to fix failing wheel build * Add rust and cargo to Dockerfile * Bump docker image to 3.18 - these images are going to be the end of me... * Update lock file * update lock file --------- Co-authored-by: Jumana B <[email protected]>
- Loading branch information
Showing
9 changed files
with
750 additions
and
413 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import os | ||
|
||
from monkeytype.config import DefaultConfig | ||
|
||
|
||
class MonkeytypeConfig(DefaultConfig): | ||
def __init__(self, package_prefixes): | ||
self.package_prefixes = package_prefixes | ||
|
||
def code_filter(self, code): | ||
# Get the module name from the code object | ||
# and convert the file path to a module name | ||
module_name = code.co_filname.replace(os.path.sep, ".")[:-3] | ||
|
||
for prefix in self.package_prefixes: | ||
if module_name.startswith(prefix): | ||
return True | ||
|
||
return False |
This file contains 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
This file contains 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
Oops, something went wrong.