Skip to content

Commit

Permalink
merge(#87): hotfix on dependencies
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
andre-filho authored May 22, 2019
2 parents df8b1f2 + e18cb6d commit a5df868
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ python:
- '3.6'

install:
- pip install -r requirements.txt
- pip install -r dev-requirements.txt

script:
- pytest test/ -v
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ optional arguments:
Pass your commit context directly
-ca CO_AUTHOR, --co-author CO_AUTHOR
Make your friend an co-author to the commit
-nf, --no-file Disables the creation of a commiter.yml file
-nf, --no-file Disables the creation of a commiter.yml or commit-helper.yml file
-c {angular,karma,tagged,symphony,message}, --convention {angular,karma,tagged,symphony,message}
Selects a convention to be used for the commit.
Required if there's no commiter.yml file.
Required if there's no commiter.yml or commit-helper.yml file.
-d, --debug Toggles debug option
```
Expand All @@ -124,7 +124,7 @@ Or if you are using this for the first time in your project:
$ commit --convention tagged
```
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:
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:
```yaml
convention: angular # tag(context): commit message
Expand All @@ -146,7 +146,7 @@ convention: symphony # [Tag] commit message
convention: none # Commit message
```
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:
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:
```yaml
convention: custom
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.17
3.4.18
3 changes: 2 additions & 1 deletion commit_helper/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from .utils.utils import parser_cli
from .utils.text_utils import debug
from .utils.file_handler import handle_file_based_commit
from .utils.file_handler import get_file_path
from .utils.flag_commit_handler import convention_flag_handler
# convention imports
from .conventions.convention_help_handler import convention_help_handler
Expand All @@ -16,7 +17,7 @@ def main():

debug('args variable', args, debug_mode)

file_path = Path('commiter.yml')
file_path = get_file_path()

debug('file_path', file_path, debug_mode)

Expand Down
11 changes: 11 additions & 0 deletions commit_helper/utils/file_handler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from os import system
from pathlib import Path
from yaml import safe_load
from yaml import YAMLError
# utils imports
Expand Down Expand Up @@ -44,3 +45,13 @@ def handle_file_based_commit(file_path, debug_mode, args):

except YAMLError as err:
print(err)


def get_file_path(): # pragma: no cover
commiter = Path('commiter.yml')
commit_h = Path('commit-helper.yml')

if commiter.exists():
return commiter
else:
return commit_h
31 changes: 31 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
argh~=0.26.2
atomicwrites~=1.3.0
attrs~=19.1.0
certifi~=2019.3.9
chardet~=3.0.4
codacy-coverage~=1.3.11
codeclimate-test-reporter~=0.2.3
colorama~=0.4.1
colored~=1.3.93
coverage~=4.5.3
docopt~=0.6.2
idna~=2.8
more-itertools~=7.0.0
pathlib~=1.0.1
pathtools~=0.1.2
pip~=19.0.3
pluggy>=0.9.0
py~=1.8.0
pycodestyle~=2.5.0
pytest~=4.4.0
pytest-cov~=2.6.1
pytest-watch~=4.2.0
pyyaml>=4.2b1
requests~=2.21.0
setuptools~=40.8.0
six~=1.12.0
urllib3~=1.24.1
watchdog~=0.9.0
wheel~=0.33.1

twine~=1.13.0
33 changes: 3 additions & 30 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,4 @@
argh~=0.26.2
atomicwrites~=1.3.0
attrs~=19.1.0
certifi~=2019.3.9
chardet~=3.0.4
codacy-coverage~=1.3.11
codeclimate-test-reporter~=0.2.3
colorama~=0.4.1
colored~=1.3.93
coverage~=4.5.3
docopt~=0.6.2
idna~=2.8
more-itertools~=7.0.0
pathlib~=1.0.1
pathtools~=0.1.2
pip~=19.0.3
pluggy~=0.9.0
py~=1.8.0
pycodestyle~=2.5.0
pytest~=4.4.0
pytest-cov~=2.6.1
pytest-watch~=4.2.0
colorama>=0.4.1
colored>=1.3.93
pyyaml>=4.2b1
requests~=2.21.0
setuptools~=40.8.0
six~=1.12.0
urllib3~=1.24.1
watchdog~=0.9.0
wheel~=0.33.1

twine~=1.13.0
argparse>=1.2.0

0 comments on commit a5df868

Please sign in to comment.