Skip to main content

Generated from aind-library-template

Project description

aind-metadata-extractor

Install

You should only install the dependencies for the specific extractor you plan to run. You can see the list of available extractors in the pyproject.toml file or in the folders in src/aind_metadata/extractor

During installation pass the extractor as an optional dependency:

pip install 'aind-metadata-extractor[<your-extractor>]'

Develop

Testing

When testing locally you only need to run your own tests (i.e. coverage run -m unittest discover -s tests/<new-extractor>). Do not modify the tests for other extractors in your PRs.

Before opening a PR, modify the file test_and_lint.yml and add a new test-group:

test-group: ['core', 'smartspim', 'mesoscope', 'utils', '<new-extractor>']

Then add the test-group settings below that:

    - test-group: '<new-extractor>'
    dependencies: '[dev,<new-extractor>]'
    test-path: 'tests/<new-extractor>'
    test-pattern: 'test_*.py'

When running on GitHub, all of the test groups will be run independently with their separate dependencies and then their coverage results are gathered together in a final step.

Run

Each extractor uses a JobSettings object to collect necessary information about data and metadata files to create an Extractor which is run by calling .extract(). For example, for smartspim:

from pathlib import Path

from aind_metadata_extractor.smartspim.job_settings import JobSettings
from aind_metadata_extractor.smartspim.extractor import SmartspimExtractor

DATA_DIR = Path("<path-to-your-data>)

job_settings=JobSettings(
    subject_id="786846",
    metadata_service_path="http://aind-metadata-service/slims/smartspim_imaging",
    input_source=DATA_DIR+"SmartSPIM_786846_2025-04-22_16-44-50",
    slims_datetime="2025-0422T18:30:08.915000Z"
)
extractor = SmartspimExtractor(job_settings=job_settings)
response = extractor.extract()

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

aind_metadata_extractor-0.3.1.tar.gz (50.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aind_metadata_extractor-0.3.1-py3-none-any.whl (57.5 kB view details)

Uploaded Python 3

File details

Details for the file aind_metadata_extractor-0.3.1.tar.gz.

File metadata

  • Download URL: aind_metadata_extractor-0.3.1.tar.gz
  • Upload date:
  • Size: 50.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aind_metadata_extractor-0.3.1.tar.gz
Algorithm Hash digest
SHA256 2004d37419c63577ed31a5b8d089da84bedc49d25b2c1d826c48e637553ea505
MD5 c9415a15fd9ef244af9b91d9580fb715
BLAKE2b-256 d8d3d5894a397339eb0be8e02c8aea5634d9b9890b567ec9e5db8debeeb9722c

See more details on using hashes here.

File details

Details for the file aind_metadata_extractor-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for aind_metadata_extractor-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5cf2352f3ffcbe8e2209b31de78b43a621992c3cea64a707f5a3c693e6ab1774
MD5 abd76f3aa63ca932836f2fdaee3653de
BLAKE2b-256 d6f3772ee617fc954de64b6185ef2dbe04b1d9b0fc50d89d3d28df54c9f77f4a

See more details on using hashes here.

Supported by

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