Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract code from cli.main into shorter methods #68

Merged
merged 60 commits into from Aug 24, 2019
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d500455
Extract method from main: _parse_phase_1
florisla Apr 17, 2019
938b333
Extract method from main: _setup_logging
florisla Apr 17, 2019
fb74a18
Rename parser1 to root_parser
florisla Apr 17, 2019
086c8a6
Extract method from main: _determine_vcs_is_usable
florisla Apr 17, 2019
503cb2c
Extract method from main: _determine_current_version
florisla Apr 17, 2019
316ad5d
Reshuffle extracted methods (keep them ordered)
florisla Apr 17, 2019
8491cce
Extract method from main: _determine_config_file
florisla Apr 17, 2019
5632d8c
Extract method from main: _load_configuration
florisla Apr 17, 2019
d00d784
Extract method from main: parse_phase_2
florisla Apr 17, 2019
e3d41b6
Extract method from main: _setup_versionconfig
florisla Apr 17, 2019
c9e5fef
Extract method from main: _update_current_version
florisla Apr 17, 2019
a15daa4
Extract method from main: _assemble_context
florisla Apr 17, 2019
ee605e2
Extract method from main: _assemble_new_version
florisla Apr 17, 2019
0576547
Extract method from main: parse_phase_3
florisla Apr 17, 2019
2af7d75
Extract method from main: _parse_new_version
florisla Apr 17, 2019
a58e559
Extract method from main: _determine_files
florisla Apr 17, 2019
12caeda
Reshuffle extracted methods (keep them ordered)
florisla Apr 17, 2019
7fff9a2
Extract method from main: _determine_vcs_dirty
florisla Apr 17, 2019
772390b
Extract method from main: _check_files_contain_version
florisla Apr 17, 2019
695c744
Extract method from main: _replace_version_in_files
florisla Apr 17, 2019
2946d09
Extract method from main: _log_list
florisla Apr 17, 2019
e10e096
Extract method from main: _update_config_file
florisla Apr 17, 2019
870acb6
Extract method from main: _commit_to_vcs
florisla Apr 17, 2019
dbac6ae
Extract method from main: _tag_in_vcs
florisla Apr 17, 2019
6e90254
Refactor: avoid the body-in-if antipattern
florisla Apr 17, 2019
1fcdedd
Refactor: make intent of 'if not vcs' more clear
florisla Apr 17, 2019
1322039
Refactor: improve arguments of _setup_logging
florisla Apr 17, 2019
e7e9fbc
Refactor _determine_vcs_is_usable
florisla Apr 17, 2019
36ae4ed
Refactor _determine_vcs_dirty
florisla Apr 17, 2019
59b7cd6
Refactor _determine_config_file
florisla Apr 17, 2019
100f737
Refactor _update_current_version
florisla Apr 17, 2019
8af8cb1
Refactor _assemble_current_version and _parse_phase_3
florisla Apr 17, 2019
e012ea7
Refactor arguments of _replace_version_in_files
florisla Apr 17, 2019
fb1f2d3
Refactor arguments of _log_list
florisla Apr 17, 2019
1d76403
Refactor: optimize arguments of _update_config_file
florisla Apr 17, 2019
e0518e4
Refector arguments of _determine_current_version
florisla Apr 17, 2019
9b60e06
Refactor arguments of load_configuration
florisla Apr 17, 2019
98895ca
Refactor name of _parse_phase_1
florisla Apr 17, 2019
274931e
Refactor arguments and name of _parse_phase_2
florisla Apr 17, 2019
03eab5b
Refactor arguments and name of _parse_phase_3
florisla Apr 17, 2019
401f6b3
Refactor arguments of _check_files_contain_version
florisla Apr 17, 2019
3e31a02
Refactor: move helper function below main()
florisla Apr 17, 2019
4bc4c68
Refactor arguments of _commit_to_vcs
florisla Apr 17, 2019
3f2d250
Refactor arguments of _tag_in_vcs
florisla Apr 17, 2019
99e2c73
Satisfy pylint
florisla Apr 17, 2019
9fcafdb
Use open() context manager to read configuration content
florisla Jun 13, 2019
97c7f0f
Use itertools.chain to assemble context dictionary
florisla Jun 13, 2019
6bc9323
Cleanup some cases of 'pointers' being passed
florisla Jun 13, 2019
e198fe6
Upgrade packaging dependencies (fix AppVeyor)
florisla Jun 13, 2019
f317bb4
Restore newline-retaining functionality from #59
florisla Jun 14, 2019
dd34f59
Rename vc to version_config
florisla Jun 17, 2019
8e809b5
Inline method _assemble_context
florisla Jun 17, 2019
7c78bc8
Use a single context dict
florisla Jun 17, 2019
0474179
Compile regex outside of the loop
florisla Jun 17, 2019
7c8874b
Drop method _parse_current_version
florisla Jun 17, 2019
501eac3
Inline method _determine_files
florisla Jun 17, 2019
e5f1022
Split up main() in a couple of sections
florisla Jun 17, 2019
de01bcb
Move TODO comment to the correct line
florisla Jun 17, 2019
22d981f
Use config.has_option instead of dict'ing the config
florisla Jun 17, 2019
4659ac6
Merge branch 'ekohl-review-suggestions' into shorter-main
florisla Jun 17, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions appveyor.yml
Expand Up @@ -29,6 +29,7 @@ init:
- ps: "ls C:/Python*"

install:
- "%PYTHON%/python.exe -m pip install --upgrade wheel pip setuptools virtualenv"
- "%PYTHON%/python.exe -m pip install tox"
- "%PYTHON%/python.exe -m pip install -e ."

Expand Down