-
Notifications
You must be signed in to change notification settings - Fork 44
Add documentation for startup script. #846
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
Conversation
This can be done by providing a script path in a Settings » Application » Startup script. | ||
This is useful for adding a | ||
[custom colormap](https://github.com/napari/napari/blob/main/examples/dev/settings_startup_script.py) | ||
or loading a specific plugin every time napari starts. |
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.
My understanding is that the startup script is equivalent to just drag-n-drop a script immediately on a viewer? I mean in terms of order of operations and overall behavior.
Is that correct? if so, then let's mention that.
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.
Yes. Did you have a suggestion?
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.
@psobolewskiPhD what other behavior would there be? Pardon my confusion but isn't opening napari just running a series of code steps, this included?I guess we can explicitly state it but hard to imagine some other functionality, for me.
or loading a specific plugin every time napari starts. | ||
|
||
```{note} | ||
This feature is intended only for users. Plugin are not allowed to modify this setting. |
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.
This feature is intended only for users. Plugin are not allowed to modify this setting. | |
This feature is intended only for users. Plugins should not modify this setting. |
Right? they physically can, but they should not.
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.
They actually can't, not by using plugin machinery.
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.
It is blocked in the code. To set it from the plugin, you need to hack.
Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com>
Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com>
Co-authored-by: Lorenzo Gaifas <brisvag@gmail.com>
Co-authored-by: Tim Monko <timmonko@gmail.com>
References and relevant issues
Closes #842
Depends on napari/napari#8188
Description
Document the startup script feature.
Directly mention that feature is not for plugins.