30 lines
733 B
Python
30 lines
733 B
Python
# %%
|
|
import yaml
|
|
import logging
|
|
from Utilities.Shading import calculate_shading_fraction
|
|
|
|
logging.basicConfig(
|
|
level=logging.INFO,
|
|
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
|
datefmt="%Y-%m-%d %H:%M:%S",
|
|
)
|
|
|
|
stream_handler = logging.StreamHandler()
|
|
stream_handler.setLevel(logging.INFO)
|
|
stream_formatter = logging.Formatter("%(levelname)s: %(message)s")
|
|
stream_handler.setFormatter(stream_formatter)
|
|
logging.getLogger().addHandler(stream_handler)
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
config_path = "config.yml"
|
|
|
|
with open(config_path, "r") as file:
|
|
c = yaml.safe_load(file)
|
|
logger.info("Configuration loaded successfully.")
|
|
logger.debug(f"Configuration: {c}")
|
|
|
|
calculate_shading_fraction(c)
|
|
|
|
# %%
|