Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
coordt committed Jan 22, 2024
1 parent 406f97a commit 4f90348
Show file tree
Hide file tree
Showing 33 changed files with 1,631 additions and 703 deletions.
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ All types of contributions are encouraged and valued. See the [Table of Contents
- [Your First Code Contribution](#your-first-code-contribution)
- [Improving The Documentation](#improving-the-documentation)
- [Styleguides](#styleguides)
- [Commit Messages](#commit-messages)
- [Join The Project Team](#join-the-project-team)


Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ release-version: get-version do-release ## Release a specific version: release-

docs: ## generate Sphinx HTML documentation, including API docs
mkdir -p docs
rm -rf docsrc/_autosummary
ls -A1 docs | xargs -I {} rm -rf docs/{}
$(MAKE) -C docsrc clean html
cp -a docsrc/_build/html/. docs
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ Example output:
`-h, --help`
Print help and exit

## Using bumpversion in a script
## Using bump-my-version in a script

If you need to use the version generated by bumpversion in a script, you can make use of the `show` subcommand.
If you need to use the version generated by bump-my-version in a script, you can make use of the `show` subcommand.

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.

Expand Down
2 changes: 2 additions & 0 deletions docsrc/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```{include} ../LICENSE
```
12 changes: 1 addition & 11 deletions docsrc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
extensions = [
"myst_parser",
"autodoc2",
# "sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
Expand All @@ -42,16 +41,6 @@
autodoc2_output_dir = "reference"
autodoc2_index_template = None

autodoc_default_flags = [
# Make sure that any autodoc declarations show the right members
"members",
"undoc-members",
"private-members",
]
autodoc_class_signature = "separated"
autodoc_member_order = "bysource"
autodoc_typehints = "description"

autosummary_generate = True

napoleon_attr_annotations = True
Expand All @@ -72,6 +61,7 @@
"tasklist",
"fieldlist",
]
myst_heading_anchors = 2
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
}
Expand Down
4 changes: 2 additions & 2 deletions docsrc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ tutorials/index
howtos/index
reference/index
explanation/index
contributing
changelog
CONTRIBUTING
CHANGELOG
```

## Indices and tables
Expand Down
2 changes: 1 addition & 1 deletion docsrc/reference/bumpversion/bumpversion.aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

### API

`````{py:class} AliasedGroup(name: typing.Optional[str] = None, commands: typing.Optional[typing.Union[typing.Dict[str, click.core.Command], typing.Sequence[click.core.Command]]] = None, **attrs: typing.Any)
`````{py:class} AliasedGroup(*args: typing.Any, **kwargs: typing.Any)
:canonical: bumpversion.aliases.AliasedGroup
Bases: {py:obj}`rich_click.rich_group.RichGroup`
Expand Down
2 changes: 1 addition & 1 deletion docsrc/reference/bumpversion/bumpversion.bump.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
````{py:data} logger
:canonical: bumpversion.bump.logger
:value: >
None
'get_indented_logger(...)'
```{autodoc2-docstring} bumpversion.bump.logger
```
Expand Down
28 changes: 25 additions & 3 deletions docsrc/reference/bumpversion/bumpversion.cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
- ```{autodoc2-docstring} bumpversion.cli.replace
:summary:
```
* - {py:obj}`sample_config <bumpversion.cli.sample_config>`
- ```{autodoc2-docstring} bumpversion.cli.sample_config
:summary:
```
* - {py:obj}`show_bump <bumpversion.cli.show_bump>`
- ```{autodoc2-docstring} bumpversion.cli.show_bump
:summary:
```
````

### Data
Expand All @@ -50,7 +58,7 @@
````{py:data} logger
:canonical: bumpversion.cli.logger
:value: >
None
'get_indented_logger(...)'
```{autodoc2-docstring} bumpversion.cli.logger
```
Expand All @@ -64,7 +72,7 @@
```
````

````{py:function} bump(args: list, config_file: typing.Optional[str], verbose: int, allow_dirty: typing.Optional[bool], current_version: typing.Optional[str], new_version: typing.Optional[str], parse: typing.Optional[str], serialize: typing.Optional[typing.List[str]], search: typing.Optional[str], replace: typing.Optional[str], no_regex: bool, no_configured_files: bool, ignore_missing_version: bool, dry_run: bool, commit: typing.Optional[bool], tag: typing.Optional[bool], sign_tags: typing.Optional[bool], tag_name: typing.Optional[str], tag_message: typing.Optional[str], message: typing.Optional[str], commit_args: typing.Optional[str], show_list: bool) -> None
````{py:function} bump(args: list, config_file: typing.Optional[str], verbose: int, allow_dirty: typing.Optional[bool], current_version: typing.Optional[str], new_version: typing.Optional[str], parse: typing.Optional[str], serialize: typing.Optional[typing.List[str]], search: typing.Optional[str], replace: typing.Optional[str], regex: typing.Optional[bool], no_configured_files: bool, ignore_missing_version: bool, dry_run: bool, commit: typing.Optional[bool], tag: typing.Optional[bool], sign_tags: typing.Optional[bool], tag_name: typing.Optional[str], tag_message: typing.Optional[str], message: typing.Optional[str], commit_args: typing.Optional[str], show_list: bool) -> None
:canonical: bumpversion.cli.bump
```{autodoc2-docstring} bumpversion.cli.bump
Expand All @@ -78,9 +86,23 @@
```
````

````{py:function} replace(files: list, config_file: typing.Optional[str], verbose: int, allow_dirty: typing.Optional[bool], current_version: typing.Optional[str], new_version: typing.Optional[str], parse: typing.Optional[str], serialize: typing.Optional[typing.List[str]], search: typing.Optional[str], replace: typing.Optional[str], no_regex: bool, no_configured_files: bool, ignore_missing_version: bool, dry_run: bool) -> None
````{py:function} replace(files: list, config_file: typing.Optional[str], verbose: int, allow_dirty: typing.Optional[bool], current_version: typing.Optional[str], new_version: typing.Optional[str], parse: typing.Optional[str], serialize: typing.Optional[typing.List[str]], search: typing.Optional[str], replace: typing.Optional[str], regex: bool, no_configured_files: bool, ignore_missing_version: bool, dry_run: bool) -> None
:canonical: bumpversion.cli.replace
```{autodoc2-docstring} bumpversion.cli.replace
```
````

````{py:function} sample_config(prompt: bool, destination: str) -> None
:canonical: bumpversion.cli.sample_config
```{autodoc2-docstring} bumpversion.cli.sample_config
```
````

````{py:function} show_bump(version: str, config_file: typing.Optional[str], ascii: bool) -> None
:canonical: bumpversion.cli.show_bump
```{autodoc2-docstring} bumpversion.cli.show_bump
```
````
42 changes: 42 additions & 0 deletions docsrc/reference/bumpversion/bumpversion.config.create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# {py:mod}`bumpversion.config.create`

```{py:module} bumpversion.config.create
```

```{autodoc2-docstring} bumpversion.config.create
:allowtitles:
```

## Module Contents

### Functions

````{list-table}
:class: autosummary longtable
:align: left
* - {py:obj}`create_configuration <bumpversion.config.create.create_configuration>`
- ```{autodoc2-docstring} bumpversion.config.create.create_configuration
:summary:
```
* - {py:obj}`get_defaults_from_dest <bumpversion.config.create.get_defaults_from_dest>`
- ```{autodoc2-docstring} bumpversion.config.create.get_defaults_from_dest
:summary:
```
````

### API

````{py:function} create_configuration(destination: str, prompt: bool) -> tomlkit.TOMLDocument
:canonical: bumpversion.config.create.create_configuration
```{autodoc2-docstring} bumpversion.config.create.create_configuration
```
````

````{py:function} get_defaults_from_dest(destination: str) -> typing.Tuple[dict, tomlkit.TOMLDocument]
:canonical: bumpversion.config.create.get_defaults_from_dest
```{autodoc2-docstring} bumpversion.config.create.get_defaults_from_dest
```
````
100 changes: 100 additions & 0 deletions docsrc/reference/bumpversion/bumpversion.config.files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# {py:mod}`bumpversion.config.files`

```{py:module} bumpversion.config.files
```

```{autodoc2-docstring} bumpversion.config.files
:allowtitles:
```

## Module Contents

### Functions

````{list-table}
:class: autosummary longtable
:align: left
* - {py:obj}`find_config_file <bumpversion.config.files.find_config_file>`
- ```{autodoc2-docstring} bumpversion.config.files.find_config_file
:summary:
```
* - {py:obj}`read_config_file <bumpversion.config.files.read_config_file>`
- ```{autodoc2-docstring} bumpversion.config.files.read_config_file
:summary:
```
* - {py:obj}`read_toml_file <bumpversion.config.files.read_toml_file>`
- ```{autodoc2-docstring} bumpversion.config.files.read_toml_file
:summary:
```
* - {py:obj}`update_config_file <bumpversion.config.files.update_config_file>`
- ```{autodoc2-docstring} bumpversion.config.files.update_config_file
:summary:
```
````

### Data

````{list-table}
:class: autosummary longtable
:align: left
* - {py:obj}`logger <bumpversion.config.files.logger>`
- ```{autodoc2-docstring} bumpversion.config.files.logger
:summary:
```
* - {py:obj}`CONFIG_FILE_SEARCH_ORDER <bumpversion.config.files.CONFIG_FILE_SEARCH_ORDER>`
- ```{autodoc2-docstring} bumpversion.config.files.CONFIG_FILE_SEARCH_ORDER
:summary:
```
````

### API

````{py:data} logger
:canonical: bumpversion.config.files.logger
:value: >
'get_indented_logger(...)'
```{autodoc2-docstring} bumpversion.config.files.logger
```
````

````{py:data} CONFIG_FILE_SEARCH_ORDER
:canonical: bumpversion.config.files.CONFIG_FILE_SEARCH_ORDER
:value: >
('.bumpversion.cfg', '.bumpversion.toml', 'setup.cfg', 'pyproject.toml')
```{autodoc2-docstring} bumpversion.config.files.CONFIG_FILE_SEARCH_ORDER
```
````

````{py:function} find_config_file(explicit_file: typing.Union[str, pathlib.Path, None] = None) -> typing.Union[pathlib.Path, None]
:canonical: bumpversion.config.files.find_config_file
```{autodoc2-docstring} bumpversion.config.files.find_config_file
```
````

````{py:function} read_config_file(config_file: typing.Union[str, pathlib.Path, None] = None) -> typing.Dict[str, typing.Any]
:canonical: bumpversion.config.files.read_config_file
```{autodoc2-docstring} bumpversion.config.files.read_config_file
```
````

````{py:function} read_toml_file(file_path: pathlib.Path) -> typing.Dict[str, typing.Any]
:canonical: bumpversion.config.files.read_toml_file
```{autodoc2-docstring} bumpversion.config.files.read_toml_file
```
````

````{py:function} update_config_file(config_file: typing.Union[str, pathlib.Path], config: bumpversion.config.models.Config, current_version: bumpversion.version_part.Version, new_version: bumpversion.version_part.Version, context: typing.MutableMapping, dry_run: bool = False) -> None
:canonical: bumpversion.config.files.update_config_file
```{autodoc2-docstring} bumpversion.config.files.update_config_file
```
````
64 changes: 64 additions & 0 deletions docsrc/reference/bumpversion/bumpversion.config.files_legacy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# {py:mod}`bumpversion.config.files_legacy`

```{py:module} bumpversion.config.files_legacy
```

```{autodoc2-docstring} bumpversion.config.files_legacy
:allowtitles:
```

## Module Contents

### Functions

````{list-table}
:class: autosummary longtable
:align: left
* - {py:obj}`read_ini_file <bumpversion.config.files_legacy.read_ini_file>`
- ```{autodoc2-docstring} bumpversion.config.files_legacy.read_ini_file
:summary:
```
* - {py:obj}`update_ini_config_file <bumpversion.config.files_legacy.update_ini_config_file>`
- ```{autodoc2-docstring} bumpversion.config.files_legacy.update_ini_config_file
:summary:
```
````

### Data

````{list-table}
:class: autosummary longtable
:align: left
* - {py:obj}`logger <bumpversion.config.files_legacy.logger>`
- ```{autodoc2-docstring} bumpversion.config.files_legacy.logger
:summary:
```
````

### API

````{py:data} logger
:canonical: bumpversion.config.files_legacy.logger
:value: >
'get_indented_logger(...)'
```{autodoc2-docstring} bumpversion.config.files_legacy.logger
```
````

````{py:function} read_ini_file(file_path: pathlib.Path) -> typing.Dict[str, typing.Any]
:canonical: bumpversion.config.files_legacy.read_ini_file
```{autodoc2-docstring} bumpversion.config.files_legacy.read_ini_file
```
````

````{py:function} update_ini_config_file(config_file: typing.Union[str, pathlib.Path], current_version: str, new_version: str, dry_run: bool = False) -> None
:canonical: bumpversion.config.files_legacy.update_ini_config_file
```{autodoc2-docstring} bumpversion.config.files_legacy.update_ini_config_file
```
````

0 comments on commit 4f90348

Please sign in to comment.