Skip to content

Commit bb717b9

Browse files
authored
chore: Update makefile (open-feature#31)
* align Makefile with python-sdk one and add missing init target Signed-off-by: gruebel <[email protected]> * remove unused flake8 and isort config files Signed-off-by: gruebel <[email protected]> --------- Signed-off-by: gruebel <[email protected]>
1 parent c5584ee commit bb717b9

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

.flake8

Lines changed: 0 additions & 3 deletions
This file was deleted.

.isort.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Python 3.8 and above are supported by the SDK.
1212

1313
### Installation and Dependencies
1414

15-
A [`Makefile`](./Makefile) has been included in the project which should make it straightforward to start the project locally. We utilize virtual environments (see [`virtualenv`](https://docs.python.org/3/tutorial/venv.html)) in order to provide isolated development environments for the project. This reduces the risk of invalid or corrupt global packages. It also integrates nicely with Make, which will detect changes in the `requirements-dev.txt` file and update the virtual environment if any occur.
15+
A [`Makefile`](./Makefile) has been included in the project which should make it straightforward to start the project locally. We utilize virtual environments (see [`virtualenv`](https://docs.python.org/3/tutorial/venv.html)) in order to provide isolated development environments for the project. This reduces the risk of invalid or corrupt global packages. It also integrates nicely with Make, which will detect changes in the `requirements.txt` file and update the virtual environment if any occur.
1616

1717
Run `make init` to initialize the project's virtual environment and install all dev dependencies.
1818

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
21
VENV_NAME ?= .venv
32
VENV_ACTIVATE = . $(VENV_NAME)/bin/activate
4-
PYTHON = ${VENV_NAME}/bin/python3
53

64
.DEFAULT_GOAL := help
75

6+
.PHONY: init
7+
init: venv
8+
89
.PHONY: help
910
help:
1011
@echo "Targets:"
1112
@echo " requirements Installs dependencies"
1213
@echo " venv Creates a virtual environment and install dependencies"
1314
@echo " test Run pytest on the tests/ directory"
14-
@echo " lint Check code with flake8 and black"
15-
@echo " format Format code with black"
15+
@echo " lint Check code with ruff"
16+
@echo " format Format code with ruff-format"
1617

1718
.PHONY: requirements
1819
requirements:
@@ -29,7 +30,7 @@ grpc:
2930

3031
.PHONY: venv
3132
venv: $(VENV_NAME)
32-
python3 -m venv $(VENV_NAME)
33+
test -d $(VENV_NAME) || python3 -m venv $(VENV_NAME)
3334
$(VENV_ACTIVATE); pip install -r requirements.txt
3435

3536
.PHONY: test

0 commit comments

Comments
 (0)