2023Q3
Quick Implementation of the Squirrel Radar
- Project Description, Scope, Directory Structure
- Instructions for Dev Installation
- Code Standards
- To Manually Run the CLI to create the Radar Plot
This is a micro-project for Squirrel Squared by Oreum Industries.
- Experiments are usually based on Bayesian statistics for insurance modelling
- This package is:
- A work in progress (v0.y.z) and liable to breaking changes and inconveniences to the user
- Solely designed for ease of use and rapid development by employees of Oreum Industries, and Squirrel Squared with guidance
- This package is not:
- Intended for public usage and will not be supported for public usage
- Intended for contributions by anyone not an employee of Oreum Industries, and unsolicitied contributions will not be accepted
- Project began on 2023-07-31
- The
README.md
is MacOS and POSIX oriented - See
LICENCE.md
for licensing and copyright details - See
pyproject.toml
for authors, dependencies etc - Source code is hosted on GitHub
The repo is structured for R&D usage. The major items to be aware of are:
/
↳ dotfiles - various dotfiles to configure the repo
↳ Makefile - recipes to build the dev env
↳ README.md - this readme file
↳ LICENSE.md - licensing and copyright details
↳ src/ - Python modules
For local development on MacOS
- Install Homebrew, see instuctions at https://brew.sh
- Install
direnv
,git
$> brew update && brew upgrade
$> brew install direnv git
Assumes git
and direnv
installed as above
$> git clone https://github.com/oreum-industries/squirrel_radar
$> cd squirrel_radar
Then manually allow direnv
on MacOS to automatically run file .envrc
upon directory open
Notes:
- We use
conda
virtual envs controlled bymamba
(quicker thanconda
) - We install packages using
miniforge
(sourced from theconda-forge
repo) wherever possible and only usepip
for packages that are handled better bypip
and/or more up-to-date on pypi - Packages might not be the very latest because we want stability for
pymc
which is usually in a state of development flux - See cheat sheet of conda commands
- The
Makefile
creates a dev env and will also download and preinstallminiforge
if not yet installed on your system
From the dir above squirrel_radar/
project dir:
$> make -C squirrel_radar dev
This will also create some files to help confirm / diagnose successful installation:
dev/install_log/blas_info.txt
for theBLAS MKL
installation fornumpy
dev/install_log/pipdeptree[_rev].txt
lists installed package deps (and reversed)LICENSES_THIRD_PARTY.md
details the license for each package used
From the dir above squirrel_radar/
project dir:
$> make -C squirrel_radar uninstall-env
We use pre-commit to run a suite of automated tests for code linting & quality control and repo control prior to commit on local development machines.
- This is installed as part of
make dev
which you already ran. - See
.pre-commit-config.yaml
for details
We use GitHub Actions aka GitHub Workflows to run a suite of automated tests for commits received at the origin (i.e. GitHub)
- See
.github/workflows/*
for details
Some notes to help configure local development environment
[user]
name = <YOUR NAME>
email = <YOUR EMAIL ADDRESS>
Even when writing R&D code, we strive to meet and exceed (even define) best practices for code quality, documentation and reproducibility for modern data science projects.
We use a suite of automated tools to check and enforce code quality. We indicate the relevant shields at the top of this README. See section 1.4 above for how this is enforced at precommit on developer machines and upon PR at the origin as part of our CI process, prior to master branch merge.
These include:
black
- standardised Python lintingflake8
- addtional PEP8 Python lintingisort
- sort Python package imports
We also run a suite of general tests pre-packaged with
precommit
.
The CLI is uses typer - a Python package to create CLI apps. This gives a standardised UI/UX.
To read the CLI helptext do:
$> python src/cli.py --help
To create the Radar plot, use the create
step:
$> python src/cli.py create --scores 223334 --project-name "ABC Corp, July 2023"
Copyright 2023 Oreum OÜ t/a Oreum Industries. All rights reserved. See LICENSE.md.
Oreum OÜ t/a Oreum Industries, Sepapaja 6, Tallinn, 15551, Estonia, reg.16122291, oreum.io