From 6f1ddce27d0066d4d9b3cc1dc88300d00ee12b75 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 --- .github/workflows/pull-request.yaml | 2 +- CONTRIBUTING.md | 4 +++- Makefile | 24 +++++++++++++----------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 1643ca4a..61c1986b 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -22,7 +22,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - run: make deps - - run: make install + - run: make dev - run: make test # Run coverage on one of the builds, doesn't matter which - if: ${{ matrix.python-version == '3.12' }} 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: