No project description provided
Project description
np-aind-metadata
Usage
conda create -n np_aind_metadata python>=3.10
conda activate np_aind_metadata
pip install np_aind_metadata
Python
Initialize a neuropixels rig model.
from np_aind_metadata.init import neuropixels_rig
rig_model = neuropixels_rig.init("NP3")
Update a neuropixels rig model. Currently only supports dynamic routing context.
import pathlib
from np_aind_metadata.update import dynamic_routing
dynamic_routing.update_rig(
pathlib.Path("./examples/rig.json"),
open_ephys_settings_sources=[
pathlib.Path("./examples/settings.xml")
],
output_path=pathlib.Path("./updated_rig.json"),
)
np-codeocean
This library can track and update rig jsons for np-codeocean
. np
dependency group must be installed
Initialize storage for a rig
np-aind-metadata init-rig-storage "/directory/to/store/rigs" "NP3" --date 2022/02/07
Updating via np-codeocean
import pathlib
from np_aind_metadata import np_codeocean
np_codeocean.add_rig_to_dynamic_routing_session_dir(
pathlib.Path("/session/directory"),
pathlib.Path("/directory/to/store/rigs"),
)
Local development
Testing
Testing intended for cloned project from source control.
Unit tests
pdm run pytest
Storage tests
pdm run pytest-storage
Onprem tests
Requires user to likely be on prem with np group dependencies installed.
Install np group dependencies
pdm install -G np
Run tests
pdm run pytest-onprem
All tests
Requires dependencies from onprem.
pdm run pytest-full
Development
See instructions in https://github.com/AllenInstitute/np-aind-metadata/CONTRIBUTING.md and the original template: https://github.com/AllenInstitute/copier-pdm-npc/blob/main/README.md
Project details
Release history Release notifications | RSS feed
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
Hashes for np_aind_metadata-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0507d0d851e0c665bf2f5804f0be88d9df22316d06a8e24fb6672bbd13d5cd9b |
|
MD5 | 00aea7079602fda786940f175302f1ed |
|
BLAKE2b-256 | f11f6a17fb9c91caa7cc7866a8b049fd863cf74c0d7e9fe7a3bcab5edb501d85 |