From 0ef4739d9374268bddeb7e6a933e9b72b5933023 Mon Sep 17 00:00:00 2001 From: tdstein Date: Wed, 6 Mar 2024 15:01:07 -0500 Subject: [PATCH] build: moves editable installs to make dev --- CONTRIBUTING.md | 4 +++- Makefile | 24 +++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2fc409e6..cbc849dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,9 @@ Before contributing to the `posit-sdk`, ensure that the following prerequisites 1. Commit your changes and push them to your forked repository. 1. Submit a pull request to the main repository. -Please ensure that your code follows the project's coding conventions and style guidelines using `make lint`. Also, make sure to include tests for any new functionality or bug fixes. +Please ensure that your code follows the project's coding conventions and style guidelines using the configured pre-commit hooks. Run `pre-commit install` install to configure this functionality on your machine. + +Also, make sure to include tests for any new functionality or bug fixes. ## Tooling diff --git a/Makefile b/Makefile index 22cbefb8..3b5460b2 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +.DEFAULT_GOAL := all + # Name of the project NAME := posit-sdk @@ -11,6 +13,7 @@ PYTHON := python3 cov default deps + dev fmt fix install @@ -20,12 +23,7 @@ PYTHON := python3 version # Default target that runs the necessary steps to build the project -default: - make deps - make install - make test - make lint - make build +all: deps dev test lint build # Target for building the project, which will generate the distribution files in the `dist` directory. build: @@ -54,17 +52,21 @@ cov-xml: deps: $(PIP) install -r requirements.txt -r requirements-dev.txt -# Target for formatting the code. -fmt: - $(PYTHON) -m ruff format . +# Target for installing the project in editable mode +dev: + $(PIP) install -e . # Target for fixing linting issues. fix: $(PYTHON) -m ruff check --fix -# Target for installing the project in editable mode +# Target for formatting the code. +fmt: + $(PYTHON) -m ruff format . + +# Target for installing the built distribution install: - $(PIP) install -e . + $(PIP) install dist/*.whl # Target for running static type checking and linting lint: