Skip to content

Commit 770db98

Browse files
committed
Use GNU Make target convention (dashes instead of underscores)
1 parent dc1ed8b commit 770db98

File tree

3 files changed

+43
-40
lines changed

3 files changed

+43
-40
lines changed

Diff for: .circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
- restore_pip_cache
9898
- restore_py_venv_cache
9999
- run: python -m venv --copies ~/.venv
100-
- run: source ~/.venv/bin/activate && make install_ci
100+
- run: source ~/.venv/bin/activate && make install-ci
101101
- save_pip_cache
102102
- save_py_venv_cache
103103
- save_project_workspace
@@ -120,12 +120,12 @@ jobs:
120120
executor: docker-executor
121121
steps:
122122
- restore_project_workspace
123-
- run: source ~/.venv/bin/activate && make check_docs
123+
- run: source ~/.venv/bin/activate && make check-docs
124124
packagecheck:
125125
executor: docker-executor
126126
steps:
127127
- restore_project_workspace
128-
- run: source ~/.venv/bin/activate && make check_package
128+
- run: source ~/.venv/bin/activate && make check-package
129129
test:
130130
executor: docker-executor
131131
steps:

Diff for: CONTRIBUTING.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Assuming you are in the cloned repository and have Python 3.5+ installed:
6363

6464
Then, having your virtualenv set up, you can run:
6565

66-
make install_dev
66+
make install-dev
6767

6868

6969
### Code checks
@@ -105,12 +105,12 @@ You can run linters separately:
105105
make flake8
106106
make mypy
107107
make pylint
108-
make check_docs
108+
make check-docs
109109

110110
In addition there is package check as well, which builds the package
111111
and performs checks on it:
112112

113-
make check_package
113+
make check-package
114114

115115
### Testing
116116

@@ -209,15 +209,15 @@ With your repository set up, you can activate virtualenv:
209209

210210
And then run
211211

212-
make build_docs
212+
make build-docs
213213

214214
Then, the compiled documentation can be found
215215
in your `docs/_build/html` subdirectory.
216216

217217
You can also edit the documentation iteratively; by running the script
218218
in watch mode:
219219

220-
make watch_docs
220+
make watch-docs
221221

222222
This will run a webserver
223223
(by default on [127.0.0.1:8000](http://127.0.0.1:8000)) so you can watch

Diff for: Makefile

+35-32
Original file line numberDiff line numberDiff line change
@@ -43,35 +43,38 @@ help: ## Display this help screen
4343
@grep -E '^[\.a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
4444

4545
.PHONY: all
46-
all: check test build check_package ## check code, test, build, check package
46+
all: check test build check-package ## check code, test, build, check package
4747

48-
.PHONY: install_dev
49-
install_dev: ## install all pip requirements and the package as editable
48+
.PHONY: install-dev
49+
install-dev: ## install all pip requirements and the package as editable
5050
${PYTHON} -m pip install -r requirements/requirements-dev.lock.txt ${ARGS}
5151
${PYTHON} -m pip install -e .
5252

53-
.PHONY: install_ci
54-
install_ci: ## install all pip requirements needed for CI and the package as editable
53+
.PHONY: install-ci
54+
install-ci: ## install all pip requirements needed for CI and the package as editable
5555
${PYTHON} -m pip install -r requirements/requirements-ci.lock.txt ${ARGS}
5656
${PYTHON} -m pip install -e .
5757

58-
.PHONY: install_test
59-
install_test: ## install all pip requirements needed for testing and the package as editable
58+
.PHONY: install-test
59+
install-test: ## install all pip requirements needed for testing and the package as editable
6060
${PYTHON} -m pip install -r requirements/requirements-test.lock.txt ${ARGS}
6161
${PYTHON} -m pip install -e .
6262

63-
.PHONY: upgrade_requirements_lockfiles
64-
upgrade_requirements_lockfiles: ## upgrade pip requirements lock files
63+
.PHONY: upgrade-requirements-lockfiles
64+
upgrade-requirements-lockfiles: ## upgrade pip requirements lock files
6565
${PIP_COMPILE} ${PIP_COMPILE_OPTS} setup.py requirements/requirements-base.in --output-file=requirements/requirements-base.lock.txt
6666
${PIP_COMPILE} ${PIP_COMPILE_OPTS} requirements/requirements-base.lock.txt requirements/requirements-test.in --output-file=requirements/requirements-test.lock.txt
6767
${PIP_COMPILE} ${PIP_COMPILE_OPTS} requirements/requirements-test.lock.txt requirements/requirements-ci.in --output-file=requirements/requirements-ci.lock.txt
6868
${PIP_COMPILE} ${PIP_COMPILE_OPTS} requirements/requirements-ci.lock.txt requirements/requirements-dev.in --output-file=requirements/requirements-dev.lock.txt
6969

70-
.PHONY: upgrade_dev
71-
upgrade_dev: upgrade_requirements_lockfiles install_dev ## upgrade all pip requirements and reinstall package as editable
70+
.PHONY: upgrade-dev
71+
upgrade-dev: upgrade-requirements-lockfiles install-dev ## upgrade all pip requirements and reinstall package as editable
7272

73-
.PHONY: upgrade_test
74-
upgrade_test: upgrade_requirements_lockfiles install_test ## upgrade all pip requirements needed for testing and reinstall package as editable
73+
.PHONY: upgrade-ci
74+
upgrade-test: upgrade-requirements-lockfiles install-ci ## upgrade all pip requirements needed for CI and reinstall package as editable
75+
76+
.PHONY: upgrade-test
77+
upgrade-test: upgrade-requirements-lockfiles install-test ## upgrade all pip requirements needed for testing and reinstall package as editable
7578

7679
.PHONY: test
7780
test: ## run tests
@@ -94,49 +97,49 @@ pylint: ## run pylint
9497
${PYLINT} ${PYLINT_OPTS} ${PACKAGE_DIR} ${DOCS_DIR} ./*.py ${ARGS}
9598
${PYLINT} ${PYLINT_OPTS} --disable=duplicate-code --disable=redefined-outer-name --disable=too-many-arguments ${TESTS_DIR} ${ARGS}
9699

97-
.PHONY: upload_package
98-
upload_package: build_package check_package ## upload the package to PyPI
100+
.PHONY: upload-package
101+
upload-package: build_package check_package ## upload the package to PyPI
99102
${TWINE} upload ${DIST_DIR}/*
100103

101-
.PHONY: check_package
102-
check_package: build_package ## check that the built package is well-formed
104+
.PHONY: check-package
105+
check-package: build_package ## check that the built package is well-formed
103106
${TWINE} check ${DIST_DIR}/*
104107

105108
.PHONY: build
106-
build: build_package ## alias for build_package
109+
build: build-package ## alias for build_package
107110

108-
.PHONY: build_package
109-
build_package: ## build package (source + wheel)
111+
.PHONY: build-package
112+
build-package: ## build package (source + wheel)
110113
-${RM} -r ${DIST_DIR}
111114
${PYTHON} -m build
112115

113-
.PHONY: bump_version_patch
114-
bump_version_patch: bump_version_check ## bump package version by the patch part
116+
.PHONY: bump-version-patch
117+
bump-version-patch: bump-version-check ## bump package version by the patch part
115118
git add CHANGELOG.md
116119
bump2version patch --allow-dirty
117120

118-
.PHONY: bump_version_minor
119-
bump_version_minor: bump_version_check ## bump package version by the minor part
121+
.PHONY: bump-version-minor
122+
bump-version-minor: bump-version_-heck ## bump package version by the minor part
120123
git add CHANGELOG.md
121124
bump2version minor --allow-dirty
122125

123-
.PHONY: bump_version_check
124-
bump_version_check:
126+
.PHONY: bump-version-check
127+
bump-version-check:
125128
git diff --name-status
126129
git diff-files --name-only | grep -q CHANGELOG.md
127130

128-
.PHONY: build_docs
129-
build_docs: ## build documentation
131+
.PHONY: build-docs
132+
build-docs: ## build documentation
130133
${SPHINXBUILD} ${SPHINXBUILD_OPTS} ${DOCS_SRC_DIR} ${DOCS_BUILD_DIR}/html ${ARGS}
131134

132-
.PHONY: check_docs
133-
check_docs: ## check that the docs do not contain any warnings / errors
135+
.PHONY: check-docs
136+
check-docs: ## check that the docs do not contain any warnings / errors
134137
${SPHINXBUILD} ${SPHINXBUILD_OPTS} ${DOCS_SRC_DIR} ${DOCS_BUILD_DIR}/html -w ${SPHINXBUILD_WARNING_LOG} ${ARGS}
135138
${CAT} ${SPHINXBUILD_WARNING_LOG}
136139
@${SHELL} -c '[ ! -s ${SPHINXBUILD_WARNING_LOG} ]'
137140

138-
.PHONY: watch_docs
139-
watch_docs: ## build documentation in watch mode (will start additonal http server)
141+
.PHONY: watch-docs
142+
watch-docs: ## build documentation in watch mode (will start additonal http server)
140143
${SPHINXAUTOBUILD} ${SPHINXAUTOBUILD_OPTS} ${DOCS_SRC_DIR} ${DOCS_BUILD_DIR}/html ${ARGS}
141144

142145
.PHONY: clean

0 commit comments

Comments
 (0)