Skip to content

New object parser, 100% test coverage, Multiline and sub-items. #37

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

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
129b759
Removing side-effects: `add_release` -> `extract_release`.
Mulugruntz Jun 7, 2021
a445c12
Removing side-effects: `add_category` -> `extract_category`.
Mulugruntz Jun 7, 2021
6eb6cae
Removing side-effects: `add_information` -> `extract_information`.
Mulugruntz Jun 7, 2021
484fbad
Renamed `unlink` -> `strip_link`. It was confusing.
Mulugruntz Jun 7, 2021
fca4d8b
Added Dataclasses.
Mulugruntz Jun 7, 2021
87c80c8
Function `to_dict` uses dataclass internally.
Mulugruntz Jun 9, 2021
88ab376
Function `to_raw_dict` uses dataclass internally.
Mulugruntz Jun 9, 2021
c3e205d
Changed function orders.
Mulugruntz Jun 9, 2021
cac2ec6
Function `from_dict` uses dataclass internally.
Mulugruntz Jun 9, 2021
1de44fe
Uses `freezegun` for mocking datetimes.
Mulugruntz Jun 9, 2021
578736b
Function `release` uses dataclass internally.
Mulugruntz Jun 9, 2021
8667a76
Removed unused symbols.
Mulugruntz Jun 9, 2021
067c59b
Removed more unused symbols. Moved `to_semantic` internally.
Mulugruntz Jun 9, 2021
5df39a0
Changed function orders.
Mulugruntz Jun 9, 2021
dc6bc56
Added a bunch of tests.
Mulugruntz Jun 10, 2021
5a8985d
More tests. Now 100% coverage.
Mulugruntz Jun 10, 2021
abb74ab
New features: multiline and sub-items.
Mulugruntz Jun 15, 2021
054cd3a
Added `to_list` functionality, fixed some backward compatibility. (<3.8)
Mulugruntz Jan 30, 2022
796ac7d
Added simple `to_sorted_semantic`.
Mulugruntz Jan 30, 2022
3f07aec
Bump version `2.0.0.dev3`. Updated `CHANGELOG` and `README`.
Mulugruntz Jan 30, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Test

on: [push]
on: [push, pull_request]

jobs:
build:
Expand Down
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.0.0.dev3] - 2022-01-30
### Added
- The parsing engine is now Object-oriented and more flexible.
- Three new features:
- **Multiline:** Items ( <-- such as this one) can now
be written on several lines.
- **Sub-items:** Items can now have sub-items.
- Of any (reasonable) depth.
- **To list:** Using `to_list` instead of `to_dict` makes it possible to sort it easily.

### Changed
- Release dates are parsed (several formats are supported).
When `to_dict()`, a unique format is chosen.
- When `to_raw_dict()`, release dates are kept "as-is"
(and `.lower()` is no longer applied)

### Fixed
- Change ordering is now deterministic
- When `to_raw_dict()`, empty lines are preserved.
- When semantic version exists, it is produced. Before, if
depended on some bugs (it was produced sometimes and not
other times, such as when the change was empty or if there
was only the link, something like that...).
This is now more consistent.

## [2.0.0.dev2] - 2021-08-04
### Fixed
- `keepachangelog.release` will now properly bump version in case the number of digit to compare was previously increased (such as if version 9 and 10 existed).
Expand Down Expand Up @@ -84,7 +109,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release.

[Unreleased]: https://github.com/Colin-b/keepachangelog/compare/v2.0.0.dev2...HEAD
[Unreleased]: https://github.com/Colin-b/keepachangelog/compare/v2.0.0.dev3...HEAD
[2.0.0.dev3]: https://github.com/Colin-b/keepachangelog/compare/v2.0.0.dev2...v2.0.0.dev3
[2.0.0.dev2]: https://github.com/Colin-b/keepachangelog/compare/v2.0.0.dev1...v2.0.0.dev2
[2.0.0.dev1]: https://github.com/Colin-b/keepachangelog/compare/v2.0.0.dev0...v2.0.0.dev1
[2.0.0.dev0]: https://github.com/Colin-b/keepachangelog/compare/v1.0.0...v2.0.0.dev0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<a href="https://github.com/Colin-b/keepachangelog/actions"><img alt="Build status" src="https://github.com/Colin-b/keepachangelog/workflows/Release/badge.svg"></a>
<a href="https://github.com/Colin-b/keepachangelog/actions"><img alt="Coverage" src="https://img.shields.io/badge/coverage-100%25-brightgreen"></a>
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
<a href="https://github.com/Colin-b/keepachangelog/actions"><img alt="Number of tests" src="https://img.shields.io/badge/tests-40 passed-blue"></a>
<a href="https://github.com/Colin-b/keepachangelog/actions"><img alt="Number of tests" src="https://img.shields.io/badge/tests-112 passed-blue"></a>
<a href="https://pypi.org/project/keepachangelog/"><img alt="Number of downloads" src="https://img.shields.io/pypi/dm/keepachangelog"></a>
</p>

Expand Down
3 changes: 1 addition & 2 deletions keepachangelog/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
from keepachangelog.version import __version__
from keepachangelog._changelog import to_dict, to_raw_dict, release, from_dict
from keepachangelog._versioning import to_sorted_semantic
from keepachangelog._changelog import to_dict, to_raw_dict, release, from_dict, to_sorted_semantic, to_list
Loading