Skip to content

Commit

Permalink
Merge pull request #8 from findtopher/topher/add_dev_to_cli
Browse files Browse the repository at this point in the history
Add `dev` to cli
  • Loading branch information
vemel authored Nov 14, 2023
2 parents f23044d + 83235f0 commit 16787b2
Show file tree
Hide file tree
Showing 22 changed files with 554 additions and 410 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ and this project adheres to
[PEP 440 -- Version Identification and Dependency Specification](https://www.python.org/dev/peps/pep-0440/).

## [Unreleased]
### Added
- `[api]` added `bump_dev()` functionality and tests
- `[cli]` added support for `dev` in `bump`, `get`, and `set` along with tests

### Changed
- `[packaging]` updated dependencies (now `poetry install` works on Apple M1)

### Fixed
- `[cli]` fixed typo in `help` output
- `[api]` fixed typo in End of Line fixer

## [1.8.0] - 2021-03-16
### Added
Expand Down
6 changes: 3 additions & 3 deletions docs/newversion/cli_parser.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cli Parser

> Auto-generated documentation for [newversion.cli_parser](https://github.com/vemel/newversion//blob/main/newversion/cli_parser.py) module.
> Auto-generated documentation for [newversion.cli_parser](https://github.com/vemel/newversion/blob/main/newversion/cli_parser.py) module.
Main CLI parser.

Expand All @@ -10,7 +10,7 @@ Main CLI parser.

## get_stdin

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/cli_parser.py#L14)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/cli_parser.py#L14)

```python
def get_stdin() -> Version:
Expand All @@ -28,7 +28,7 @@ Parsed version.

## parse_args

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/cli_parser.py#L31)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/cli_parser.py#L31)

```python
def parse_args(args: Sequence[str]) -> argparse.Namespace:
Expand Down
6 changes: 3 additions & 3 deletions docs/newversion/constants.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Constants

> Auto-generated documentation for [newversion.constants](https://github.com/vemel/newversion//blob/main/newversion/constants.py) module.
> Auto-generated documentation for [newversion.constants](https://github.com/vemel/newversion/blob/main/newversion/constants.py) module.
Constants used in project.

Expand All @@ -10,7 +10,7 @@ Constants used in project.

## Commands

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/constants.py#L26)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/constants.py#L26)

```python
class Commands():
Expand All @@ -20,7 +20,7 @@ CLI commands

## VersionParts

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/constants.py#L8)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/constants.py#L8)

```python
class VersionParts():
Expand Down
18 changes: 9 additions & 9 deletions docs/newversion/eol_fixer.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# EOLFixer

> Auto-generated documentation for [newversion.eol_fixer](https://github.com/vemel/newversion//blob/main/newversion/eol_fixer.py) module.
> Auto-generated documentation for [newversion.eol_fixer](https://github.com/vemel/newversion/blob/main/newversion/eol_fixer.py) module.
Converter between Unix and WIndows line endings.
Converter between Unix and Windows line endings.

- [newversion](../README.md#newversion---your-version-manager) / [Modules](../MODULES.md#newversion-modules) / [Newversion](index.md#newversion) / EOLFixer
- [EOLFixer](#eolfixer)
Expand All @@ -14,17 +14,17 @@ Converter between Unix and WIndows line endings.

## EOLFixer

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/eol_fixer.py#L6)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/eol_fixer.py#L6)

```python
class EOLFixer():
```

Converter between Unix and WIndows line endings.
Converter between Unix and Windows line endings.

### EOLFixer.add_newline

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/eol_fixer.py#L63)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/eol_fixer.py#L63)

```python
@classmethod
Expand All @@ -35,7 +35,7 @@ Add newline character to the end if it is missing.

### EOLFixer.get_line_ending

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/eol_fixer.py#L56)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/eol_fixer.py#L56)

```python
@classmethod
Expand All @@ -46,7 +46,7 @@ Get line ending character.

### EOLFixer.is_crlf

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/eol_fixer.py#L14)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/eol_fixer.py#L14)

```python
@classmethod
Expand All @@ -61,7 +61,7 @@ Arguments:

### EOLFixer.to_crlf

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/eol_fixer.py#L40)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/eol_fixer.py#L40)

```python
@classmethod
Expand All @@ -80,7 +80,7 @@ Returns:

### EOLFixer.to_lf

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/eol_fixer.py#L24)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/eol_fixer.py#L24)

```python
@classmethod
Expand Down
8 changes: 4 additions & 4 deletions docs/newversion/exceptions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Exceptions

> Auto-generated documentation for [newversion.exceptions](https://github.com/vemel/newversion//blob/main/newversion/exceptions.py) module.
> Auto-generated documentation for [newversion.exceptions](https://github.com/vemel/newversion/blob/main/newversion/exceptions.py) module.
- [newversion](../README.md#newversion---your-version-manager) / [Modules](../MODULES.md#newversion-modules) / [Newversion](index.md#newversion) / Exceptions
- [CLIError](#clierror)
Expand All @@ -9,7 +9,7 @@

## CLIError

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/exceptions.py#L13)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/exceptions.py#L13)

```python
class CLIError(Exception):
Expand All @@ -19,7 +19,7 @@ Main CLI error

## ExecutorError

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/exceptions.py#L7)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/exceptions.py#L7)

```python
class ExecutorError(Exception):
Expand All @@ -29,7 +29,7 @@ Main CLI commands executor error.

## PackageVersionError

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/exceptions.py#L1)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/exceptions.py#L1)

```python
class PackageVersionError(Exception):
Expand Down
20 changes: 10 additions & 10 deletions docs/newversion/executor.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Executor

> Auto-generated documentation for [newversion.executor](https://github.com/vemel/newversion//blob/main/newversion/executor.py) module.
> Auto-generated documentation for [newversion.executor](https://github.com/vemel/newversion/blob/main/newversion/executor.py) module.
CLI commands executor.

Expand All @@ -17,7 +17,7 @@ CLI commands executor.

## Executor

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/executor.py#L15)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/executor.py#L15)

```python
class Executor():
Expand All @@ -32,7 +32,7 @@ CLI commands executor.

### Executor().command_bump

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/executor.py#L73)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/executor.py#L76)

```python
def command_bump(release: ReleaseNonLocalTypeDef, increment: int) -> Version:
Expand All @@ -56,7 +56,7 @@ A new Version.

### Executor().command_compare

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/executor.py#L149)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/executor.py#L155)

```python
def command_compare(command: OperatorTypeDef, other: Version) -> None:
Expand All @@ -80,7 +80,7 @@ Processed `Version`.

### Executor().command_get

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/executor.py#L26)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/executor.py#L26)

```python
def command_get(release: ReleaseTypeDef) -> str:
Expand All @@ -102,7 +102,7 @@ Part as a string.

### Executor().command_get_version

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/executor.py#L172)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/executor.py#L178)

```python
def command_get_version() -> Version:
Expand All @@ -114,7 +114,7 @@ def command_get_version() -> Version:

### Executor().command_is_stable

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/executor.py#L139)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/executor.py#L145)

```python
def command_is_stable() -> None:
Expand All @@ -128,7 +128,7 @@ Check whether version is stable.

### Executor().command_set

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/executor.py#L106)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/executor.py#L112)

```python
def command_set(release: ReleaseNonLocalTypeDef, value: int) -> Version:
Expand All @@ -152,15 +152,15 @@ A new Version.

### Executor().command_set_version

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/executor.py#L178)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/executor.py#L184)

```python
def command_set_version() -> None:
```

### Executor().command_stable

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/executor.py#L130)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/executor.py#L136)

```python
def command_stable() -> Version:
Expand Down
2 changes: 1 addition & 1 deletion docs/newversion/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Newversion

> Auto-generated documentation for [newversion](https://github.com/vemel/newversion//blob/main/newversion/__init__.py) module.
> Auto-generated documentation for [newversion](https://github.com/vemel/newversion/blob/main/newversion/__init__.py) module.
- [newversion](../README.md#newversion---your-version-manager) / [Modules](../MODULES.md#newversion-modules) / Newversion
- Modules
Expand Down
8 changes: 4 additions & 4 deletions docs/newversion/main.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Main

> Auto-generated documentation for [newversion.main](https://github.com/vemel/newversion//blob/main/newversion/main.py) module.
> Auto-generated documentation for [newversion.main](https://github.com/vemel/newversion/blob/main/newversion/main.py) module.
- [newversion](../README.md#newversion---your-version-manager) / [Modules](../MODULES.md#newversion-modules) / [Newversion](index.md#newversion) / Main
- [main_api](#main_api)
Expand All @@ -9,7 +9,7 @@

## main_api

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/main.py#L24)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/main.py#L24)

```python
def main_api(config: argparse.Namespace) -> str:
Expand All @@ -19,7 +19,7 @@ Main API entrypoint.

## main_cli

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/main.py#L55)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/main.py#L55)

```python
def main_cli() -> None:
Expand All @@ -29,7 +29,7 @@ Main entrypoint for CLI.

## setup_logging

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/main.py#L11)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/main.py#L11)

```python
def setup_logging(level: int) -> logging.Logger:
Expand Down
2 changes: 1 addition & 1 deletion docs/newversion/module.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Module

> Auto-generated documentation for [newversion.__main__](https://github.com/vemel/newversion//blob/main/newversion/__main__.py) module.
> Auto-generated documentation for [newversion.__main__](https://github.com/vemel/newversion/blob/main/newversion/__main__.py) module.
Main entrypoint for module.

Expand Down
8 changes: 4 additions & 4 deletions docs/newversion/package_version.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PackageVersion

> Auto-generated documentation for [newversion.package_version](https://github.com/vemel/newversion//blob/main/newversion/package_version.py) module.
> Auto-generated documentation for [newversion.package_version](https://github.com/vemel/newversion/blob/main/newversion/package_version.py) module.
- [newversion](../README.md#newversion---your-version-manager) / [Modules](../MODULES.md#newversion-modules) / [Newversion](index.md#newversion) / PackageVersion
- [PackageVersion](#packageversion)
Expand All @@ -9,7 +9,7 @@

## PackageVersion

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/package_version.py#L13)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/package_version.py#L13)

```python
class PackageVersion():
Expand All @@ -18,7 +18,7 @@ class PackageVersion():

### PackageVersion().get

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/package_version.py#L195)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/package_version.py#L195)

```python
def get() -> Version:
Expand All @@ -30,7 +30,7 @@ def get() -> Version:

### PackageVersion().set

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/package_version.py#L208)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/package_version.py#L208)

```python
def set(version: Version) -> None:
Expand Down
2 changes: 1 addition & 1 deletion docs/newversion/type_defs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Type Defs

> Auto-generated documentation for [newversion.type_defs](https://github.com/vemel/newversion//blob/main/newversion/type_defs.py) module.
> Auto-generated documentation for [newversion.type_defs](https://github.com/vemel/newversion/blob/main/newversion/type_defs.py) module.
- [newversion](../README.md#newversion---your-version-manager) / [Modules](../MODULES.md#newversion-modules) / [Newversion](index.md#newversion) / Type Defs
4 changes: 2 additions & 2 deletions docs/newversion/utils.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Utils

> Auto-generated documentation for [newversion.utils](https://github.com/vemel/newversion//blob/main/newversion/utils.py) module.
> Auto-generated documentation for [newversion.utils](https://github.com/vemel/newversion/blob/main/newversion/utils.py) module.
- [newversion](../README.md#newversion---your-version-manager) / [Modules](../MODULES.md#newversion-modules) / [Newversion](index.md#newversion) / Utils
- [print_path](#print_path)

## print_path

[[find in source code]](https://github.com/vemel/newversion//blob/main/newversion/utils.py#L4)
[[find in source code]](https://github.com/vemel/newversion/blob/main/newversion/utils.py#L4)

```python
def print_path(path: Path) -> str:
Expand Down
Loading

0 comments on commit 16787b2

Please sign in to comment.