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

Updated Changelog class #18

Merged
merged 43 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8311575
Update dependencies
atwalsh Jun 18, 2020
db06323
Add `section` package
atwalsh Jun 18, 2020
f1dcd90
Add release.py
atwalsh Jun 18, 2020
e3317dc
Move changelog.py, update init to use Sections
atwalsh Jun 18, 2020
6b506df
Update references of `parse_version_number`
atwalsh Jun 23, 2020
b4c045c
Change `template` command to `new`
atwalsh Jun 23, 2020
0fda8af
Update Body `_regex_pattern`
atwalsh Aug 1, 2020
f818b14
Add `__eq__` method to Release
atwalsh Aug 1, 2020
10aa56d
Update Footer docstring
atwalsh Aug 1, 2020
aa77b08
Add tests for changelog sections
atwalsh Aug 1, 2020
91840d7
Update templates directory name in test_new
atwalsh Aug 1, 2020
8b048e5
Merge branch 'master' of https://github.com/atwalsh/kac into section-…
atwalsh Aug 8, 2020
dfdfa65
Update README.md new command
atwalsh Aug 8, 2020
3473188
Update LICENSE year
atwalsh Nov 26, 2020
3c91691
Include Python 3.9 in test matrix
atwalsh Nov 27, 2020
2d7d07f
Change `new` command to `init`
atwalsh Nov 27, 2020
20fffea
Add `semver` dependency
atwalsh Nov 27, 2020
2dabdfc
Fix CHANGELOG.md template `Unreleased` URL
atwalsh Dec 24, 2020
789f5d6
Full overhaul of Changelog class methods
atwalsh Dec 26, 2020
6802c4c
Update arguments copy and bump commands
atwalsh Dec 26, 2020
3d83873
Ignore .vscode directory
atwalsh Dec 26, 2020
0cc8d61
Remove pendulum dependency
atwalsh Dec 26, 2020
b62acd4
Verify file at path exists in Changelog init
atwalsh Dec 26, 2020
ffa6a23
Update Changelog `get_next_versions` method
atwalsh Dec 26, 2020
0ae6b9b
Update tests in `test_changelog`
atwalsh Dec 26, 2020
13ac2b2
Update test action to use https://github.com/snok/install-poetry
atwalsh Dec 28, 2020
366be66
Rename Changelog release/version props, update bump method
atwalsh Jan 16, 2021
dc87904
Update README.md commands and header
atwalsh Jan 16, 2021
d4bec3b
Remove old tests and util method
atwalsh Jan 16, 2021
adce498
Update kac command descriptions
atwalsh Jan 16, 2021
2d33db3
Update `bump` method to include `v` char in URL
atwalsh Jan 16, 2021
a0f8500
Clean up changelog.py
atwalsh Feb 7, 2021
06b4e27
Update README.md
atwalsh Feb 7, 2021
2387825
Move check for missing `Unreleased` section
atwalsh Feb 7, 2021
05131d5
Add test_release.py
atwalsh Feb 7, 2021
523ea1c
Update dependencies
atwalsh Feb 7, 2021
82b9c8a
Add tests for kac.py
atwalsh Feb 11, 2021
fa5629d
Add new line to end of CHANGELOG.md template
atwalsh Feb 11, 2021
9666c0a
Update tests.yml action to install kac
atwalsh Feb 11, 2021
fac3641
Patch pyperclip copy method in TestCopy
atwalsh Feb 11, 2021
f6eaf10
Update `test_creation` output check
atwalsh Feb 11, 2021
ff02f04
Update LICENSE year
atwalsh Feb 11, 2021
337adec
Update CHANGELOG.md
atwalsh Feb 11, 2021
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
26 changes: 13 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: Tests

on: [push, pull_request]

env:
POETRY_VIRTUALENVS_IN_PROJECT: "true"
on: [ push, pull_request ]

jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
echo "::add-path::$HOME/.poetry/bin"
source $HOME/.poetry/env
poetry --version
- name: Cache dependencies
uses: snok/[email protected]
with:
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: ${{ hashFiles('poetry.lock') }}
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-root
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Install kac library
run: poetry install --no-interaction
- name: Test with pytest
run: poetry run pytest
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.vscode/
test.md

# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- `template` command to `new`
- Use semver library to parse versions

## [0.3.0] - 2020-04-05
### Added
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Adam Walsh
Copyright (c) 2021 Adam Walsh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
## kac
![kac](https://atw.me/img/kac.svg)

<hr>

A command line tool for CHANGELOG files that follow the [Keep A Changelog][1] standard.

![Tests](https://github.com/atwalsh/kac/workflows/Tests/badge.svg)

### Usage
Run `kac` in the same directory as your Changelog. By default, `kac` looks for a file called `CHANGELOG.md`

Run `kac` in the same directory as your Changelog. By default, `kac` looks for a file called `CHANGELOG.md`
(case-insensitive).

```bash
```
Usage: kac [OPTIONS] COMMAND [ARGS]...

A CLI tool for CHANGELOG files that follow the Keep-a-Changelog standard.

Options:
--help Show this message and exit.

Commands:
bump Bump a Changelog.
copy Copy a version's release text.
template Create an empty CHANGELOG.md file.

bump Bump the latest version of a CHANGELOG file.
copy Copy the latest release's changelog text.
init Create an empty CHANGELOG file.
```

## Limitations

- Must be run in the same directory as your CHANGELOG file
- Assumes you have changes in the "Unreleased" section
- Only works for semver
- Only supports versions in the `MAJOR.MINOR.PATCH` format. A beta version ending in `-beta`, for example,
will fail.

## To-Do
- [ ] Add default text for versions with no notable changes
- [ ] Undo bump
- [ ] Support labels for pre-release and build metadata
- `kac bump` can "format" (ex: remove extra empty lines) CHANGELOG files, this could be unfavorable for users

[1]: https://keepachangelog.com/en/1.0.0/
197 changes: 0 additions & 197 deletions kac/changelog.py

This file was deleted.

2 changes: 2 additions & 0 deletions kac/changelog/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .changelog import Changelog
from .release import Release, Unreleased
Loading