Skip to main content

No project description provided

Project description

np-aind-metadata

PyPI Python version

Coverage CI/CD GitHub issues

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

np_aind_metadata-0.1.7.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

np_aind_metadata-0.1.7-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file np_aind_metadata-0.1.7.tar.gz.

File metadata

  • Download URL: np_aind_metadata-0.1.7.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.15.1 CPython/3.10.12 Linux/6.5.0-1018-azure

File hashes

Hashes for np_aind_metadata-0.1.7.tar.gz
Algorithm Hash digest
SHA256 a12da903cffb256ef48506e436701fc268ec9ac6d9bfdbc58eb66d19a5d1d371
MD5 15a77575641d0bbb8583583f4044d43a
BLAKE2b-256 cee09e52a0e4fbfc2b1df63bf0c7a1a4074c082426f9b30eb1e5fd190b4a1724

See more details on using hashes here.

File details

Details for the file np_aind_metadata-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: np_aind_metadata-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.15.1 CPython/3.10.12 Linux/6.5.0-1018-azure

File hashes

Hashes for np_aind_metadata-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 de9692830b76b6033a90ca2e1e04778b2b8368f574fbf34421a5b16f6bf58840
MD5 7e0aeffaf43648148e3d9b8740277e23
BLAKE2b-256 5beb7d9db4a1866d968a99b03f900ede5fa72b164225ccd6aee0bf77b27ac611

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page