-
Notifications
You must be signed in to change notification settings - Fork 41
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
[WIP] CLI-227: add implicit context_mount
to Image
docker methods
#2582
Closed
Closed
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
a650752
init
kramstrom 7019599
patterns
kramstrom 57fdb88
Merge branch 'main' of github.com:modal-labs/modal-client into kramst…
kramstrom 13ca6a1
abs path
kramstrom e6adb96
Merge branch 'main' into kramstrom/cli-227-remove-context_mount-from
kramstrom c956397
Merge branch 'main' of github.com:modal-labs/modal-client into kramst…
kramstrom e861d5f
Merge branch 'main' of github.com:modal-labs/modal-client into kramst…
kramstrom 034693e
add back context_mount
kramstrom bf61dc2
Merge branch 'main' of github.com:modal-labs/modal-client into kramst…
kramstrom b8d3e14
add back
kramstrom 75346c1
update
kramstrom 7e6546b
Merge branch 'main' of github.com:modal-labs/modal-client into kramst…
kramstrom b013546
dockerignore find
kramstrom b2cb8ce
use dockerignore
kramstrom 21ec1e7
dockerfile match port
kramstrom d7c9e76
fix test
kramstrom 24e4b57
Merge branch 'main' into kramstrom/cli-227-remove-context_mount-from
kramstrom 37475c3
remove
kramstrom 8c0b412
move
kramstrom ed19a20
renaming
kramstrom e67a264
remove
kramstrom e5c1545
ignore
kramstrom a4048fb
remove docker_copy_match
kramstrom b6b3d51
Merge branch 'main' of github.com:modal-labs/modal-client into kramst…
kramstrom b7ff573
auto dockerignore
kramstrom 6ac1400
remove autodockerignore
kramstrom c44a6ea
name
kramstrom baac945
Merge branch 'main' of github.com:modal-labs/modal-client into kramst…
kramstrom 97685a8
autodockerignore
kramstrom b52fdbb
move to inside load
kramstrom aa8a5b0
types
kramstrom fa89c54
move repr inside
kramstrom e83725c
fix
kramstrom 41b55d2
fix . pattern
kramstrom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's all this repr magic used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the repr inside the class, but it's just a placeholder value for type hints & docs to make it simpler to understand what will happen if you don't pass in a custom ignore pattern-list or callable --> then we default to trying to find a matching dockerignore to your dockerfile (or just a generic one if you're using
docker_commands
) -- same as we have for add_local_python_sourceThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLDR for why it's needed (this was my suggestion)
It's so that we can use these as default values in signatures and still emit valid python signatures in our type stubs, since things like
inspect.signature(...)
will just use the repr of all default values, and can't figure out stuff like import path of the specific constant we use as a default.It's definitely a bit of a hack, but not something users should see. An alternative would be to do a bunch of
ast
magic to extract the signatures.