Skip to main content

CI codecov CodeQL Code Style Check CodeFactor GitHub repo size GitHub license GitHub release (latest by date) PyPI - Status PyPI - Python Version Streamlit App

This package implements the models presented in Fumagalli et al. (2020) (note, that the version from 2020 is implemented). Additionally, extensions from the models are explained in Extension of Fumagalli et al (2020).pdf.

Installation

You can either install the package (functionality only) or download the whole repository (with documentation and assets).

Package

Install the latest release from PyPi:

$ pip install Fumagalli-Motta-Tarantino-2020

Or install this package directly from source:

$ pip install git+https://github.com/manuelbieri/Fumagalli_2020.git

The necessary dependencies are automatically installed during the setup.

Repository

If you would like to get the whole repository, download it here or clone it with GIT (requires GIT installation):

$ git clone https://github.com/manuelbieri/Fumagalli_2020.git

Install the dependencies for the repository with the following command (Note: Make sure you are operating in the same directory, where the requirements.txt is located.):

$ pip install -r requirements.txt

Note: This package requires a working latex installation for the plots!

Basic Usage

import Fumagalli_Motta_Tarantino_2020 as FMT20

# initialize the model (here you can adjust the parameters of the model)
# all other models conform to the interface defined in FMT20.OptimalMergerPolicy
model: FMT20.OptimalMergerPolicy = FMT20.OptimalMergerPolicy()

# print a summary of the outcome
print(model.summary())

# plot a model overview
FMT20.Overview(model).show()

# open the API-documentation
FMT20.docs()

# open the GitHub-repository
FMT20.repo()

A tutorial is included with the notebook Tutorial.ipynb. Additionally, find the latest documentation including all the details on manuelbieri.ch/fumagalli_2020.

Note: mybinder.org is currently not supported, since this package needs at least python 3.9.

Overview

This sections provides a quick overview for this repository.

Assets

Additional files about the code style (scripts), class diagram and a more detailed project overview (Fumagalli_Motta_Tarantino_2020.Project).

Docs

Contains the files of the automatically generated API - documentation

Fumagalli_Motta_Tarantino_2020

Contains the actual code of the package. See Fumagalli_Motta_Tarantino_2020.Models and Fumagalli_Motta_Tarantino_2020.Visualizations for the available models and visualization options. In Fumagalli_Motta_Tarantino_2020.Notebooks are some jupyter notebooks included (e.g., Interactive.ipynb or Tutorial.ipynb).

Tests

Run the unittests shipped in Fumagalli_Motta_Tarantino_2020.Tests with the following command (pay attention to the current working directory):

$ python -m unittest discover Fumagalli_Motta_Tarantino_2020.Tests

For explanations about the tests, have a look at Fumagalli_Motta_Tarantino_2020.Tests. See codecov.io for a detailed report about the test coverage.

Code style

As the default code style Black is used and automatically checked and enforced by GitHub - workflows. To run black in the terminal either run assets/code style/run_black.sh or use the following command:

$ python -m black ./Fumagalli_Motta_Tarantino_2020

This command modifies the source code if the preset rules are not met. You can as well just check, whether the rules are met or not with assets/code style/check_black.sh or:

$ python -m black ./../../Fumagalli_Motta_Tarantino_2020 --diff

Generate Documentation

Generate the documentation with the following command (as always be aware of the working directory):
$ pdoc -o docs Fumagalli_Motta_Tarantino_2020 --docformat numpy --math

or run the shell-script docs/build.sh in the terminal.

Release files for Fumagalli-Motta-Tarantino-2020 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Fumagalli-Motta-Tarantino-2020 1.0.2
File Size Uploaded
fumagalli_motta_tarantino_2020-1.0.2.tar.gz 2.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for Fumagalli-Motta-Tarantino-2020 1.0.2
File Interpreter ABI Platform
Fumagalli_Motta_Tarantino_2020-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 4.5 MB

Release files / fumagalli_motta_tarantino_2020-1.0.2.tar.gz

Download URL fumagalli_motta_tarantino_2020-1.0.2.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
57cf02864da9e6277301af0f0231d43a15f8851c3454529b2000857941681d1d
BLAKE2b-256 checksum
How to use checksums
ad1956bc502c95c597209e545dffc6636b1c02ae0008768dc804fdb23e4f3f7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release files / Fumagalli_Motta_Tarantino_2020-1.0.2-py3-none-any.whl

Download URL Fumagalli_Motta_Tarantino_2020-1.0.2-py3-none-any.whl
Size 2.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
611fc8b4b475a2d8a73f12d1e7026b2bd6549b69517ca8e922f23a97fc1d86b2
BLAKE2b-256 checksum
How to use checksums
52ece086e968d442164b98e73850ddbf5514663b5da28ffa1d77a7613d6f5c05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page