himena.profile
AppProfile
Model of a profile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the profile. |
'default'
|
version
|
str
|
Version of this profile created. |
'0.3.0'
|
plugins
|
list[str]
|
List of plugins to load. |
['himena_builtins.qt.console', 'himena_builtins.qt.explorer', 'himena_builtins.qt.favorites', 'himena_builtins.qt.history', 'himena_builtins.qt.output', 'himena_builtins.qt.full_workflow', 'himena_builtins.qt.plot', 'himena_builtins.qt.array', 'himena_builtins.qt.basic', 'himena_builtins.qt.dataframe', 'himena_builtins.qt.image', 'himena_builtins.qt.ipynb', 'himena_builtins.qt.rois', 'himena_builtins.qt.stack', 'himena_builtins.qt.table', 'himena_builtins.qt.text', 'himena_builtins.tools.array', 'himena_builtins.tools.conversions', 'himena_builtins.tools.dataframe', 'himena_builtins.tools.dict', 'himena_builtins.tools.image', 'himena_builtins.tools.others', 'himena_builtins.tools.plot', 'himena_builtins.tools.table', 'himena_builtins.tools.text', 'himena_builtins.io', 'himena_builtins.new', 'himena_builtins.user_modifications']
|
theme
|
str
|
Theme to use. |
'light-green'
|
startup_commands
|
list[tuple[str, dict[str, Any] | None]]
|
Startup commands that will be executed when the app starts. |
<dynamic>
|
keybinding_overrides
|
list[KeyBindingOverride]
|
Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. |
<dynamic>
|
plugin_configs
|
dict[str, dict[str, Any]]
|
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
<class 'dict'>
|
warning_filters
|
list[WarningFilter]
|
Filters that determine which warnings are shown in the GUI. |
<dynamic>
|
Source code in src\himena\profile.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | |
default(save=False)
classmethod
Return the default profile.
Source code in src\himena\profile.py
225 226 227 228 229 230 231 | |
from_json(path)
classmethod
Construct an AppProfile from a json file.
Source code in src\himena\profile.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
is_warning_filtered(warning)
True if the warning should not be shown in the GUI.
Filters are checked in order and the first matched one determines the result,
just like the filters of the built-in warnings module.
Source code in src\himena\profile.py
262 263 264 265 266 267 268 269 270 271 | |
profile_path()
Path to this profile.
Source code in src\himena\profile.py
242 243 244 | |
save(path=None)
Save profile as a json file.
Source code in src\himena\profile.py
233 234 235 236 237 238 239 240 | |
update_plugin_config(plugin_id, **kwargs)
Update the config of the plugin specified by plugin_id
Source code in src\himena\profile.py
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
with_keybinding_override(key, command_id)
Return a new profile with new keybind overrides.
Source code in src\himena\profile.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 | |
with_name(name)
Return a new profile with a new name.
Source code in src\himena\profile.py
246 247 248 | |
with_plugin_configs(configs)
Return a new profile with new plugin configs.
Source code in src\himena\profile.py
254 255 256 | |
with_plugins(plugins)
Return a new profile with new plugins.
Source code in src\himena\profile.py
250 251 252 | |
with_warning_filters(filters)
Return a new profile with new warning filters.
Source code in src\himena\profile.py
258 259 260 | |
KeyBindingOverride
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
|
required |
command_id
|
str
|
|
required |
Source code in src\himena\profile.py
118 119 120 121 122 123 | |
WarningFilter
Filter that determines whether a warning is shown in the GUI.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
category
|
str
|
Name of the warning category, such as |
''
|
message
|
str
|
Regular expression searched in the warning message. An empty string matches any message. |
''
|
module
|
str
|
Regular expression searched in the path of the file that raised the warning. An empty string matches any file. |
''
|
Source code in src\himena\profile.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
matches(warning)
True if the given warning matches this filter.
Source code in src\himena\profile.py
146 147 148 149 150 151 152 | |
data_dir()
Get the user data directory.
Source code in src\himena\profile.py
52 53 54 55 56 | |
is_standalone_app()
Whether himena is running from the stand-alone (installer) app.
Source code in src\himena\profile.py
20 21 22 23 24 25 | |
new_app_profile(name)
Create a new profile.
Source code in src\himena\profile.py
356 357 358 359 360 361 362 363 | |
patch_user_data_dir(path)
Change the user data directory to avoid pytest updates the local state.
Source code in src\himena\profile.py
40 41 42 43 44 45 46 47 48 49 | |
remove_app_profile(name)
Remove an existing profile.
Source code in src\himena\profile.py
366 367 368 369 | |