Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Build Status

Glia: NEURON package manager

Package manager for NEURON.

Installation

Glia can be installed from pip.

pip install nrn-glia

Usage

When Glia is imported it will check for glia packages and compile them into a library for NEURON, afterwards immediatly loading it into NEURON aswell.

from neuron import h
import glia as g

Only assets following the Glia naming convention will be included in the library and are available either directly using their namespaced name, or using glia.insert:

section = h.Section(name="soma")
# Add the default Kv1 mechanism provided in the `example` package.
section.insert("glia__example__Kv1__0")
# Preferably use glia's mechanism resolver to load your favourite Kv1 mechanism.
g.insert(section, "Kv1")

Asset management

Glia allows for multiple assets to refer to the same mechanism by giving them a unique name per package. The standard naming convention is as follows:

glia__<package-name>__<asset-name>__<variant-name>

Double underscores in packages, assets or variant names are not allowed.

This naming convention allows for multiple people to provide an implementation of the same asset, and by using variants even one package can provide multiple variations on the same mechanism.

Glia will by default use the variant 0 and if only 1 asset with the same name is found no further configuration is required. If you install multiple packages that provide the same asset, or if you would like to specify another variant you will need to instruct Glia to do so.

There are 3 different scopes for providing asset preferences:

  • Global scope: Selects a default mechanism asset.
  • Script scope: Selects a default mechanism asset for the remainder of the Python script.
  • Single use: Selects a mechanism asset for a single glia.insert call

Single use

Whenever you call glia.insert you can append your preferences for that insert:

g.insert('Kv1', pkg='not_my_models', variant='high_activity')

Script scope

Use glia.select to select a preferred mechanism asset, similar to the single use syntax:

section_global_Kv1 = h.Section()
section_local_Kv1 = h.Section()
g.insert(section_global_Kv1, 'Kv1') # Will use your global Kv1 mechanism
g.select('Kv1', pkg='not_my_models', variant='high_activity')
g.insert(section_local_Kv1, 'Kv1') # Will use the above selected Kv1 mechanism

Global scope

Applying global scope uses the Glia command-line tool and will configure glia to always select a mechanism asset as default.

Go to your favorite command-line tool and execute:

glia select Kv1 --pkg=some_pkg_name --variant=non_default

Metadata

Release files for nrn-glia 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for nrn-glia 0.1.3
File Interpreter ABI Platform Actions
nrn_glia-0.1.3-py3-none-any.whl Python 3 none any Details for nrn_glia-0.1.3-py3-none-any.whl

Release files / nrn_glia-0.1.3-py3-none-any.whl

Download URL nrn_glia-0.1.3-py3-none-any.whl
Size 23.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60423e9bf36061087d804c83a5aeeb32c98a2d2912bb4665063761d19d34f294
BLAKE2b-256 checksum
How to use checksums
1db8d9be972be0481030179e0ab7a00912cd004a3680ddf176e3e982a966ec62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Security for nrn-glia 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page