bump-my-version 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. bump-my-version-0.2.0/CHANGELOG.md +94 -0
  2. bump-my-version-0.2.0/CODE_OF_CONDUCT.md +71 -0
  3. bump-my-version-0.2.0/CONTRIBUTING.md +217 -0
  4. bump-my-version-0.2.0/LICENSE +21 -0
  5. bump-my-version-0.2.0/MANIFEST.in +13 -0
  6. bump-my-version-0.2.0/PKG-INFO +196 -0
  7. bump-my-version-0.2.0/README.md +179 -0
  8. bump-my-version-0.2.0/bump_my_version.egg-info/PKG-INFO +196 -0
  9. bump-my-version-0.2.0/bump_my_version.egg-info/SOURCES.txt +60 -0
  10. bump-my-version-0.2.0/bump_my_version.egg-info/dependency_links.txt +1 -0
  11. bump-my-version-0.2.0/bump_my_version.egg-info/entry_points.txt +3 -0
  12. bump-my-version-0.2.0/bump_my_version.egg-info/not-zip-safe +1 -0
  13. bump-my-version-0.2.0/bump_my_version.egg-info/requires.txt +85 -0
  14. bump-my-version-0.2.0/bump_my_version.egg-info/top_level.txt +1 -0
  15. bump-my-version-0.2.0/bumpversion/__init__.py +3 -0
  16. bump-my-version-0.2.0/bumpversion/__main__.py +4 -0
  17. bump-my-version-0.2.0/bumpversion/aliases.py +32 -0
  18. bump-my-version-0.2.0/bumpversion/autocast.py +80 -0
  19. bump-my-version-0.2.0/bumpversion/bump.py +113 -0
  20. bump-my-version-0.2.0/bumpversion/cli.py +249 -0
  21. bump-my-version-0.2.0/bumpversion/config.py +383 -0
  22. bump-my-version-0.2.0/bumpversion/exceptions.py +54 -0
  23. bump-my-version-0.2.0/bumpversion/files.py +212 -0
  24. bump-my-version-0.2.0/bumpversion/functions.py +100 -0
  25. bump-my-version-0.2.0/bumpversion/logging.py +29 -0
  26. bump-my-version-0.2.0/bumpversion/scm.py +311 -0
  27. bump-my-version-0.2.0/bumpversion/utils.py +51 -0
  28. bump-my-version-0.2.0/bumpversion/version_part.py +303 -0
  29. bump-my-version-0.2.0/pyproject.toml +157 -0
  30. bump-my-version-0.2.0/requirements/dev.in +6 -0
  31. bump-my-version-0.2.0/requirements/dev.txt +276 -0
  32. bump-my-version-0.2.0/requirements/docs.in +9 -0
  33. bump-my-version-0.2.0/requirements/docs.txt +100 -0
  34. bump-my-version-0.2.0/requirements/prod.in +5 -0
  35. bump-my-version-0.2.0/requirements/prod.txt +28 -0
  36. bump-my-version-0.2.0/requirements/test.in +7 -0
  37. bump-my-version-0.2.0/requirements/test.txt +78 -0
  38. bump-my-version-0.2.0/requirements.txt +1 -0
  39. bump-my-version-0.2.0/setup.cfg +40 -0
  40. bump-my-version-0.2.0/setup.py +65 -0
  41. bump-my-version-0.2.0/tests/__init__.py +1 -0
  42. bump-my-version-0.2.0/tests/conftest.py +63 -0
  43. bump-my-version-0.2.0/tests/fixtures/basic_cfg.cfg +33 -0
  44. bump-my-version-0.2.0/tests/fixtures/basic_cfg.toml +46 -0
  45. bump-my-version-0.2.0/tests/fixtures/basic_cfg_expected.json +32 -0
  46. bump-my-version-0.2.0/tests/fixtures/glob/directory/file3.txt +0 -0
  47. bump-my-version-0.2.0/tests/fixtures/glob/file1.txt +0 -0
  48. bump-my-version-0.2.0/tests/fixtures/glob/file2.txt +0 -0
  49. bump-my-version-0.2.0/tests/fixtures/glob/not-text.md +0 -0
  50. bump-my-version-0.2.0/tests/fixtures/interpolation/.bumpversion.cfg +5 -0
  51. bump-my-version-0.2.0/tests/fixtures/interpolation/pyproject.toml +6 -0
  52. bump-my-version-0.2.0/tests/fixtures/interpolation/setup.cfg +5 -0
  53. bump-my-version-0.2.0/tests/old_tests.py +2394 -0
  54. bump-my-version-0.2.0/tests/test_autocast.py +84 -0
  55. bump-my-version-0.2.0/tests/test_bump.py +171 -0
  56. bump-my-version-0.2.0/tests/test_cli.py +211 -0
  57. bump-my-version-0.2.0/tests/test_config.py +196 -0
  58. bump-my-version-0.2.0/tests/test_files.py +300 -0
  59. bump-my-version-0.2.0/tests/test_functions.py +83 -0
  60. bump-my-version-0.2.0/tests/test_scm.py +117 -0
  61. bump-my-version-0.2.0/tests/test_version_part.py +300 -0
@@ -0,0 +1,94 @@
1
+ # Changelog
2
+
3
+ ## 0.2.0 (2023-04-14)
4
+ [Compare the full difference.](https://github.com/callowayproject/bump-my-version/compare/0.1.0...0.2.0)
5
+
6
+ ### Fixes
7
+
8
+ - Fixed configuration to allow_dirty in bumpversion. [b042e31](https://github.com/callowayproject/bump-my-version/commit/b042e31c47fe03978847552e1efea6a1acb8729e)
9
+
10
+ - Fixes issue with generate-changelog and git. [2a977af](https://github.com/callowayproject/bump-my-version/commit/2a977af4f7a7d860dbe012ae3b29eb20e482d854)
11
+
12
+ - Fixes the quoting in the bumpversion expressions. [9a55d6d](https://github.com/callowayproject/bump-my-version/commit/9a55d6d410bc6da6c451bda45f8228990bb542ab)
13
+
14
+ - Fixed issue with windows testing. [b8abc44](https://github.com/callowayproject/bump-my-version/commit/b8abc44e77d62e85f7315e4866b772f0cf6c5eff)
15
+
16
+ - different methods for reporting paths was resolved by casting them the pathlib.Paths
17
+ - Fixes windows testing error. [556853b](https://github.com/callowayproject/bump-my-version/commit/556853bd017360651b3600cce00cdd6bf00d59f0)
18
+
19
+ - the differences in path specifications seems to be causing problems.
20
+ - Fixed type issue in Python 3.7, 3.8. [ddfd3bf](https://github.com/callowayproject/bump-my-version/commit/ddfd3bf1e72109ef45307e8c76576dfe9f3e575c)
21
+
22
+ - Fixed configuration file detection. [fbf85c2](https://github.com/callowayproject/bump-my-version/commit/fbf85c2134b454043465c0211cc2204e25365ca4)
23
+
24
+ Doesn't just stop when it finds one, it checks for the existence of the header.
25
+ - Fixed logging output and output in general. [0aea9dc](https://github.com/callowayproject/bump-my-version/commit/0aea9dcd84eca1cc9b47acacbada3fc0783a5ee9)
26
+
27
+ ### New
28
+
29
+ - Added additional option to manual runs: verbose. [81eb097](https://github.com/callowayproject/bump-my-version/commit/81eb097e1e30f48f8afb7962c9af5f6a4c80ed96)
30
+
31
+ - Added new workflows. [a9cac5b](https://github.com/callowayproject/bump-my-version/commit/a9cac5b7728fabd46551926b552aba12ed91bd0c)
32
+
33
+ - Added bumpversion.yaml to increase the version when a PR is closed
34
+
35
+ - Added release.yaml to create a github relase and upload things to PyPI
36
+ - Added PYTHONUTF8 mode. [91a73e2](https://github.com/callowayproject/bump-my-version/commit/91a73e26af94185194aea1ddb803ac621c0ae84a)
37
+
38
+ - see https://docs.python.org/3/using/windows.html#utf-8-mode
39
+ - Added explicit environment variable declarations. [80fe7ef](https://github.com/callowayproject/bump-my-version/commit/80fe7ef0cf1005333143cce38835dbc9ad811884)
40
+
41
+ - Added a github CI workflow. [2b3b358](https://github.com/callowayproject/bump-my-version/commit/2b3b3585afe3fdcf13ff47a229b4e3d3b5dacdc9)
42
+
43
+ - Added files for coverage to ignore. [cfbba08](https://github.com/callowayproject/bump-my-version/commit/cfbba08f23c44dd8e44b545961cbca2599b96e69)
44
+
45
+ - __main__.py
46
+ - aliases.py
47
+ - Added LICENSE. [34a9be5](https://github.com/callowayproject/bump-my-version/commit/34a9be5617a24b9d7eb042dc12e657ef1eb4258c)
48
+
49
+ - Added tests for version parsing errors. [71a204b](https://github.com/callowayproject/bump-my-version/commit/71a204b0eb1ea2e7ae291055f26f5c499d429f1b)
50
+
51
+ - Added utf8 test in files. [9cb8f60](https://github.com/callowayproject/bump-my-version/commit/9cb8f605ba9f8095cb2b8f961f7a7a8000be16dc)
52
+
53
+ - Added more tests for scm. [fe794dd](https://github.com/callowayproject/bump-my-version/commit/fe794dd71aa3b500635379aabc3eae4d47bcb2ea)
54
+
55
+ - Added --list function. [88709fd](https://github.com/callowayproject/bump-my-version/commit/88709fd602c94c2b1bb44a503e91f4ed3ceb0e6c)
56
+
57
+ ### Other
58
+
59
+ - Removing testing for Python 3.7. [19eaeef](https://github.com/callowayproject/bump-my-version/commit/19eaeef7a29112ec96cf171df5f89c69916926f3)
60
+
61
+ - Moved configuration to pyproject.toml. [d339007](https://github.com/callowayproject/bump-my-version/commit/d3390074e8a68db0c2624d1609d166a932d20a2e)
62
+
63
+ - Initial conversion. [f5d1cab](https://github.com/callowayproject/bump-my-version/commit/f5d1cab933f44648ad4a2e6669edffdb907f6779)
64
+
65
+ - Initial commit. [d7dec79](https://github.com/callowayproject/bump-my-version/commit/d7dec79f4cad1952ea6c573e8d5975d1d4944928)
66
+
67
+ ### Updates
68
+
69
+ - Updated workflows. [857835d](https://github.com/callowayproject/bump-my-version/commit/857835d7ce10fe52633fb3cc12f52a55a117cd31)
70
+
71
+ - Added better changelog parsing
72
+ - Added workflow dispatch inputs for manual runs
73
+ - Improved documentation. [f3b7a0f](https://github.com/callowayproject/bump-my-version/commit/f3b7a0f4b1ec72e584677ff59ce4b0b6d59cd083)
74
+
75
+ - Renamed tox job to test. [a9b6db3](https://github.com/callowayproject/bump-my-version/commit/a9b6db35abae273a44e6f196e75603cb83f0c228)
76
+
77
+ - Updated README and other documentation. [e0cebb3](https://github.com/callowayproject/bump-my-version/commit/e0cebb3ecaac58a8b7a8773847079fe1a7cd3035)
78
+
79
+ - Improved Mercurial support. [560999d](https://github.com/callowayproject/bump-my-version/commit/560999dba12366837e329a2d68931d1d4f81a4d3)
80
+
81
+ - Improved logging output. [6ccfa7d](https://github.com/callowayproject/bump-my-version/commit/6ccfa7d9c65a84347368e4409b37fcf7d84bab56)
82
+
83
+ - Changed errors to subclass UsageError. [a447651](https://github.com/callowayproject/bump-my-version/commit/a4476516bd799cc047cab4cd6b42939e851a4907)
84
+
85
+ - Changed BaseVCS to SourceCodeManager. [11c5609](https://github.com/callowayproject/bump-my-version/commit/11c560982700fe4a649bd65f74dbeee2a28d8fc5)
86
+
87
+ Just for consistency.
88
+ - Modified the group command back to a single command. [6d4179b](https://github.com/callowayproject/bump-my-version/commit/6d4179b9bbba6fd81453de274468716528832b15)
89
+
90
+ Will eventually change to a group command, but later.
91
+
92
+ ## 0.1.0 (2023-03-24)
93
+
94
+ * Initial creation
@@ -0,0 +1,71 @@
1
+ # Code of Conduct - Bump My Version
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to a positive environment for our community include:
10
+
11
+ - Demonstrating empathy and kindness toward other people
12
+ - Being respectful of differing opinions, viewpoints, and experiences
13
+ - Giving and gracefully accepting constructive feedback
14
+ - Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
15
+ - Focusing on what is best not just for us as individuals, but for the overall community
16
+
17
+ Examples of unacceptable behavior include:
18
+
19
+ - The use of sexualized language or imagery, and sexual attention or advances
20
+ - Trolling, insulting or derogatory comments, and personal or political attacks
21
+ - Public or private harassment
22
+ - Publishing others’ private information, such as a physical or email address, without their explicit permission
23
+ - Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders. All complaints will be reviewed and investigated promptly and fairly.
38
+
39
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
40
+
41
+ ## Enforcement Guidelines
42
+
43
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
44
+
45
+ ### 1. Correction
46
+
47
+ **Community Impact:** Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
48
+
49
+ **Consequence:** A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
50
+
51
+ ### 2. Warning
52
+
53
+ **Community Impact:** A violation through a single incident or series of actions.
54
+
55
+ **Consequence:** A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
56
+
57
+ ### 3. Temporary Ban
58
+
59
+ **Community Impact:** A serious violation of community standards, including sustained inappropriate behavior.
60
+
61
+ **Consequence:** A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
62
+
63
+ ### 4. Permanent Ban
64
+
65
+ **Community Impact:** Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
66
+
67
+ **Consequence:** A permanent ban from any sort of public interaction within the community.
68
+
69
+ ## Attribution
70
+
71
+ This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version [1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and [2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md, and was generated by [contributing-gen](https://github.com/bttger/contributing-gen).
@@ -0,0 +1,217 @@
1
+ # Contributing to Bump My Version
2
+
3
+ First off, thanks for taking the time to contribute! ❤️
4
+
5
+ All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it much easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
6
+
7
+ > If you like the project but don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
8
+ > - Star the project
9
+ > - Tweet about it
10
+ > - Refer to this project in your project's readme
11
+ > - Mention the project at local meetups and tell your friends/colleagues
12
+
13
+ ## Table of Contents
14
+
15
+ - [Code of Conduct](#code-of-conduct)
16
+ - [I Have a Question](#i-have-a-question)
17
+ - [Reporting Bugs](#reporting-bugs)
18
+ - [Suggesting Enhancements](#suggesting-enhancements)
19
+ - [Your First Code Contribution](#your-first-code-contribution)
20
+ - [Improving The Documentation](#improving-the-documentation)
21
+ - [Styleguides](#styleguides)
22
+ - [Commit Messages](#commit-messages)
23
+ - [Join The Project Team](#join-the-project-team)
24
+
25
+
26
+ ## Code of Conduct
27
+
28
+ This project and everyone participating in it are governed by the
29
+ [Bump My Version Code of Conduct](https://github.com/callowayproject/bump-my-versionblob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior
30
+ to <coreyoordt@gmail.com>.
31
+
32
+
33
+ ## I Have a Question
34
+
35
+ > If you want to ask a question, we assume that you have read the available [Documentation](https://callowayproject.github.io/bump-my-version/).
36
+
37
+ Before you ask a question, it is best to search for existing [Issues](https://github.com/callowayproject/bump-my-version/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
38
+
39
+ If you then still feel the need to ask a question and need clarification, we recommend the following:
40
+
41
+ - Open an [Issue](https://github.com/callowayproject/bump-my-version/issues/new).
42
+ - Provide as much context as you can about what you're running into.
43
+ - Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
44
+
45
+ We will then take care of the issue as soon as possible.
46
+
47
+ ## Reporting Bugs
48
+
49
+ ### Before Submitting a Bug Report
50
+
51
+ A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information, and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
52
+
53
+ - Make sure that you are using the latest version.
54
+ - Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://callowayproject.github.io/bump-my-version/). If you are looking for support, you might want to check [this section](#i-have-a-question)).
55
+ - To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/callowayproject/bump-my-version/issues).
56
+ - Also, make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
57
+ - Collect information about the bug:
58
+ - Stack trace (Traceback)
59
+ - OS, Platform, and Version (Windows, Linux, macOS, x86, ARM)
60
+ - The version of Python
61
+ - Possibly your input and the output
62
+ - Can you reliably reproduce the issue? And can you also reproduce it with older versions?
63
+
64
+
65
+ ### How Do I Submit a Good Bug Report?
66
+
67
+ > You must never report security-related issues, vulnerabilities, or bugs that include sensitive information to the issue tracker or elsewhere in public. Instead, sensitive bugs must be sent by email to <coreyoordt@gmail.com>.
68
+
69
+ We use GitHub issues to track bugs and errors. If you run into an issue with the project:
70
+
71
+ - Open an [Issue](https://github.com/callowayproject/bump-my-version/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
72
+ - Explain the behavior you would expect and the actual behavior.
73
+ - Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports, you should isolate the problem and create a reduced test case.
74
+ - Provide the information you collected in the previous section.
75
+
76
+ Once it's filed:
77
+
78
+ - The project team will label the issue accordingly.
79
+ - A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and will not address them until they are included.
80
+ - If the team is able to reproduce the issue, the issue will be left to be [implemented by someone](#your-first-code-contribution).
81
+
82
+
83
+ ## Suggesting Enhancements
84
+
85
+ This section guides you through submitting an enhancement suggestion for Bump My Version, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
86
+
87
+ ### Before Submitting an Enhancement
88
+
89
+ - Make sure that you are using the latest version.
90
+ - Read the [documentation](https://callowayproject.github.io/bump-my-version/) carefully and find out if the functionality is already covered, maybe by an individual configuration.
91
+ - Perform a [search](https://github.com/callowayproject/bump-my-version/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
92
+ - Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
93
+
94
+ ### How Do I Submit a Good Enhancement Suggestion?
95
+
96
+ Enhancement suggestions are tracked as [GitHub issues](https://github.com/callowayproject/bump-my-version/issues).
97
+
98
+ - Use a **clear and descriptive title** for the issue to identify the suggestion.
99
+ - **Describe the problem or use case** this enhancement solves **or the new benefit** it provides.
100
+ - **Explain why this enhancement would be useful** to most Bump My Version users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
101
+ - Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
102
+ - You may also tell how current alternatives do not work for you, if appropriate
103
+
104
+ <!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
105
+
106
+ ## Your First Code Contribution
107
+
108
+
109
+ > ### Legal Notice
110
+ >
111
+ > When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
112
+
113
+ ### Setup
114
+
115
+ There are several ways to create an isolated Python development environment. This is the [default method](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment).
116
+
117
+ Run the following in a terminal:
118
+
119
+ ```console
120
+ # Clone the repository
121
+ git clone https://github.com/callowayproject/bump-my-version.git
122
+
123
+ # Enter the repository
124
+ cd bump-my-version
125
+
126
+ # Create, then activate a virtual environment
127
+ python -m venv env
128
+ source env/bin/activate
129
+
130
+ # Install the development requirements
131
+ python -m pip install -r requirements/dev.txt
132
+ ```
133
+
134
+ ### Run tests
135
+
136
+ Once setup, you should be able to run tests:
137
+
138
+ ```console
139
+ pytest
140
+ ```
141
+
142
+ ### Install Pre-commit Hooks
143
+
144
+ Pre-commit hooks are scripts that run every time you make a commit. If any of the scripts fail, it stops the commit. You can see a listing of the checks in the ``.pre-commit-config.yaml`` file.
145
+
146
+ ```console
147
+ pre-commit install
148
+ ```
149
+
150
+ ## Improving The Documentation
151
+ Please, please help us here.
152
+
153
+ ## Styleguides
154
+ ### Coding Style
155
+
156
+ All of the basic coding styles are configured into tools for fixing and checking them. [Pre-commit](https://pre-commit.com) is used to automate the process.
157
+
158
+ ### Commit Messages
159
+
160
+ **Commit messages are used to generate the change log.**
161
+
162
+ **New changes**
163
+
164
+ Commit messages are categorized as "new" if the commit message starts with:
165
+
166
+ - new
167
+ - add
168
+
169
+ For example: `Added this cool new feature` or `New document type added`.
170
+
171
+ **Updates**
172
+
173
+ Commit messages are categorized as "updates" if the commit message starts with:
174
+
175
+ - update
176
+ - change
177
+ - rename
178
+ - remove
179
+ - delete
180
+ - improve
181
+ - refacto
182
+ - chg
183
+ - modif
184
+
185
+ For example: `Modified the taxonomy schema` or `Improves performance by 419%`
186
+
187
+ **Fixes**
188
+
189
+ Commit messages are categorizes as "fixes" if the commit message starts with:
190
+
191
+ - fix
192
+
193
+ For example: `Fixes bug #123`
194
+
195
+ **Other**
196
+
197
+ All other commit messages are categorized as "other."
198
+
199
+ **Ignoring commit messages**
200
+
201
+ To have the change log generator ignore this commit, add to the summary line:
202
+
203
+ - `@minor`
204
+ - `!minor`
205
+ - `@cosmetic`
206
+ - `!cosmetic`
207
+ - `@refactor`
208
+ - `!refactor`
209
+ - `@wip`
210
+ - `!wip`
211
+
212
+ ## Join The Project Team
213
+
214
+ If you would like to be a maintainer, reach out to coreyoordt@gmail.com.
215
+
216
+ ## Attribution
217
+ This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2013-2014 Filip Noetzel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,13 @@
1
+ include AUTHORS.md
2
+ include CODE_OF_CONDUCT.md
3
+ include CHANGELOG.md
4
+ include CONTRIBUTING.md
5
+ include LICENSE
6
+ include README.md
7
+ include requirements/*.txt
8
+ include requirements/*.in
9
+ include requirements.txt
10
+
11
+ graft tests
12
+ prune __pycache__
13
+ global-exclude *.py[cod]
@@ -0,0 +1,196 @@
1
+ Metadata-Version: 2.1
2
+ Name: bump-my-version
3
+ Version: 0.2.0
4
+ Summary: Version bump your Python project
5
+ Home-page: https://github.com/callowayproject/bump-my-version
6
+ Author: Corey Oordt
7
+ Author-email: coreyoordt@gmail.com
8
+ Keywords: bumpversion
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Natural Language :: English
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Description-Content-Type: text/markdown
14
+ Provides-Extra: dev
15
+ Provides-Extra: test
16
+ License-File: LICENSE
17
+
18
+ # Bump My Version
19
+
20
+ [![image](https://img.shields.io/pypi/v/bump-my-version.svg)](https://pypi.org/project/bump-my-version/)
21
+ [![image](https://img.shields.io/pypi/l/bump-my-version.svg)](https://pypi.org/project/bump-my-version/)
22
+ [![image](https://img.shields.io/pypi/pyversions/bump-my-version.svg)](https://pypi.org/project/bump-my-version/)
23
+ [![GitHub Actions](https://github.com/callowayproject/bump-my-version/workflows/CI/badge.svg)](https://github.com/callowayproject/bump-my-version/actions)
24
+
25
+ > **NOTE**
26
+ >
27
+ > This is a maintained refactor of the [bump2version fork of](https://github.com/c4urself/bump2version) the excellent [bumpversion project](https://github.com/peritus/bumpversion). The main goals of this refactor were:
28
+ >
29
+ > - Add support for `pyproject.toml` configuration files.
30
+ > - Convert to [click](https://click.palletsprojects.com/en/8.1.x/) for and [rich](https://rich.readthedocs.io/en/stable/index.html) for the CLI interface
31
+ > - Add better configuration validation using [Pydantic](https://docs.pydantic.dev)
32
+ > - Make the code and tests easier to read and maintain
33
+
34
+
35
+ ## Overview
36
+
37
+ Version-bump your software with a single command!
38
+
39
+ A small command line tool to simplify releasing software by updating all
40
+ version strings in your source code by the correct increment. Also creates
41
+ commits and tags:
42
+
43
+ * version formats are highly configurable
44
+ * works without any source code manager, but happily reads tag information from and writes
45
+ commits and tags to Git and Mercurial if available
46
+ * just handles text files, so it's not specific to any programming language
47
+ * supports Python 3.8+ and PyPy3. Python 3.7 should work but isn't actively tested.
48
+
49
+ ## Future Direction
50
+
51
+ - Make it easier to get the current version
52
+ - Switch having both the version part and files to change as arguments on the command line.
53
+ - Make the version part argument _truly_ optional when `--new-version` is specified
54
+ - Allow for multiple tags, including one that moves for having a `v2` that always points to the latest version of version 2.
55
+ - https://github.com/c4urself/bump2version/issues/253 Have an always increment configuration
56
+ - Better UI with [Rich](https://rich.readthedocs.io/en/stable/index.html)
57
+
58
+ **Potential bugs to verify**
59
+
60
+ - https://github.com/c4urself/bump2version/issues/267 Ignore-missing error in files flag
61
+ - https://github.com/c4urself/bump2version/issues/260 Incorrect behavior when new version == current version
62
+ - https://github.com/c4urself/bump2version/issues/248 Potential bug/test case
63
+ - https://github.com/c4urself/bump2version/issues/246 Release inconsistency
64
+ - https://github.com/c4urself/bump2version/issues/233 How are relative configured file paths resolved?
65
+ - https://github.com/c4urself/bump2version/issues/225 Properly resolve configuration file through parent directories when in a git or mercurial repo
66
+ - https://github.com/c4urself/bump2version/issues/224 Verify tag doesn't exist
67
+
68
+ **Documentation opportunities**
69
+
70
+ - https://github.com/c4urself/bump2version/issues/252
71
+ - https://github.com/c4urself/bump2version/issues/247
72
+ - https://github.com/c4urself/bump2version/issues/243
73
+ - https://github.com/c4urself/bump2version/issues/240
74
+ - https://github.com/c4urself/bump2version/issues/239
75
+ - Add dates to releases in changelog
76
+ - https://github.com/c4urself/bump2version/issues/200 Add CalVer examples
77
+
78
+ ## Installation
79
+
80
+ You can download and install the latest version of this software from the Python package index (PyPI) as follows:
81
+
82
+ ```console
83
+ pip install --upgrade bump-my-version
84
+ ```
85
+
86
+ ## Changelog
87
+
88
+ Please find the changelog here: [CHANGELOG.md](CHANGELOG.md)
89
+
90
+ ## Usage
91
+
92
+ > **NOTE:**
93
+ >
94
+ > Throughout this document, you can use `bumpversion` or `bump-my-version` interchangeably.
95
+
96
+ There are two modes of operation: On the command line for single-file operation and using a configuration file for more complex multi-file operations.
97
+
98
+ bump-my-version [options] part [file]
99
+
100
+ ### `part`
101
+
102
+ _**required**_
103
+
104
+ The part of the version to increase, e.g. `minor`.
105
+
106
+ Valid values include the named groups defined in the `parse` configuration.
107
+
108
+ Example bumping 0.5.1 to 0.6.0:
109
+
110
+ bump-my-version --current-version 0.5.1 minor
111
+
112
+ ### `file`
113
+
114
+ _**[optional]**_<br />
115
+ **default**: none
116
+
117
+ Additional files to modify.
118
+
119
+ These files are added to the list of files specified in your configuration file. If you want to rewrite only files specified on the command line, also use `--no-configured-files`.
120
+
121
+ Example bumping 1.1.9 to 2.0.0:
122
+
123
+ bump-my-version --current-version 1.1.9 major setup.py
124
+
125
+ ## Configuration file
126
+
127
+ `bump-my-version` looks in four places for the configuration file to parse (in order of precedence):
128
+
129
+ 1. `--config-file <FILE>` _(command line argument)_
130
+ 2. `BUMPVERSION_CONFIG_FILE=file` _(environment variable)_
131
+ 3. `.bumpversion.cfg` _(legacy)_
132
+ 4. `.bumpversion.toml`
133
+ 5. `setup.cfg` _(legacy)_
134
+ 6. `pyproject.toml`
135
+
136
+ `.toml` files are recommended due to their type handling. We will likely drop support for `ini`-style formats in the future due to issues with formatting and parsing. You should add your configuration file to your source code management system.
137
+
138
+ By using a configuration file, you no longer need to specify those options on the command line. The configuration file also allows greater flexibility in specifying how files are modified.
139
+
140
+ ## Command-line Options
141
+
142
+ Most of the configuration values above can also be given as an option on the command line.
143
+ Additionally, the following options are available:
144
+
145
+ `--dry-run, -n`
146
+ Don't touch any files, just pretend. Best used with `--verbose`.
147
+
148
+ `--no-configured-files`
149
+ Will not update/check files specified in the configuration file.
150
+
151
+ Similar to dry-run, but will also avoid checking the files. Also useful when you want to update just one file with e.g., `bump-my-version --no-configured-files major my-file.txt`
152
+
153
+ `--verbose, -v`
154
+ Print useful information to stderr. If specified more than once, it will output more information.
155
+
156
+ `--list`
157
+ List machine-readable information to stdout for consumption by other programs.
158
+
159
+ Example output:
160
+
161
+ current_version=0.0.18
162
+ new_version=0.0.19
163
+
164
+ `-h, --help`
165
+ Print help and exit
166
+
167
+ ## Using bumpversion in a script
168
+
169
+ If you need to use the version generated by bumpversion in a script, you can make use of the `--list` option combined with `grep` and `sed`.
170
+
171
+ Say, for example, that you are using git-flow to manage your project and want to automatically create a release. When you issue `git flow release start` you need to know the new version before applying the change.
172
+
173
+ The standard way to get it in a bash script is
174
+
175
+ bump-my-version --dry-run --list <part> | grep <field name> | sed -r s,"^.*=",,
176
+
177
+ where `part` is the part of the version number you are updating. You need to specify `--dry-run` to avoid bumpversion acting.
178
+
179
+ For example, if you are updating the minor number and looking for the new version number, this becomes
180
+
181
+ bump-my-version --dry-run --list minor | grep new_version | sed -r s,"^.*=",,
182
+
183
+ ## Development & Contributing
184
+
185
+ Thank you, contributors! You can find a full list here: https://github.com/callowayproject/bump-my-version/graphs/contributors
186
+
187
+ See also our [CONTRIBUTING.md](CONTRIBUTING.md)
188
+
189
+ Development of this happens on GitHub, patches including tests, and documentation
190
+ are very welcome, as well as bug reports! Also please open an issue if this
191
+ tool does not support every aspect of bumping versions in your development
192
+ workflow, as it is intended to be very versatile.
193
+
194
+ ## License
195
+
196
+ bump-my-version is licensed under the MIT License - see the [LICENSE](LICENSE) file for details