Skip to content

Commit 4ce601d

Browse files
committed
cleanup Makefile
1 parent 1148f7a commit 4ce601d

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

clients/python/Makefile

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ _check_venv_active:
9595
# checking whether virtual environment was activated
9696
@python3 -c "import sys; assert sys.base_prefix!=sys.prefix"
9797

98+
99+
98100
.PHONY: install-dev
99101
install-dev: _check_venv_active ## install packages for development
100102
pip install -r requirements/dev.txt
@@ -111,13 +113,17 @@ install-e2e-test: _check_venv_active ## install packages for e2e testing client
111113
install-doc: _check_venv_active install-dev ## install packages for generating documentation
112114
pip install -r $(CLIENTS_PYTHON_DIR)/requirements/doc.txt
113115

116+
117+
114118
.PHONY: pylint
115119
pylint: _check_venv_active ## runs linter (only to check errors. SEE .pylintrc enabled)
116-
pylint --rcfile "$(CLIENTS_PYTHON_DIR)/.pylintrc" -v "$(ARTIFACTS_DIR)/client"
120+
pylint --rcfile "$(CLIENTS_PYTHON_DIR)/.pylintrc" -v src/osparc
117121

118122
.PHONY: mypy
119123
mypy: $(SCRIPTS_DIR)/mypy.bash $(CLIENTS_PYTHON_DIR)/mypy.ini ## runs mypy python static type-checker on this services's code. Use AFTER make install-*
120-
@$(SCRIPTS_DIR)/mypy.bash client
124+
@$(SCRIPTS_DIR)/mypy.bash src/osparc
125+
126+
121127

122128
.PHONY: test-dev
123129
test-dev: _check_venv_active ## runs tests during development
@@ -130,26 +136,29 @@ test-dev: _check_venv_active ## runs tests during development
130136
--pdb \
131137
$(CLIENTS_PYTHON_DIR)/test/test_osparc
132138

139+
140+
133141
.PHONY: dist
134142
dist: artifacts_dir ## builds distribution wheel for `osparc_client` and `osparc` packages -> $(ARTIFACTS_DIR)/dist
135-
# installs pypa/build
143+
# Installing pypa/build ...
136144
python -m pip install build
137-
# Build a binary wheel and a source tarball
145+
# Building a binary wheel and a source tarball ...
138146
python -m build --sdist --wheel $(ARTIFACTS_DIR)/client
139147
python -m build --sdist --wheel $(CLIENTS_PYTHON_DIR)/src
148+
# Copying to artifacts/dist ...
140149
@-rm -rf $(ARTIFACTS_DIR)/dist
141150
@mkdir $(ARTIFACTS_DIR)/dist
142151
@cp $$(ls artifacts/client/dist/*.whl) $(ARTIFACTS_DIR)/dist
143152
@cp $$(ls client/dist/*.whl) $(ARTIFACTS_DIR)/dist
144153
@cp VERSION $(ARTIFACTS_DIR)/dist
145154

146-
147155
.PHONY: build-n-install-osparc-dev
148156
build-n-install-osparc-dev: python-client ## install the built osparc package in editable mode
149157
python -m pip install -e artifacts/client
150158
python -m pip install -e client/
151159

152160

161+
153162
.PHONY: postprocess-build
154163
postprocess-build:
155164
black $(ARTIFACTS_DIR)/client/*.py
@@ -160,7 +169,7 @@ postprocess-build:
160169
@cp $(REPO_ROOT)/api/openapi.json $(CLIENTS_PYTHON_DIR)/src/osparc/data/
161170

162171

163-
## TEST ---------------------------------------------------------------------------------
172+
## e2e TEST ---------------------------------------------------------------------------------
164173

165174
GH_TOKEN_FILE := $(wildcard $(HOME)/.gh-token)
166175
ifneq ($(GH_TOKEN_FILE),)

scripts/common.Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,14 @@ comma := ,
3535
help: ## help on rule's targets
3636
@awk --posix 'BEGIN {FS = ":.*?## "} /^[[:alpha:][:space:]_-]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
3737

38-
# Validate openapi specification --------------------------------------------------------------
3938

4039
validate-api-specification: ## validates openapi-specification
4140
@docker run --rm \
4241
--volume "$(REPO_ROOT):/local" \
4342
$(OPENAPI_GENERATOR_IMAGE) validate --input-spec /local/$(OPENAPI_SPECS_JSON_REL_PATH)
4443

45-
# check variables
46-
47-
# Check that given variables are set and all have non-empty values,
44+
#
45+
# check variables: check that given variables are set and all have non-empty values,
4846
# die with an error otherwise.
4947
#
5048
# Params:

0 commit comments

Comments
 (0)