pyiron_base.state package

Submodules

Module contents

The state module holds (almost!) all the code for defining the global state of a pyiron instance. Such “global” behaviour is achieved by using the Singleton metaclass to guarantee that each class only even has a single instance per session. These are all instantiated for the first time inside their respective module for easy access, and collected here in the init under the state object to give a single, even easier point of access.

Here’s the “almost”: Right now the database management still lives off in its own module but is referenced here and ultimately should probably be relocated here (work is ongoing on our database interaction…), and there is a JobTypeChoice class that is anyhow on the chopping block and will be deleted once we don’t need it for backwards compatibility.

class pyiron_base.state.State(*args, **kwargs)

Bases: object

A helper class to give quick and easy access to all the singleton classes which together define the state module.

logger

Self-explanatory.

publications

Bibliography of papers which should be cited based on the code that was used (alpha feature).

settings

System settings.

database

Database (or file base) connection.

queue_adapter

Configuration for using remote resources.

property database
property logger
property publications
property queue_adapter
property settings
update(config_dict: Dict | None = None) None

Re-reads the settings configuration, then reconstructs the queue adapter and reboots the database connection.

Parameters:

config_dict (dict) – A new set of configuration parameters to use. (Default is None, which attempts to read the configuration from system environment xor configuration files.)