{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Configuration"
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {
    "raw_mimetype": "text/restructuredtext"
   },
   "source": [
    "An analysis requires a (local) configuration. Such a configuration defines for\n",
    "instance the internal units used for the calculations, or defines the project's\n",
    "working directory.\n",
    "\n",
    "The :py:mod:`skyllh.core.config` module provides the \n",
    ":py:class:`~skyllh.core.config.Config` class. Instatiating it create a \n",
    "configuration with the default base configuration. This base configuration\n",
    "can be updated using a *yaml* file via the \n",
    ":py:meth:`~skyllh.core.Config.from_yaml` class method or a Python dictionary\n",
    "via the :py:meth:`~skyllh.core.Config.from_dict` class method. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "from skyllh.core.config import Config\n",
    "\n",
    "# Create default configuration.\n",
    "cfg = Config()"
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {
    "raw_mimetype": "text/restructuredtext"
   },
   "source": [
    "The configuration instance will be passed to the \n",
    ":py:class:`skyllh.core.analysis.Analysis` class and all other classes that need\n",
    "access to the configuration. The ``cfg`` instance is local and could be created\n",
    "several times, but should be created only once for an analysis. "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.6"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}