Skip to content

Commit 6fe4643

Browse files
author
Gio
committed
Fixed missing covergarc and bumpversion.cfg
1 parent 2bcbec2 commit 6fe4643

File tree

5 files changed

+54
-25
lines changed

5 files changed

+54
-25
lines changed

.bumpversion.cfg

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[bumpversion]
2+
current_version = 1.1.2
3+
commit = True
4+
tag = False
5+
tag_name = "{new_version}"
6+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
7+
serialize =
8+
{major}.{minor}.{patch}
9+
10+
[bumpversion:file:src/relativedeltafield/__init__.py]
11+
search = __version__ = '{current_version}'
12+
replace = __version__ = '{new_version}'
13+
14+
;[bumpversion:file:pyproject.toml]
15+
;search = version = {current_version}
16+
;replace = {new_version}
17+
;

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
!.*.example
44
!.travis.yml
55
!.editorconfig
6+
!tests/.coveragerc
7+
!.bumpversion.cfg
68

79
~build/
810

Makefile

+4-25
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,16 @@
1-
.PHONY: help
1+
.PHONY: help buil
22
.DEFAULT_GOAL := help
33

4-
define BROWSER_PYSCRIPT
5-
import os, webbrowser, sys
6-
7-
from urllib.request import pathname2url
8-
9-
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
10-
endef
11-
export BROWSER_PYSCRIPT
12-
13-
define PRINT_HELP_PYSCRIPT
14-
import re, sys
15-
16-
for line in sys.stdin:
17-
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
18-
if match:
19-
target, help = match.groups()
20-
print("%-20s %s" % (target, help))
21-
endef
22-
export PRINT_HELP_PYSCRIPT
23-
24-
BROWSER := python -c "$$BROWSER_PYSCRIPT"
254

265
help:
27-
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
6+
@echo "Bumps version"
287

298

30-
bump: ## Bumps version
9+
bump:
3110
@while :; do \
3211
read -r -p "bumpversion [major/minor/patch]: " PART; \
3312
case "$$PART" in \
3413
major|minor|patch) break ;; \
3514
esac \
3615
done ; \
37-
bumpversion --no-commit --allow-dirty $$PART
16+
bumpversion --no-commit --allow-dirty $$PART

src/relativedeltafield/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
from datetime import timedelta
99
from dateutil.relativedelta import relativedelta
1010

11+
__version__ = '1.1.2'
12+
1113
# This is not quite ISO8601, as it allows the SQL/Postgres extension
1214
# of allowing a minus sign in the values, and you can mix weeks with
1315
# other units (which ISO doesn't allow).

tests/.coveragerc

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[run]
2+
branch = True
3+
source = relativedeltafield
4+
include =
5+
6+
# omit = django
7+
8+
[report]
9+
# Regexes for lines to exclude from consideration
10+
exclude_lines =
11+
# Have to re-enable the standard pragma
12+
pragma: no cover
13+
pragma: no-cover
14+
# Don't complain about missing debug-only code:
15+
def __repr__
16+
if self\.debug
17+
# Don't complain if tests don't hit defensive assertion code:
18+
raise AssertionError
19+
raise NotImplementedError
20+
# Don't complain if non-runnable code isn't run:
21+
#if 0:
22+
if __name__ == .__main__.:
23+
raise template.TemplateSyntaxError
24+
raise ImproperlyConfigure
25+
26+
ignore_errors = True
27+
28+
[html]
29+
directory = ~build/coverage

0 commit comments

Comments
 (0)