pyiron.base.settings.generic module¶
-
class
pyiron.base.settings.generic.
Settings
(*args, **kwargs)[source]¶ Bases:
object
The settings object can either search for an configuration file and use the default configuration only when no other configuration file is found, or it can be forced to use the default configuration file.
- Parameters
config (dict) – Provide a dict with the configuration.
-
property
database
¶
-
property
database_is_disabled
¶
-
property
login_user
¶ Get the username of the current user
- Returns
username
- Return type
str
-
open_connection
()[source]¶ Internal function to open the connection to the database. Only after this function is called the database is accessable.
-
property
project_check_enabled
¶
-
property
publication
¶
-
publication_add
(pub_dict)[source]¶ Add a publication to the list of publications
- Parameters
pub_dict (dict) – The key should be the name of the code used and the value a list of publications to cite.
-
property
publication_lst
¶ List of publications currently in use.
- Returns
list of publications
- Return type
list
-
property
queue_adapter
¶
-
property
resource_paths
¶ Get the path where the potentials for the individual Hamiltons are located
- Returns
path of paths
- Return type
list
-
switch_to_local_database
(file_name='pyiron.db', cwd=None)[source]¶ Swtich to an local SQLite based database.
- Parameters
file_name (str) – SQLite database file name
cwd (str/None) – directory where the SQLite database file is located in
-
switch_to_user_mode
()[source]¶ Switch from viewer mode to user mode - if viewer_mode is enable pyiron has read only access to the database.
-
class
pyiron.base.settings.generic.
Singleton
[source]¶ Bases:
type
Implemented with suggestions from
http://stackoverflow.com/questions/6760685/creating-a-singleton-in-python