Reusable settings and customization widget for the ndev-kit
Project description
ndev-settings
Reusable settings and customization widget for the ndev-kit
This napari plugin was generated with copier using the napari-plugin-template v1.1.0.
Installation
You can install ndev-settings via pip:
pip install ndev-settings
If napari is not already installed, you can install ndev-settings with napari and Qt via:
pip install "ndev-settings[all]"
To install latest development version :
pip install git+https://github.com/ndev-kit/ndev-settings.git
Use with external libraries
External libraries can provide their settings in YAML format with the same structure as your main ndev_settings.yaml.
Step 1: Create a YAML file in the external library (e.g., ndev_settings.yaml):
ndevio_Reader:
preferred_reader:
default: bioio-ome-tiff
dynamic_choices:
fallback_message: No readers found
provider: bioio.readers
tooltip: Preferred reader to use when opening images
value: bioio-ome-tiff
scene_handling:
choices:
- Open Scene Widget
- View All Scenes
- View First Scene Only
default: Open Scene Widget
tooltip: How to handle files with multiple scenes
value: View First Scene Only
clear_layers_on_new_scene:
default: false
tooltip: Whether to clear the viewer when selecting a new scene
value: false
ndevio_Export:
canvas_scale:
default: 1.0
max: 100.0
min: 0.1
tooltip: Scales exported figures and screenshots by this value
value: 1.0
override_canvas_size:
default: false
tooltip: Whether to override the canvas size when exporting canvas screenshot
value: false
canvas_size:
default: !!python/tuple
- 1024
- 1024
tooltip: Height x width of the canvas when exporting a screenshot
value: !!python/tuple
- 1024
- 1024
Step 2: Register the entry point in pyproject.toml:
[project.entry-points."ndev_settings.manifest"]
ndevio = "ndevio:ndev_settings.yaml"
Step 3: Use the autogenerated widget in napari!
Usage Example
from ndev_settings import get_settings
settings = get_settings()
# Access settings from main file
print(settings.Canvas.canvas_scale)
# Access settings from external libraries (if installed)
print(settings.Reader.preferred_reader) # From ndevio
print(settings.Export.compression_level) # From ndevio
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the BSD-3 license, "ndev-settings" is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ndev_settings-0.2.0.tar.gz.
File metadata
- Download URL: ndev_settings-0.2.0.tar.gz
- Upload date:
- Size: 59.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22a25ecafa3984cc22eacb8a2db36dbd8c03e9b45416e9a14dd09dd62d1f1cf3
|
|
| MD5 |
0403795c35bc9f72103c0701dc8e2d22
|
|
| BLAKE2b-256 |
906220c33279cd157d7ed257990dd137841405c30f89ce3002cec38a9b4b1b25
|
Provenance
The following attestation bundles were made for ndev_settings-0.2.0.tar.gz:
Publisher:
test_and_deploy.yml on ndev-kit/ndev-settings
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ndev_settings-0.2.0.tar.gz -
Subject digest:
22a25ecafa3984cc22eacb8a2db36dbd8c03e9b45416e9a14dd09dd62d1f1cf3 - Sigstore transparency entry: 467969881
- Sigstore integration time:
-
Permalink:
ndev-kit/ndev-settings@c5970fbedaa59d1fa1b4c8e559e8387f963b81c1 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ndev-kit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_and_deploy.yml@c5970fbedaa59d1fa1b4c8e559e8387f963b81c1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ndev_settings-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ndev_settings-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
654873b6bd382005dc3faca169d966ca8c07174603e1fbc26afbcbb1e8a059b4
|
|
| MD5 |
e2794b2a26a8ece183bf447fd440dac5
|
|
| BLAKE2b-256 |
5bbd8adf167b0d1d89106420eeac4476d92893be486474e8bd4acb6106ea3e00
|
Provenance
The following attestation bundles were made for ndev_settings-0.2.0-py3-none-any.whl:
Publisher:
test_and_deploy.yml on ndev-kit/ndev-settings
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ndev_settings-0.2.0-py3-none-any.whl -
Subject digest:
654873b6bd382005dc3faca169d966ca8c07174603e1fbc26afbcbb1e8a059b4 - Sigstore transparency entry: 467969889
- Sigstore integration time:
-
Permalink:
ndev-kit/ndev-settings@c5970fbedaa59d1fa1b4c8e559e8387f963b81c1 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ndev-kit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_and_deploy.yml@c5970fbedaa59d1fa1b4c8e559e8387f963b81c1 -
Trigger Event:
push
-
Statement type: