Skip to main content

Core package for informatics projects at the Allen Institute for Brain Science

Project description

AIBS Informatics Core

Docs Build Status codecov


Overview

The AIBS Informatics Core library provides a collection of core functionalities and utilities for various projects at the Allen Institute for Brain Science. This library includes modules for handling environment configurations, data models, executors, and various utility functions.

Modules

Utils

The utils module provides various utility functions and classes to facilitate common tasks such as logging, hashing, and working with dictionaries and strings.

  • file_operations: Functions for working with files and directories.
  • decorators: Decorators for adding functionality to functions and methods.
  • hashing: Functions for generating hashes.
  • json: Functions for working with JSON data.
  • logging: Utilities for setting up and managing logging.
  • modules: Functions dealing with modules and imports.
  • multiprocessing: Functions for working with multiprocessing.
  • os_operations: Functions for working with the operating system.
  • time: Functions for working with time.
  • units: Functions for converting units.
  • version: Functions and classes for handling version numbers.
  • tools.dicttools: Functions for manipulating dictionaries.
  • tools.strtools: Functions for manipulating strings.

Models

The models module defines protocols and base models used for serialization and deserialization of data. This module provides base classes for creating data models and utilities for working with data models.

There are a few base classes that can be used to create data models:

  • ModelProtocol: A protocol defining the serialization/deserialization interface.
  • ModelBase: An abstract base class implementing the serialization protocol.
  • PydanticBaseModel: The primary base class for creating data models (backed by Pydantic).

Executors

The executors module provides base classes and utilities for creating and running executors. Executors are responsible for handling specific tasks or requests. They allow for validating inputs/outputs based on data models.

  • BaseExecutor: A base class for creating executors.
  • run_cli_executor: A utility function for running executors from the command line.

Env

The env module provides a concept of EnvBase which allows for creating isolated namespaces based on the type and name of environment:

env_base = EnvBase('dev-projectX')
env_base.prefixed('my_resource', 'blue')  # 'dev-projectX-my_resource-blue'

Collections

The collections module provides various collection classes and utilities for working with collections of data.

  • Classes
    • DeepChainMap: A class for creating recursive capable deep chain maps.
    • Tree: A subclass of dict for creating tree structures from sequences.
    • ValidatedStr: A class for creating validated strings based on regex patterns.
  • Mixins
    • PostInitMixin: A mixin class for handling post-initialization tasks.
    • PydanticStrMixin: A mixin for Pydantic models that provides custom string validation.
  • Enums
    • BaseEnum: A base class for creating enums.
    • OrderedEnum: A base class for creating ordered enums.
    • StrEnum: A base class for creating string enums.
    • OrderedStrEnum: A base class for creating ordered string enums.

Contributing

Any and all PRs are welcome. Please see CONTRIBUTING.md for more information.

Licensing

This software is licensed under the Allen Institute Software License, which is the 2-clause BSD license plus a third clause that prohibits redistribution and use for commercial purposes without further permission. For more information, please visit Allen Institute Terms of Use.

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

aibs_informatics_core-1.0.6.tar.gz (73.6 kB view details)

Uploaded Source

Built Distribution

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

aibs_informatics_core-1.0.6-py3-none-any.whl (92.2 kB view details)

Uploaded Python 3

File details

Details for the file aibs_informatics_core-1.0.6.tar.gz.

File metadata

  • Download URL: aibs_informatics_core-1.0.6.tar.gz
  • Upload date:
  • Size: 73.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aibs_informatics_core-1.0.6.tar.gz
Algorithm Hash digest
SHA256 ff0bc73b1f902c286b8077a1c5de53b4877af5003f062d0d5eb7536f3befe6c3
MD5 e24caa76b3f1ca37bfb0275d5a7c2381
BLAKE2b-256 f93c8e00162a38987bb3e5623451e492aa440b0d6e7d8f80a3f145fbf5c95a14

See more details on using hashes here.

Provenance

The following attestation bundles were made for aibs_informatics_core-1.0.6.tar.gz:

Publisher: release.yml on AllenInstitute/aibs-informatics-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aibs_informatics_core-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for aibs_informatics_core-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4f11e6a28f7d7c3d4c8e4e4e617165685a898eae0c237e4877ed4cb556a3ac29
MD5 7fff108d053fec4605b3596a91fbbca5
BLAKE2b-256 4edf921b96a268bfa37ae8d06c314bb89081620c1564c34c859d5738ef9436a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for aibs_informatics_core-1.0.6-py3-none-any.whl:

Publisher: release.yml on AllenInstitute/aibs-informatics-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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