From b351c04db779c6a8eb8da41ad3eb00554d880a75 Mon Sep 17 00:00:00 2001 From: Nitin Bhushan Date: Mon, 10 Jul 2023 17:50:06 +0000 Subject: [PATCH] added make file to simplify local dev runs --- Makefile | 41 +++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 3 ++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b186bfd --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +initialize_git: + @echo "Initializing git..." + git init + +install: + @echo "Installing..." + poetry install + +activate: + @echo "Activating virtual environment" + poetry shell + +setup_precommit: + @echo "Setting up pre-commit" + pre-commit install + +setup: initialize_git install activate setup_precommit + +test: + @echo "Running tests" + poetry run pytest + +testcov: + @echo "Generating test coverage" + poetry run pytest --cov=sequence_modelling tests/ + +format: + @echo "Formatting code using Black" + poetry run black + +precommit: + @echo "Running Pre-commit" + poetry run pre-commit run --all-files + +## Delete all compiled Python files +clean: + @echo "Cleaning up the repo" + find . -type f -name "*.py[co]" -delete + find . -type f -name ".coverage" -delete + find . -type d -name "__pycache__" -delete + rm -rf .pytest_cache diff --git a/pyproject.toml b/pyproject.toml index e97f0b7..d1dd7da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sequence_modelling" -version = "0.1.3" +version = "0.1.4" description = "sequence modelling using HMMs" authors = ["Nitin Bhushan "] readme = "README.md" @@ -14,6 +14,7 @@ scipy = "^1.10.1" Sphinx = { version = "4.2.0", optional = true } sphinx-rtd-theme = { version = "1.0.0", optional = true } sphinxcontrib-napoleon = { version = "0.7", optional = true } +pytest-cov = "^4.1.0" [tool.poetry.group.dev.dependencies] matplotlib = "^3.7.0"