-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Run Command from App Comments #15577
Merged
Merged
Conversation
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
rlizzo
requested review from
tchaton,
awaelchli,
hhsecond and
lantiga
as code owners
November 8, 2022 05:42
github-actions
bot
added
the
app (removed)
Generic label for Lightning App package
label
Nov 8, 2022
tchaton
approved these changes
Nov 8, 2022
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.
LGTM !
ethanwharris
approved these changes
Nov 8, 2022
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.
LGTM
rlizzo
force-pushed
the
rick/app-comment-commands
branch
from
November 9, 2022 12:13
2be4184
to
042d648
Compare
Borda
pushed a commit
that referenced
this pull request
Nov 10, 2022
* initial work * this seems to work well * added example test * updated docs & logging * fixed errors * fix typing error * now using the --setup flag to decide if we should execute app comment commands or not * updated tests * added tests * added test to ci * fixed failing tests * code review * updates (cherry picked from commit 10b945b)
lexierule
pushed a commit
that referenced
this pull request
Nov 10, 2022
* initial work * this seems to work well * added example test * updated docs & logging * fixed errors * fix typing error * now using the --setup flag to decide if we should execute app comment commands or not * updated tests * added tests * added test to ci * fixed failing tests * code review * updates (cherry picked from commit 10b945b)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
What does this PR do?
We want a no-brainer experience while making apps.
!
syntax on top of entry files for those wishing to prototype and move super fast.When running an app, we allow for bash commands to be run in the user (or clouds) current python environment in order to modify the environment & install requirements.
Any top level comment lines in the app or work entrypoint file will be executed if they contain the
!
symbol (just like in jupyter notebooks). For example:if we run
lightning run app ./app.py
now, we will see the following output:Please note that the environment the user above is in is preserved. In this example I was using python within a conda environment, the command was able to pick up that I ran this from a conda environment and it installed the
lmdb
package in that conda environment.If the user did not have conda installed, it would have errorer'd out with the standard
#!/bin/sh 1: conda: not found
command inline and informed me what file, line number, and command caused the error (along with what traceback to look at to address the problem)Before the e2e test will pass, we need to make a backend release which I am preparing PRs for now.
Does your PR introduce any breaking changes? If yes, please list them.
None
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃
Yes I had fun coding 😄
cc @Borda