-
Notifications
You must be signed in to change notification settings - Fork 12
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
Draft: create some apps from traitlet on startup #516
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -58,3 +60,9 @@ class JAppsConfig(SingletonConfigurable): | |||
None, | |||
help="Disallow a set of frameworks to avoid spinning up apps using those frameworks", | |||
).tag(config=True) | |||
|
|||
startup_apps = List( | |||
trait=Any, # TODO: Change this, use Instance() maybe or define a new type - https://traitlets.readthedocs.io/en/stable/defining_traits.html |
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.
I just put this dict here for testing. I want to re-use the JHubAppConfig pydantic model somehow ideally.
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.
We should accept git repos here alternatively
|
||
def instantiate_startup_apps(user_options_list: list[dict[str, Any]], username: str): | ||
# instantiate custom apps | ||
for user_options_dict in user_options_list: |
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.
I still need to add logic to only create the apps if they don't exist.
Thanks for the PR @Adam-D-Lewis, other than the gotchas to look for (as mentioned above), you're on the right path I believe. |
Reference Issues or PRs
Contains some example code of how to pass in jhub apps to be run when Jhub apps starts up. You pass in the apps as a traitlet. They should be created if they don't exist.
Related to nebari-dev/nebari#2803
What does this implement/fix?
Put a
x
in the boxes that applyTesting
Documentation
Access-centered content checklist
Text styling
H1
or#
in markdown).Non-text content
Any other comments?