Skip to content

Commit

Permalink
Remove bumpversion and use bump-my-version (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Palazzo authored Mar 5, 2024
1 parent 8da3fed commit f2a6394
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 53 deletions.
12 changes: 0 additions & 12 deletions MANIFEST.in

This file was deleted.

12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,34 +167,34 @@ publish: dist publish-confirm ## package and upload a release
bumpversion-release: ## Merge main to stable and bumpversion release
git checkout stable || git checkout -b stable
git merge --no-ff main -m"make release-tag: Merge branch 'main' into stable"
bumpversion release
bump-my-version bump release
git push --tags origin stable

.PHONY: bumpversion-release-test
bumpversion-release-test: ## Merge main to stable and bumpversion release
git checkout stable || git checkout -b stable
git merge --no-ff main -m"make release-tag: Merge branch 'main' into stable"
bumpversion release --no-tag
bump-my-version bump release --no-tag
@echo git push --tags origin stable

.PHONY: bumpversion-patch
bumpversion-patch: ## Merge stable to main and bumpversion patch
git checkout main
git merge stable
bumpversion --no-tag patch
bump-my-version bump patch --no-tag
git push

.PHONY: bumpversion-candidate
bumpversion-candidate: ## Bump the version to the next candidate
bumpversion candidate --no-tag
bump-my-version bump candidate --no-tag

.PHONY: bumpversion-minor
bumpversion-minor: ## Bump the version the next minor skipping the release
bumpversion --no-tag minor
bump-my-version bump minor --no-tag

.PHONY: bumpversion-major
bumpversion-major: ## Bump the version the next major skipping the release
bumpversion --no-tag major
bump-my-version bump major --no-tag

.PHONY: bumpversion-revert
bumpversion-revert: ## Undo a previous bumpversion-release
Expand Down
73 changes: 67 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[build-system]
requires = ['setuptools', 'wheel']
build-backend = 'setuptools.build_meta'

[project]
name = 'deepecho'
description = 'Create sequential synthetic data of mixed types using a GAN.'
Expand All @@ -19,7 +15,7 @@ classifiers = [
'Topic :: Scientific/Engineering :: Artificial Intelligence',
]
keywords = ['deepecho', 'DeepEcho']
version = '0.5.1.dev0'
dynamic = ['version']
license = { text = 'BSL-1.1' }
requires-python = '>=3.8,<3.12'
readme = 'README.md'
Expand Down Expand Up @@ -56,7 +52,7 @@ dev = [

# general
'setuptools<49.2',
'bumpversion>=0.5.3,<0.6',
'bump-my-version>=0.18.3,<1',
'pip>=9.0.1',
'watchdog>=0.8.3,<0.11',

Expand Down Expand Up @@ -99,11 +95,39 @@ dev = [

[tool.setuptools]
include-package-data = true
license-files = ['LICENSE']

[tool.setuptools.packages.find]
include = ['deepecho', 'deepecho.*']
namespaces = false

[tool.setuptools.package-data]
'*' = [
'AUTHORS.rst',
'CONTRIBUTING.rst',
'HISTORY.md',
'README.md',
'*.md',
'*.rst',
'conf.py',
'Makefile',
'make.bat',
'*.jpg',
'*.png',
'*.gif'
]
'deepecho' = ['data/demo.csv']
'tests' = ['*']

[tool.setuptools.exclude-package-data]
'*' = [
'* __pycache__',
'*.py[co]',
]

[tool.setuptools.dynamic]
version = {attr = 'deepecho.__version__'}

[tool.isort]
include_trailing_comment = true
line_length = 99
Expand All @@ -114,3 +138,40 @@ use_parentheses = true

[tool.pytest.ini_options]
collect_ignore = ['pyproject.toml']

[tool.bumpversion]
current_version = '0.5.1.dev0'
parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?'
serialize = [
'{major}.{minor}.{patch}.{release}{candidate}',
'{major}.{minor}.{patch}'
]
search = '{current_version}'
replace = '{new_version}'
regex = false
ignore_missing_version = false
tag = true
sign_tags = false
tag_name = 'v{new_version}'
tag_message = 'Bump version: {current_version} → {new_version}'
allow_dirty = false
commit = true
message = 'Bump version: {current_version} → {new_version}'
commit_args = ''

[tool.bumpversion.parts.release]
first_value = 'dev'
optional_value = 'release'
values = [
'dev',
'release'
]

[[tool.bumpversion.files]]
filename = "deepecho/__init__.py"
search = "__version__ = '{current_version}'"
replace = "__version__ = '{new_version}'"

[build-system]
requires = ['setuptools', 'wheel']
build-backend = 'setuptools.build_meta'
29 changes: 0 additions & 29 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
[bumpversion]
current_version = 0.5.1.dev0
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?
serialize =
{major}.{minor}.{patch}.{release}{candidate}
{major}.{minor}.{patch}

[bumpversion:part:release]
optional_value = release
first_value = dev
values =
dev
release

[bumpversion:part:candidate]

[bumpversion:file:pyproject.toml]
search = version='{current_version}'
replace = version='{new_version}'

[bumpversion:file:deepecho/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

[bdist_wheel]
universal = 1

[flake8]
max-line-length = 99
exclude = docs, .tox, .git, __pycache__, .ipynb_checkpoints
Expand Down

0 comments on commit f2a6394

Please sign in to comment.