Skip to content

Latest commit

 

History

History
88 lines (72 loc) · 2.31 KB

readme.md

File metadata and controls

88 lines (72 loc) · 2.31 KB

Collatz Python Library

What is it?

The Collatz conjecture is an unsolved number theory problem. This Python library provides tools to analyse it from different perspectives. The project has contributed to multiple scientific publications:

Main Features

The library provides the following modules:

  • automata - automatons that model certain aspects of the Collatz problem
  • commons - common functions for creating and analysing Collatz sequences
  • cycles - functions to analyse cycles in Collatz sequences
  • generator - functions to generate Collatz sequences and related features
  • graph - functions to create and analyse Collatz graphs

The project furthermore offers jupyter notebooks and scripts for data exports. The notebooks are stored as markdown files to support efficient versioning in git. The synchronisation between markdown files and ipynb files is handled by the framework jupytext (for further instructions see below).

Where to get it

The source code is currently hosted on GitHub at: https://github.com/c4ristian/collatz

Setup

conda env create -f environment.yml
conda activate collatz

Run Tests

pytest

Code Coverage

pytest --cov

Code Quality

pylint FILENAME.py

Run script

python FILENAME.py

Jupyter

Sync Notebooks

jupytext --sync notebooks/*.md
jupytext --sync notebooks/*/*.md

Pair Notebook

jupytext --set-formats ipynb,md notebooks/NOTEBOOK.ipynb

Install Kernel

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

Run Notebooks

jupyter notebook --notebook-dir="./notebooks"

License

Apache 2.0

Contact us

christian.koch@th-nuernberg.de