Skip to content

jkoestner/morai

Repository files navigation


Morai

workflow badge license badge codecov Code style: black

Table of Contents

Overview

📖 Description:

Moirai in greek mythology are known as the fates. They are personifications of destiny. The name Morai was chosen as the package is designed to help actuaries review mortality and experience data.

🔬 Jupyter Notebook:

📊 Dashboard:

  • Morai Dashboard - Coming Soon
  • Data Input: dash_data_input
  • Data Explore: dash_explore
  • Data Experience: dash_experience
  • Data Models: dash_models
  • Table Explorer: dash_tables

Installation

Local Install

To install, this repository can be installed by running the following command in the environment of choice.

The following command can be run to install the packages in the pyproject.toml file.

pip install -e .

Docker Install

The package can also be run in docker which provides a containerized environment, and can host the web dashboard.

To run the web dashboard there are a few prerequisites.

  • Docker
version: "3.8"
services:
  morai:
    image: dmbymdt/morai:latest
    container_name: morai
    command: gunicorn -b 0.0.0.0:8001 morai.dashboard.app:server
    restart: unless-stopped
    environment:
      MORAI_FILES_PATH: /code/morai/files # setting the files path for morai
    ports:
      - '8001:8001'
    volumes:
      - $DOCKERDIR/morai/files:/code/morai/files # mounting the files directory

Usage

CLI

CLI can be used for easier commands of python scripts for both portfolio or manager. An example of a CLI command is shown below.

morai dashboard

It also can be run locally by going to the dashboard folder and running below.

python app.py

Other Tools

Jupyter Lab Usage

To have conda environments work with Jupyter Notebooks a kernel needs to be defined. This can be done defining a kernel, shown below when in the conda environment.

python -m ipykernel install --user --name=morai

Logging

If wanting to get more detail in output of messages the logging can increased

from morai.utils import custom_logger
custom_logger.set_log_level("DEBUG")

Coverage

To see the test coverage the following command is run in the root directory.

pytest --cov=morai --cov-report=html

About

Actuarial experience dashboard and predictor

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages