@@ -76,6 +76,9 @@ install-test: clean-build clean-pyc ## install the package and test dependencies
7676install-develop : clean-build clean-pyc # # install the package in editable mode and dependencies for development
7777 pip install -e .[dev]
7878
79+ .PHONY : install-readme
80+ install-readme : clean-build clean-pyc # # install the package in editable mode and readme dependencies for developement
81+ pip install -e .[readme]
7982
8083# LINT TARGETS
8184
@@ -112,10 +115,6 @@ test: test-unit test-integration test-readme ## test everything that needs test
112115.PHONY : test-devel
113116test-devel : lint # # test everything that needs development dependencies
114117
115- .PHONY : test-all
116- test-all : # # run tests on every Python version with tox
117- tox -r
118-
119118
120119.PHONY : coverage
121120coverage : # # check code coverage quickly with the default Python
@@ -147,26 +146,31 @@ publish-test: dist publish-confirm ## package and upload a release on TestPyPI
147146publish : dist publish-confirm # # package and upload a release
148147 twine upload dist/*
149148
150- .PHONY : bumpversion-release
151- bumpversion-release : # # Merge main to stable and bumpversion release
149+ .PHONY : git-merge-main-stable
150+ git-merge-main-stable : # # Merge main into stable
152151 git checkout stable || git checkout -b stable
153152 git merge --no-ff main -m" make release-tag: Merge branch 'main' into stable"
154- bump-my-version bump release
153+
154+ .PHONY : git-merge-stable-main
155+ git-merge-stable-main : # # Merge stable into main
156+ git checkout main
157+ git merge stable
158+
159+ .PHONY : git-push
160+ git-push : # # Simply push the repository to github
161+ git push
162+
163+ .PHONY : git-push-tags-stable
164+ git-push-tags-stable : # # Push tags and stable to github
155165 git push --tags origin stable
156166
157- .PHONY : bumpversion-release-test
158- bumpversion-release-test : # # Merge main to stable and bumpversion release
159- git checkout stable || git checkout -b stable
160- git merge --no-ff main -m" make release-tag: Merge branch 'main' into stable"
167+ .PHONY : bumpversion-release
168+ bumpversion-release : # # Bump the version to the next release
161169 bump-my-version bump release --no-tag
162- @echo git push --tags origin stable
163170
164171.PHONY : bumpversion-patch
165- bumpversion-patch : # # Merge stable to main and bumpversion patch
166- git checkout main
167- git merge stable
172+ bumpversion-patch : # # Bump the version to the next patch
168173 bump-my-version bump --no-tag patch
169- git push
170174
171175.PHONY : bumpversion-candidate
172176bumpversion-candidate : # # Bump the version to the next candidate
@@ -182,11 +186,13 @@ bumpversion-major: ## Bump the version the next major skipping the release
182186
183187.PHONY : bumpversion-revert
184188bumpversion-revert : # # Undo a previous bumpversion-release
189+ git tag --delete $(shell git tag --points-at HEAD)
185190 git checkout main
186191 git branch -D stable
187192
188193CLEAN_DIR := $(shell git status --short | grep -v ??)
189194CURRENT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
195+ CURRENT_VERSION := $(shell grep "^current_version" pyproject.toml | grep -o "dev[0-9]* ")
190196CHANGELOG_LINES := $(shell git diff HEAD..origin/stable HISTORY.md 2>&1 | wc -l)
191197
192198.PHONY : check-clean
@@ -201,41 +207,36 @@ ifneq ($(CURRENT_BRANCH),main)
201207 $(error Please make the release from main branch\n)
202208endif
203209
210+ .PHONY : check-candidate
211+ check-candidate : # # Check if a release candidate has been made
212+ ifeq ($(CURRENT_VERSION ) ,dev0)
213+ $(error Please make a release candidate and test it before atempting a release)
214+ endif
215+
204216.PHONY : check-history
205217check-history : # # Check if HISTORY.md has been modified
206218ifeq ($(CHANGELOG_LINES ) ,0)
207219 $(error Please insert the release notes in HISTORY.md before releasing)
208220endif
209221
210- .PHONY : git-push
211- git-push : # # Simply push the repository to github
212- git push
222+ .PHONY : check-deps
223+ check-deps : # Dependency targets
224+ $(eval allow_list='numpy=|pandas=|tqdm=|torch=|rdt=')
225+ pip freeze | grep -v " RDT.git" | grep -E $(allow_list ) | sort > $(OUTPUT_FILEPATH )
213226
214227.PHONY : check-release
215- check-release : check-clean check-main check-history # # Check if the release can be made
228+ check-release : check-clean check-candidate check- main check-history # # Check if the release can be made
216229 @echo " A new release can be made"
217230
218231.PHONY : release
219- release : check-release bumpversion-release publish bumpversion-patch
232+ release : check-release git-merge-main-stable bumpversion-release git-push-tags-stable \
233+ git-merge-stable-main bumpversion-patch git-push
220234
221235.PHONY : release-test
222- release-test : check-release bumpversion-release-test publish-test bumpversion-revert
236+ release-test : check-release git-merge-main-stable bumpversion-release bumpversion-revert
223237
224238.PHONY : release-candidate
225239release-candidate : check-main publish bumpversion-candidate git-push
226240
227241.PHONY : release-candidate-test
228- release-candidate-test : check-clean check-main publish-test
229-
230- .PHONY : release-minor
231- release-minor : check-release bumpversion-minor release
232-
233- .PHONY : release-major
234- release-major : check-release bumpversion-major release
235-
236- # Dependency targets
237-
238- .PHONY : check-deps
239- check-deps :
240- $(eval allow_list='numpy=|pandas=|tqdm=|torch=|rdt=')
241- pip freeze | grep -v " CTGAN.git" | grep -E $(allow_list ) > $(OUTPUT_FILEPATH )
242+ release-candidate-test : check-clean check-main publish-test
0 commit comments