Skip to content

Commit a5df868

Browse files
authored
merge(#87): hotfix on dependencies
Development
2 parents df8b1f2 + e18cb6d commit a5df868

File tree

7 files changed

+53
-37
lines changed

7 files changed

+53
-37
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ python:
66
- '3.6'
77

88
install:
9-
- pip install -r requirements.txt
9+
- pip install -r dev-requirements.txt
1010

1111
script:
1212
- pytest test/ -v

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ optional arguments:
104104
Pass your commit context directly
105105
-ca CO_AUTHOR, --co-author CO_AUTHOR
106106
Make your friend an co-author to the commit
107-
-nf, --no-file Disables the creation of a commiter.yml file
107+
-nf, --no-file Disables the creation of a commiter.yml or commit-helper.yml file
108108
-c {angular,karma,tagged,symphony,message}, --convention {angular,karma,tagged,symphony,message}
109109
Selects a convention to be used for the commit.
110-
Required if there's no commiter.yml file.
110+
Required if there's no commiter.yml or commit-helper.yml file.
111111
-d, --debug Toggles debug option
112112
113113
```
@@ -124,7 +124,7 @@ Or if you are using this for the first time in your project:
124124
$ commit --convention tagged
125125
```
126126
127-
To work even more smoothly, have in your working directory a file named **commiter.yml**. In this file you must pass the commit convention that you want to use, following the example:
127+
To work even more smoothly, have in your working directory a file named **commiter.yml or commit-helper.yml**. In this file you must pass the commit convention that you want to use, following the example:
128128
129129
```yaml
130130
convention: angular # tag(context): commit message
@@ -146,7 +146,7 @@ convention: symphony # [Tag] commit message
146146
convention: none # Commit message
147147
```
148148
149-
In case that you or your organization does already have a commit convention that is not listed above, you can configure it in the commiter.yml file as following:
149+
In case that you or your organization does already have a commit convention that is not listed above, you can configure it in the commiter.yml or commit-helper.yml file as following:
150150
151151
```yaml
152152
convention: custom

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.17
1+
3.4.18

commit_helper/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from .utils.utils import parser_cli
55
from .utils.text_utils import debug
66
from .utils.file_handler import handle_file_based_commit
7+
from .utils.file_handler import get_file_path
78
from .utils.flag_commit_handler import convention_flag_handler
89
# convention imports
910
from .conventions.convention_help_handler import convention_help_handler
@@ -16,7 +17,7 @@ def main():
1617

1718
debug('args variable', args, debug_mode)
1819

19-
file_path = Path('commiter.yml')
20+
file_path = get_file_path()
2021

2122
debug('file_path', file_path, debug_mode)
2223

commit_helper/utils/file_handler.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from os import system
2+
from pathlib import Path
23
from yaml import safe_load
34
from yaml import YAMLError
45
# utils imports
@@ -44,3 +45,13 @@ def handle_file_based_commit(file_path, debug_mode, args):
4445

4546
except YAMLError as err:
4647
print(err)
48+
49+
50+
def get_file_path(): # pragma: no cover
51+
commiter = Path('commiter.yml')
52+
commit_h = Path('commit-helper.yml')
53+
54+
if commiter.exists():
55+
return commiter
56+
else:
57+
return commit_h

dev-requirements.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
argh~=0.26.2
2+
atomicwrites~=1.3.0
3+
attrs~=19.1.0
4+
certifi~=2019.3.9
5+
chardet~=3.0.4
6+
codacy-coverage~=1.3.11
7+
codeclimate-test-reporter~=0.2.3
8+
colorama~=0.4.1
9+
colored~=1.3.93
10+
coverage~=4.5.3
11+
docopt~=0.6.2
12+
idna~=2.8
13+
more-itertools~=7.0.0
14+
pathlib~=1.0.1
15+
pathtools~=0.1.2
16+
pip~=19.0.3
17+
pluggy>=0.9.0
18+
py~=1.8.0
19+
pycodestyle~=2.5.0
20+
pytest~=4.4.0
21+
pytest-cov~=2.6.1
22+
pytest-watch~=4.2.0
23+
pyyaml>=4.2b1
24+
requests~=2.21.0
25+
setuptools~=40.8.0
26+
six~=1.12.0
27+
urllib3~=1.24.1
28+
watchdog~=0.9.0
29+
wheel~=0.33.1
30+
31+
twine~=1.13.0

requirements.txt

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,4 @@
1-
argh~=0.26.2
2-
atomicwrites~=1.3.0
3-
attrs~=19.1.0
4-
certifi~=2019.3.9
5-
chardet~=3.0.4
6-
codacy-coverage~=1.3.11
7-
codeclimate-test-reporter~=0.2.3
8-
colorama~=0.4.1
9-
colored~=1.3.93
10-
coverage~=4.5.3
11-
docopt~=0.6.2
12-
idna~=2.8
13-
more-itertools~=7.0.0
14-
pathlib~=1.0.1
15-
pathtools~=0.1.2
16-
pip~=19.0.3
17-
pluggy~=0.9.0
18-
py~=1.8.0
19-
pycodestyle~=2.5.0
20-
pytest~=4.4.0
21-
pytest-cov~=2.6.1
22-
pytest-watch~=4.2.0
1+
colorama>=0.4.1
2+
colored>=1.3.93
233
pyyaml>=4.2b1
24-
requests~=2.21.0
25-
setuptools~=40.8.0
26-
six~=1.12.0
27-
urllib3~=1.24.1
28-
watchdog~=0.9.0
29-
wheel~=0.33.1
30-
31-
twine~=1.13.0
4+
argparse>=1.2.0

0 commit comments

Comments
 (0)