From a79b053c9bbec9ff7bfcd0903f60bc391af1eb0e Mon Sep 17 00:00:00 2001 From: Matthew Keeler Date: Wed, 25 Jun 2025 09:19:34 -0400 Subject: [PATCH 1/4] chore: Add missing make target; update poetry instructions --- .github/workflows/ci.yml | 4 ++-- CONTRIBUTING.md | 4 ++-- Makefile | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f7a874e..095c9122 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: - uses: ./.github/actions/build-docs - name: Run tests - run: make test + run: make test-all - name: Verify typehints run: make lint @@ -124,4 +124,4 @@ jobs: run: poetry install --all-extras - name: Run tests - run: make test + run: make test-all diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9aebeeec..a265a648 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,11 +16,11 @@ We encourage pull requests and other contributions from the community. Before su This project is built using [poetry](https://python-poetry.org/). To learn more about the basics of working with this tool, read [Poetry's basic usage guide](https://python-poetry.org/docs/basic-usage/). -To begin development, active the poetry shell and ensure your dependencies are installed. +To begin development, ensure your dependencies are installed and (optionally) activate the virtualenv. ``` -poetry shell poetry install +eval $(poetry env activate) ``` This library defines several extra dependencies to optionally enhance the SDK's capabilities. Use the following commands to install one or more of the available extras. diff --git a/Makefile b/Makefile index edf84fd9..9ee4463d 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,11 @@ install: .PHONY: test test: #! Run unit tests test: install + @LD_SKIP_DATABASE_TESTS=1 poetry run pytest $(PYTEST_FLAGS) + +.PHONY: test-all +test-all: #! Run unit tests (including database integrations) +test-all: install @poetry run pytest $(PYTEST_FLAGS) .PHONY: lint From eb83c6d4d19b28b92fbc585ebd786a167b9f23e1 Mon Sep 17 00:00:00 2001 From: Matthew Keeler Date: Wed, 25 Jun 2025 12:43:52 -0400 Subject: [PATCH 2/4] Remove suppression --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9ee4463d..43d40412 100644 --- a/Makefile +++ b/Makefile @@ -38,9 +38,9 @@ test-all: install .PHONY: lint lint: #! Run type analysis and linting checks lint: install - @poetry run mypy ldclient - @poetry run isort --check --atomic ldclient contract-tests - @poetry run pycodestyle ldclient contract-tests + poetry run mypy ldclient + poetry run isort --check --atomic ldclient contract-tests + poetry run pycodestyle ldclient contract-tests # # Documentation generation From fd00b855bd3183008425e120c909e23cdd081fac Mon Sep 17 00:00:00 2001 From: Matthew Keeler Date: Wed, 25 Jun 2025 15:41:07 -0400 Subject: [PATCH 3/4] try to make the mycache directory --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 43d40412..f2cc2cbb 100644 --- a/Makefile +++ b/Makefile @@ -38,9 +38,10 @@ test-all: install .PHONY: lint lint: #! Run type analysis and linting checks lint: install - poetry run mypy ldclient - poetry run isort --check --atomic ldclient contract-tests - poetry run pycodestyle ldclient contract-tests + @mkdir -p .mypy_cache + @poetry run mypy ldclient + @poetry run isort --check --atomic ldclient contract-tests + @poetry run pycodestyle ldclient contract-tests # # Documentation generation From 82672283a46fefae60bc4c488b0b9af3e95bb5f8 Mon Sep 17 00:00:00 2001 From: Matthew Keeler Date: Thu, 26 Jun 2025 09:57:13 -0400 Subject: [PATCH 4/4] do not make the cache directory --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index f2cc2cbb..9ee4463d 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,6 @@ test-all: install .PHONY: lint lint: #! Run type analysis and linting checks lint: install - @mkdir -p .mypy_cache @poetry run mypy ldclient @poetry run isort --check --atomic ldclient contract-tests @poetry run pycodestyle ldclient contract-tests