Skip to content

Exclude site-packages from scanned dirs in prefect deploy#16885

Merged
zzstoatzz merged 4 commits intomainfrom
dont-search-site-packages
Jan 29, 2025
Merged

Exclude site-packages from scanned dirs in prefect deploy#16885
zzstoatzz merged 4 commits intomainfrom
dont-search-site-packages

Conversation

@zzstoatzz
Copy link
Collaborator

@zzstoatzz zzstoatzz commented Jan 28, 2025

closes #16882

excludes **/site-packages/** using filter_files

@github-actions github-actions bot added the bug Something isn't working label Jan 28, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 28, 2025

CodSpeed Performance Report

Merging #16885 will not alter performance

Comparing dont-search-site-packages (40ed1b5) with main (bd807de)

Summary

✅ 2 untouched benchmarks

Copy link
Member

@cicdw cicdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think we already have a function that contains the logic you're looking for here (it's used for .prefectignore files)

@zzstoatzz zzstoatzz force-pushed the dont-search-site-packages branch 2 times, most recently from 50e9c19 to be9ec7d Compare January 29, 2025 00:18
@zzstoatzz zzstoatzz requested a review from cicdw January 29, 2025 00:41
@zzstoatzz zzstoatzz force-pushed the dont-search-site-packages branch 2 times, most recently from e456d76 to 875866a Compare January 29, 2025 00:52
Copy link
Member

@cicdw cicdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit -- is this something that's easy enough to test?


Args:
directory: The directory to search in
exclude_patterns: List of patterns to exclude from the search.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the default logic is within this function I think it makes sense to keep the default in the docstring - sorry if my message was confusing earlier!

@zzstoatzz zzstoatzz force-pushed the dont-search-site-packages branch from 875866a to 657d840 Compare January 29, 2025 15:59
@zzstoatzz
Copy link
Collaborator Author

@cicdw test added in 657d840

@zzstoatzz zzstoatzz merged commit 646bbfa into main Jan 29, 2025
46 checks passed
@zzstoatzz zzstoatzz deleted the dont-search-site-packages branch January 29, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prefect deploy searches across .venv installed packages

2 participants