Skip to content
Snippets Groups Projects
Unverified Commit bc3d9992 authored by Thorsten Hater's avatar Thorsten Hater
Browse files

Black && flake

parent 25c253de
No related branches found
No related tags found
No related merge requests found
...@@ -134,11 +134,170 @@ from arbor._arbor import units ...@@ -134,11 +134,170 @@ from arbor._arbor import units
from arbor._arbor import voltage_process from arbor._arbor import voltage_process
from arbor._arbor import write_component from arbor._arbor import write_component
from . import _arbor from . import _arbor
__all__ = ['ArbFileNotFoundError', 'ArbValueError', 'MechCatItemIterator', 'MechCatKeyIterator', 'MechCatValueIterator', 'allen_catalogue', 'asc_color', 'asc_marker', 'asc_marker_set', 'asc_metadata', 'asc_spine', 'axial_resistivity', 'backend', 'bbp_catalogue', 'benchmark_cell', 'build_catalogue', 'cable', 'cable_cell', 'cable_component', 'cable_global_properties', 'cable_probe_axial_current', 'cable_probe_density_state', 'cable_probe_density_state_cell', 'cable_probe_ion_current_cell', 'cable_probe_ion_current_density', 'cable_probe_ion_diff_concentration', 'cable_probe_ion_diff_concentration_cell', 'cable_probe_ion_ext_concentration', 'cable_probe_ion_ext_concentration_cell', 'cable_probe_ion_int_concentration', 'cable_probe_ion_int_concentration_cell', 'cable_probe_membrane_voltage', 'cable_probe_membrane_voltage_cell', 'cable_probe_point_info', 'cable_probe_point_state', 'cable_probe_point_state_cell', 'cable_probe_stimulus_current_cell', 'cable_probe_total_current_cell', 'cable_probe_total_ion_current_cell', 'cable_probe_total_ion_current_density', 'catalogue', 'cell_address', 'cell_cv_data', 'cell_global_label', 'cell_kind', 'cell_local_label', 'cell_member', 'component_meta_data', 'config', 'connection', 'context', 'cv_data', 'cv_policy', 'cv_policy_every_segment', 'cv_policy_explicit', 'cv_policy_fixed_per_branch', 'cv_policy_max_extent', 'cv_policy_single', 'decor', 'default_catalogue', 'density', 'domain_decomposition', 'env', 'event_generator', 'explicit_schedule', 'ext_concentration', 'extent', 'gap_junction_connection', 'group_description', 'iclamp', 'int_concentration', 'intersect_region', 'ion_data', 'ion_dependency', 'ion_diffusivity', 'ion_settings', 'isometry', 'junction', 'label_dict', 'lif_cell', 'lif_probe_metadata', 'lif_probe_voltage', 'load_asc', 'load_catalogue', 'load_component', 'load_swc_arbor', 'load_swc_neuron', 'loaded_morphology', 'location', 'mechanism', 'mechanism_field', 'mechanism_info', 'membrane_capacitance', 'membrane_potential', 'meter_manager', 'meter_report', 'mnpos', 'modcc', 'morphology', 'morphology_provider', 'mpoint', 'msegment', 'neuroml', 'neuron_cable_properties', 'nml_metadata', 'partition_by_group', 'partition_hint', 'partition_load_balance', 'place_pwlin', 'poisson_schedule', 'print_config', 'probe', 'proc_allocation', 'profiler_initialize', 'profiler_summary', 'recipe', 'regular_schedule', 'reversal_potential', 'reversal_potential_method', 'scaled_mechanism', 'schedule_base', 'segment_tree', 'selection_policy', 'simulation', 'single_cell_model', 'spike', 'spike_recording', 'spike_source_cell', 'stochastic_catalogue', 'swc_metadata', 'synapse', 'temperature', 'threshold_detector', 'trace', 'units', 'voltage_process', 'write_component']
def build_catalogue(): __all__ = [
... "ArbFileNotFoundError",
def modcc(): "ArbValueError",
... "MechCatItemIterator",
__config__: dict = {'mpi': False, 'mpi4py': False, 'gpu': None, 'vectorize': True, 'profiling': True, 'neuroml': True, 'bundled': True, 'version': '0.9.1-dev', 'source': '2024-04-11T13:13:43+02:00 8dac3a25b35f3e73f7ad50c27bd06d018e10bb6f modified', 'build_config': 'RELEASE', 'arch': 'native', 'prefix': '/usr/local', 'python_lib_path': '/opt/homebrew/lib/python3.12/site-packages', 'binary_path': 'bin', 'lib_path': 'lib', 'data_path': 'share', 'CXX': '/opt/homebrew/bin/clang++', 'pybind-version': '2.11.1', 'timestamp': 'Apr 11 2024 20:38:51'} "MechCatKeyIterator",
__version__: str = '0.9.1-dev' "MechCatValueIterator",
"allen_catalogue",
"asc_color",
"asc_marker",
"asc_marker_set",
"asc_metadata",
"asc_spine",
"axial_resistivity",
"backend",
"bbp_catalogue",
"benchmark_cell",
"build_catalogue",
"cable",
"cable_cell",
"cable_component",
"cable_global_properties",
"cable_probe_axial_current",
"cable_probe_density_state",
"cable_probe_density_state_cell",
"cable_probe_ion_current_cell",
"cable_probe_ion_current_density",
"cable_probe_ion_diff_concentration",
"cable_probe_ion_diff_concentration_cell",
"cable_probe_ion_ext_concentration",
"cable_probe_ion_ext_concentration_cell",
"cable_probe_ion_int_concentration",
"cable_probe_ion_int_concentration_cell",
"cable_probe_membrane_voltage",
"cable_probe_membrane_voltage_cell",
"cable_probe_point_info",
"cable_probe_point_state",
"cable_probe_point_state_cell",
"cable_probe_stimulus_current_cell",
"cable_probe_total_current_cell",
"cable_probe_total_ion_current_cell",
"cable_probe_total_ion_current_density",
"catalogue",
"cell_address",
"cell_cv_data",
"cell_global_label",
"cell_kind",
"cell_local_label",
"cell_member",
"component_meta_data",
"config",
"connection",
"context",
"cv_data",
"cv_policy",
"cv_policy_every_segment",
"cv_policy_explicit",
"cv_policy_fixed_per_branch",
"cv_policy_max_extent",
"cv_policy_single",
"decor",
"default_catalogue",
"density",
"domain_decomposition",
"env",
"event_generator",
"explicit_schedule",
"ext_concentration",
"extent",
"gap_junction_connection",
"group_description",
"iclamp",
"int_concentration",
"intersect_region",
"ion_data",
"ion_dependency",
"ion_diffusivity",
"ion_settings",
"isometry",
"junction",
"label_dict",
"lif_cell",
"lif_probe_metadata",
"lif_probe_voltage",
"load_asc",
"load_catalogue",
"load_component",
"load_swc_arbor",
"load_swc_neuron",
"loaded_morphology",
"location",
"mechanism",
"mechanism_field",
"mechanism_info",
"membrane_capacitance",
"membrane_potential",
"meter_manager",
"meter_report",
"mnpos",
"modcc",
"morphology",
"morphology_provider",
"mpoint",
"msegment",
"neuroml",
"neuron_cable_properties",
"nml_metadata",
"partition_by_group",
"partition_hint",
"partition_load_balance",
"place_pwlin",
"poisson_schedule",
"print_config",
"probe",
"proc_allocation",
"profiler_initialize",
"profiler_summary",
"recipe",
"regular_schedule",
"reversal_potential",
"reversal_potential_method",
"scaled_mechanism",
"schedule_base",
"segment_tree",
"selection_policy",
"simulation",
"single_cell_model",
"spike",
"spike_recording",
"spike_source_cell",
"stochastic_catalogue",
"swc_metadata",
"synapse",
"temperature",
"threshold_detector",
"trace",
"units",
"voltage_process",
"write_component",
]
def build_catalogue(): ...
def modcc(): ...
__config__: dict = {
"mpi": False,
"mpi4py": False,
"gpu": None,
"vectorize": True,
"profiling": True,
"neuroml": True,
"bundled": True,
"version": "0.9.1-dev",
"source": "2024-04-11T13:13:43+02:00 8dac3a25b35f3e73f7ad50c27bd06d018e10bb6f modified",
"build_config": "RELEASE",
"arch": "native",
"prefix": "/usr/local",
"python_lib_path": "/opt/homebrew/lib/python3.12/site-packages",
"binary_path": "bin",
"lib_path": "lib",
"data_path": "share",
"CXX": "/opt/homebrew/bin/clang++",
"pybind-version": "2.11.1",
"timestamp": "Apr 11 2024 20:38:51",
}
__version__: str = "0.9.1-dev"
mnpos: int = 4294967295 mnpos: int = 4294967295
This diff is collapsed.
""" """
Wrappers for arborenv. Wrappers for arborenv.
""" """
from __future__ import annotations from __future__ import annotations
import arbor._arbor import arbor._arbor
import typing import typing
__all__ = ['default_allocation', 'default_concurrency', 'default_gpu', 'find_private_gpu', 'get_env_num_threads', 'thread_concurrency']
__all__ = [
"default_allocation",
"default_concurrency",
"default_gpu",
"find_private_gpu",
"get_env_num_threads",
"thread_concurrency",
]
def default_allocation() -> arbor._arbor.proc_allocation: def default_allocation() -> arbor._arbor.proc_allocation:
""" """
Attempts to detect the number of locally available CPU cores. Returns 1 if unable to detect the number of cores. Use with caution in combination with MPI. Attempts to detect the number of locally available CPU cores. Returns 1 if unable to detect the number of cores. Use with caution in combination with MPI.
""" """
def default_concurrency() -> arbor._arbor.proc_allocation: def default_concurrency() -> arbor._arbor.proc_allocation:
""" """
Returns number of threads to use from get_env_num_threads(), or else from thread_concurrency() if get_env_num_threads() returns zero. Returns number of threads to use from get_env_num_threads(), or else from thread_concurrency() if get_env_num_threads() returns zero.
""" """
def default_gpu() -> int | None: def default_gpu() -> int | None:
""" """
Determine GPU id to use from the ARBENV_GPU_ID environment variable, or from the first available GPU id of those detected. Determine GPU id to use from the ARBENV_GPU_ID environment variable, or from the first available GPU id of those detected.
""" """
def find_private_gpu(arg0: typing.Any) -> None: def find_private_gpu(arg0: typing.Any) -> None:
""" """
Identify a private GPU id per node, only available if built with GPU and MPI. Identify a private GPU id per node, only available if built with GPU and MPI.
mpi: The MPI communicator. mpi: The MPI communicator.
""" """
def get_env_num_threads() -> int: def get_env_num_threads() -> int:
""" """
Retrieve user-specified number of threads to use from the environment variable ARBENV_NUM_THREADS. Retrieve user-specified number of threads to use from the environment variable ARBENV_NUM_THREADS.
""" """
def thread_concurrency() -> int: def thread_concurrency() -> int:
""" """
Attempts to detect the number of locally available CPU cores. Returns 1 if unable to detect the number of cores. Use with caution in combination with MPI. Attempts to detect the number of locally available CPU cores. Returns 1 if unable to detect the number of cores. Use with caution in combination with MPI.
......
""" """
Units and quantities for driving the user interface. Units and quantities for driving the user interface.
""" """
from __future__ import annotations from __future__ import annotations
import typing import typing
__all__ = ['A', 'C', 'Celsius', 'F', 'Hz', 'Kelvin', 'M', 'MOhm', 'Ohm', 'S', 'V', 'cm', 'cm2', 'deg', 'giga', 'kHz', 'kOhm', 'kilo', 'm', 'm2', 'mA', 'mM', 'mS', 'mV', 'mega', 'micro', 'milli', 'mm', 'mm2', 'mol', 'ms', 'nA', 'nF', 'nano', 'nil', 'nm', 'nm2', 'ns', 'pA', 'pF', 'pico', 'quantity', 'rad', 's', 'uA', 'uF', 'uS', 'um', 'um2', 'unit', 'us']
__all__ = [
"A",
"C",
"Celsius",
"F",
"Hz",
"Kelvin",
"M",
"MOhm",
"Ohm",
"S",
"V",
"cm",
"cm2",
"deg",
"giga",
"kHz",
"kOhm",
"kilo",
"m",
"m2",
"mA",
"mM",
"mS",
"mV",
"mega",
"micro",
"milli",
"mm",
"mm2",
"mol",
"ms",
"nA",
"nF",
"nano",
"nil",
"nm",
"nm2",
"ns",
"pA",
"pF",
"pico",
"quantity",
"rad",
"s",
"uA",
"uF",
"uS",
"um",
"um2",
"unit",
"us",
]
class quantity: class quantity:
""" """
A quantity, comprising a magnitude and a unit. A quantity, comprising a magnitude and a unit.
""" """
__hash__: typing.ClassVar[None] = None __hash__: typing.ClassVar[None] = None
def __add__(self, arg0: quantity) -> quantity: def __add__(self, arg0: quantity) -> quantity: ...
... def __eq__(self, arg0: quantity) -> bool: ...
def __eq__(self, arg0: quantity) -> bool:
...
@typing.overload @typing.overload
def __mul__(self, arg0: quantity) -> quantity: def __mul__(self, arg0: quantity) -> quantity: ...
...
@typing.overload @typing.overload
def __mul__(self, arg0: float) -> quantity: def __mul__(self, arg0: float) -> quantity: ...
...
@typing.overload @typing.overload
def __mul__(self, arg0: unit) -> quantity: def __mul__(self, arg0: unit) -> quantity: ...
... def __ne__(self, arg0: quantity) -> bool: ...
def __ne__(self, arg0: quantity) -> bool: def __pow__(self: unit, arg0: int) -> unit: ...
...
def __pow__(self: unit, arg0: int) -> unit:
...
def __repr__(self) -> str: def __repr__(self) -> str:
""" """
Convert quantity to string. Convert quantity to string.
""" """
def __rmul__(self, arg0: float) -> quantity:
... def __rmul__(self, arg0: float) -> quantity: ...
def __rtruediv__(self, arg0: float) -> quantity: def __rtruediv__(self, arg0: float) -> quantity: ...
...
def __str__(self) -> str: def __str__(self) -> str:
""" """
Convert quantity to string. Convert quantity to string.
""" """
def __sub__(self, arg0: quantity) -> quantity:
... def __sub__(self, arg0: quantity) -> quantity: ...
@typing.overload @typing.overload
def __truediv__(self, arg0: quantity) -> quantity: def __truediv__(self, arg0: quantity) -> quantity: ...
...
@typing.overload @typing.overload
def __truediv__(self, arg0: float) -> quantity: def __truediv__(self, arg0: float) -> quantity: ...
...
@typing.overload @typing.overload
def __truediv__(self, arg0: unit) -> quantity: def __truediv__(self, arg0: unit) -> quantity: ...
...
def value_as(self, unit: unit) -> float: def value_as(self, unit: unit) -> float:
""" """
Convert quantity to given unit and return magnitude. Convert quantity to given unit and return magnitude.
""" """
@property @property
def units(self) -> unit: def units(self) -> unit:
""" """
Return units. Return units.
""" """
@property @property
def value(self) -> float: def value(self) -> float:
""" """
Return magnitude. Return magnitude.
""" """
class unit: class unit:
""" """
A unit. A unit.
""" """
__hash__: typing.ClassVar[None] = None __hash__: typing.ClassVar[None] = None
def __eq__(self, arg0: unit) -> bool: def __eq__(self, arg0: unit) -> bool: ...
...
@typing.overload @typing.overload
def __mul__(self, arg0: unit) -> unit: def __mul__(self, arg0: unit) -> unit: ...
...
@typing.overload @typing.overload
def __mul__(self, arg0: float) -> quantity: def __mul__(self, arg0: float) -> quantity: ...
... def __ne__(self, arg0: unit) -> bool: ...
def __ne__(self, arg0: unit) -> bool: def __pow__(self, arg0: int) -> unit: ...
...
def __pow__(self, arg0: int) -> unit:
...
def __repr__(self) -> str: def __repr__(self) -> str:
""" """
Convert unit to string. Convert unit to string.
""" """
def __rmul__(self, arg0: float) -> quantity:
... def __rmul__(self, arg0: float) -> quantity: ...
def __rtruediv__(self, arg0: float) -> quantity: def __rtruediv__(self, arg0: float) -> quantity: ...
...
def __str__(self) -> str: def __str__(self) -> str:
""" """
Convert unit to string. Convert unit to string.
""" """
@typing.overload @typing.overload
def __truediv__(self, arg0: unit) -> unit: def __truediv__(self, arg0: unit) -> unit: ...
...
@typing.overload @typing.overload
def __truediv__(self, arg0: float) -> quantity: def __truediv__(self, arg0: float) -> quantity: ...
...
A: unit # value = A A: unit # value = A
C: unit # value = C C: unit # value = C
Celsius: unit # value = °C Celsius: unit # value = °C
...@@ -132,7 +175,7 @@ ms: unit # value = ms ...@@ -132,7 +175,7 @@ ms: unit # value = ms
nA: unit # value = nA nA: unit # value = nA
nF: unit # value = nF nF: unit # value = nF
nano: unit # value = 1e-09 nano: unit # value = 1e-09
nil: unit # value = nil: unit # value =
nm: unit # value = nm nm: unit # value = nm
nm2: unit # value = nm^2 nm2: unit # value = nm^2
ns: unit # value = ns ns: unit # value = ns
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment