diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..98ea8a2 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +.PHONY: help dev test clean + +default: help + +help: + @echo 'Makefile for the project' + @echo + @echo 'Usage:' + @echo ' make dev install the packages in development mode' + @echo ' make lint run linter' + @echo ' make test run tests' + @echo ' make clean clean all auxiliary files, build and test compiled files' + @echo + +dev: + # install the package in development mode + python -m pip install --upgrade pip + pip install -e .[dev] + +test: + # run unit tests and generate coverage report + python -m pytest tests/ -vv --cov=. --cov-report=html --cov-report=term-missing --junitxml=junit/coverage-results.xml + +clean: + # clean all auxiliary files, build and test compiled files + @rm -rf .pytest_cache/ */.pytest_cache/ junit/ build/ dist/ htmlcov/ .coverage + @find . -not -path './.venv*' -path '*/__pycache__*' -delete + @find . -not -path './.venv*' -path '*/*.egg-info*' -delete diff --git a/imdb_rating_classifier/generate.py b/imdb_rating_classifier/generate.py index a8c613b..6ebbd0c 100644 --- a/imdb_rating_classifier/generate.py +++ b/imdb_rating_classifier/generate.py @@ -41,7 +41,7 @@ def main(ctx: click.Context) -> None: @click.option( '--output', type=click.Path(exists=False, file_okay=True, dir_okay=False), - default=f'{BASE_DIR}/data/movies.csv', + default='movies.csv', help='The path to the output file.', ) @click.option(