From 14fcf80b23b7b773c2bc4d606d5848e24c16cf65 Mon Sep 17 00:00:00 2001 From: AnonymouX47 Date: Fri, 31 May 2024 03:48:02 +0100 Subject: [PATCH] chore: Update make targets for development setup - Change: Rename make targets for development environment setup and update target dependency. - Change: Update use of these make targets in GitHub workflows. --- .github/workflows/coverage.yml | 4 ++-- .github/workflows/format_check.yml | 4 ++-- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 2 +- .github/workflows/type_check.yml | 4 ++-- Makefile | 27 ++++++++++++++++----------- 6 files changed, 25 insertions(+), 20 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 13bea63b..f27c2f80 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -26,8 +26,8 @@ jobs: with: python-version: "3.12" - - name: Install everything - run: make install + - name: Install the package and dev dependencies + run: make dev - name: Run the tests and produce the .coverage file run: make test-cov diff --git a/.github/workflows/format_check.yml b/.github/workflows/format_check.yml index 4e42f477..a738a14c 100644 --- a/.github/workflows/format_check.yml +++ b/.github/workflows/format_check.yml @@ -25,8 +25,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: make install-req + - name: Install dev dependencies + run: make req - name: Check formatting with black run: make check-format diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0a071e0d..142b91aa 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,8 +25,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: make install-req + - name: Install dev dependencies + run: make req - name: Lint with flake8 run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da653431..56d7e151 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install the package and dev dependencies - run: make install + run: make dev - name: Test with pytest run: make test-all diff --git a/.github/workflows/type_check.yml b/.github/workflows/type_check.yml index b1681424..e76d6f12 100644 --- a/.github/workflows/type_check.yml +++ b/.github/workflows/type_check.yml @@ -25,8 +25,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: make install-req + - name: Install dev dependencies + run: make req - name: Type-check with mypy run: make type diff --git a/Makefile b/Makefile index ea46e105..4138267c 100644 --- a/Makefile +++ b/Makefile @@ -8,23 +8,28 @@ _: check test pip: python -m pip install --upgrade pip -install: install-req - python -m pip install -e . +install: pip + python -m pip install . -install-all: pip - python -m pip install --upgrade -e . -r requirements.txt -r docs/requirements.txt +install-dev: pip + python -m pip install -e . -install-req: pip +req: pip python -m pip install --upgrade -r requirements.txt -install-req-all: pip - python -m pip install --upgrade -r requirements.txt -r docs/requirements.txt - -install-req-docs: pip +req-doc: pip python -m pip install --upgrade -r docs/requirements.txt -uninstall: - pip uninstall -y term-image +req-all: req req-doc + +dev: req install-dev + +dev-doc: req-doc install-dev + +dev-all: req-all install-dev + +uninstall: pip + python -m pip uninstall --yes term-image # Pre-commit Checks and Corrections