@@ -50,6 +50,7 @@ clean-pyc: ## remove Python file artifacts
5050.PHONY : clean-docs
5151clean-docs : # # remove previously built docs
5252 rm -f docs/api/* .rst
53+ rm -rf docs/tutorials
5354 -$(MAKE ) -C docs clean 2> /dev/null # this fails if sphinx is not yet installed
5455
5556.PHONY : clean-coverage
@@ -86,8 +87,8 @@ install-develop: clean-build clean-pyc ## install the package in editable mode a
8687
8788.PHONY : lint
8889lint : # # check style with flake8 and isort
89- flake8 copulas tests examples
90- isort -c --recursive copulas tests examples
90+ flake8 copulas tests
91+ isort -c --recursive copulas tests
9192
9293lint-docs : # # check docs formatting with doc8 and pydocstyle
9394 doc8 . docs/
@@ -103,19 +104,23 @@ fix-lint: ## fix lint issues using autoflake, autopep8, and isort
103104 autopep8 --in-place --recursive --aggressive tests
104105 isort --apply --atomic --recursive tests
105106
106- find examples -name '*.py' | xargs autoflake --in-place --remove-all-unused-imports --remove-unused-variables
107- autopep8 --in-place --recursive --aggressive examples
108- isort --apply --atomic --recursive examples
109-
110107# TEST TARGETS
111108
112109.PHONY : test
113110test : # # run tests quickly with the default Python
114- python -m pytest --cov=copulas
111+ python -m pytest --disable-warnings --cov=copulas
112+
113+ .PHONY : test-unit
114+ test-unit : # # run tests quickly with the default Python
115+ python -m pytest --disable-warnings --cov=copulas tests/unit
116+
117+ .PHONY : test-numerical
118+ test-numerical : # # run tests quickly with the default Python
119+ python -m pytest --disable-warnings --cov=copulas tests/numerical
115120
116121.PHONY : test-all
117122test-all : # # run tests on every Python version with tox
118- tox
123+ tox -r
119124
120125.PHONY : coverage
121126coverage : # # check code coverage quickly with the default Python
@@ -129,6 +134,7 @@ coverage: ## check code coverage quickly with the default Python
129134
130135.PHONY : docs
131136docs : clean-docs # # generate Sphinx HTML documentation, including API docs
137+ cp -r tutorials docs/tutorials
132138 sphinx-apidoc --separate -o docs/api/ copulas
133139 $(MAKE ) -C docs html
134140
@@ -171,6 +177,10 @@ bumpversion-patch: ## Merge stable to master and bumpversion patch
171177 bumpversion --no-tag patch
172178 git push
173179
180+ .PHONY : bumpversion-candidate
181+ bumpversion-candidate : # # Bump the version to the next candidate
182+ bumpversion candidate --no-tag
183+
174184.PHONY : bumpversion-minor
175185bumpversion-minor : # # Bump the version the next minor skipping the release
176186 bumpversion --no-tag minor
@@ -180,22 +190,30 @@ bumpversion-major: ## Bump the version the next major skipping the release
180190 bumpversion --no-tag major
181191
182192CURRENT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
183-  CHANGELOG_LINES := $(shell git diff HEAD..origin/stable HISTORY.md 2>&1 | wc -l)
193+ CHANGELOG_LINES := $(shell git diff HEAD..origin/stable HISTORY.md 2>&1 | wc -l)
184194
185- .PHONY : check-release
186- check-release : # # Check if the release can be made
195+ .PHONY : check-master
196+ check-master : # # Check if we are in master branch
187197ifneq ($(CURRENT_BRANCH ) ,master)
188198 $(error Please make the release from master branch\n)
189199endif
200+
201+ .PHONY : check-history
202+ check-history : # # Check if HISTORY.md has been modified
190203ifeq ($(CHANGELOG_LINES ) ,0)
191204 $(error Please insert the release notes in HISTORY.md before releasing)
192- else
193- @echo "A new release can be made"
194205endif
195206
207+ .PHONY : check-release
208+ check-release : check-master check-history # # Check if the release can be made
209+ @echo " A new release can be made"
210+
196211.PHONY : release
197212release : check-release bumpversion-release publish bumpversion-patch
198213
214+ .PHONY : release-candidate
215+ release-candidate : check-master publish bumpversion-candidate
216+
199217.PHONY : release-minor
200218release-minor : check-release bumpversion-minor release
201219
0 commit comments