Giter Site home page Giter Site logo

changelogd's Introduction

changelogd

https://dev.azure.com/aklajnert/changelogd/_apis/build/status/aklajnert.changelogd?branchName=master

Changelogs without conflicts.

Overview

Changelogd allows teams to avoid merge conflicts for the changelog files. The changelogd content is stored within multiple YAML files - one per each changelog entry. Then, during application release, all input files are combined into one release file. The script uses Jinja2 templates to generate one consistent text file out of all input YAML files. The default output format is Markdown, but by modifying the templates it can be changed into any text format you like.

Installation

You can install changelogd via pip from PyPI:

$ pip install changelogd

Quickstart

First, initialize changelogd configuration.

$ changelogd init
Created main configuration file: changelog.d\config.yaml
Copied templates to changelog.d\templates

Then, create changelog entries:

$ changelogd entry
        [1]: Features [feature]
        [2]: Bug fixes [bug]
        [3]: Documentation changes [doc]
        [4]: Deprecations [deprecation]
        [5]: Other changes [other]
> Select message type [1]: 2
> Issue ID: 100
> Changelog message: Changelog message
Created changelog entry at changelog.d\bug.a3f13823.entry.yaml

Finally, generate changelog file.

$ changelogd release version-number
> Release description (hit ENTER to omit): This is the initial release.
Saved new release data into changelog.d\releases\0.release-name.yaml
Generated changelog file to changelog.md

Output file:

# Changelog


## version-number (2020-01-11)

This is the initial release.

### Bug fixes
* [#100](http://repo/issues/100): Changelog message ([@user]([email protected]))

Documentation

For full documentation, please see https://changelogd.readthedocs.io/en/latest/.

License

Distributed under the terms of the MIT license, "changelogd" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

changelogd's People

Contributors

aklajnert avatar dependabot[bot] avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

changelogd's Issues

Trim whitespace before/after comma in multiple: true fields

  • changelogd version: 0.1.5
  • Python version: 3.10.6
  • Operating System: Mac OS

Description

When I add multiple entries to an entry for a field with multiple: true, if I put a space after the comma, the value for the second entry (and subsequent entries) end up being single quoted with a leading space in the entry.yaml file. Since this happens while producing the entry.yaml file, trimming the whitespace in the entry.md template doesn't help. So I'd need a config option or just have it trim the whitespace before/after the comma separated values by default.

What I Did

# entry
changelogd entry

Select message type [1]: 1
Merge Request (number only) (required): 1
Messages (separate multiple values with comma): string1, string2
Created changelog entry at /pathToRepo/changelog.d/other.56871af2.entry.yaml

# entry.yaml output example
merge_request: '1'
messages:
- string1
- ' string2'
timestamp: 1663063391
type: other

0.1.7: pytest warnings

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix>
  • run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Looks like something still is missing in my build env for your module.
May I ask for come hint?

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-changelogd-0.1.5-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-changelogd-0.1.5-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5, configfile: setup.cfg
plugins: pyfakefs-4.6.3
collected 21 items

tests/test_changelogd.py .EEE..E                                                                                                                                     [ 33%]
tests/test_config.py ....                                                                                                                                            [ 52%]
tests/test_entry.py .EEEEEE                                                                                                                                          [ 85%]
tests/test_utils.py EEE                                                                                                                                              [100%]

================================================================================== ERRORS ==================================================================================
_____________________________________________________________________ ERROR at setup of test_full_flow _____________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_changelogd.py, line 70
  def test_full_flow(setup_env, monkeypatch, caplog, fake_date):
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py, line 24
  @pytest.fixture
  def setup_env(fake_process, monkeypatch, tmpdir, fake_date):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py:24
_________________________________________________________________ ERROR at setup of test_partial_releases __________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_changelogd.py, line 202
  def test_partial_releases(setup_env, caplog, fake_date):
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py, line 24
  @pytest.fixture
  def setup_env(fake_process, monkeypatch, tmpdir, fake_date):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py:24
___________________________________________________________________ ERROR at setup of test_empty_release ___________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_changelogd.py, line 242
  def test_empty_release(setup_env, caplog):
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py, line 24
  @pytest.fixture
  def setup_env(fake_process, monkeypatch, tmpdir, fake_date):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py:24
_____________________________________________________________________ ERROR at setup of test_init_rst ______________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_changelogd.py, line 337
  def test_init_rst(setup_env, monkeypatch, caplog, fake_date):
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py, line 24
  @pytest.fixture
  def setup_env(fake_process, monkeypatch, tmpdir, fake_date):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py:24
____________________________________________________________________ ERROR at setup of test_entry_help _____________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_entry.py, line 53
  def test_entry_help(setup_env):
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py, line 24
  @pytest.fixture
  def setup_env(fake_process, monkeypatch, tmpdir, fake_date):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py:24
______________________________________________________________ ERROR at setup of test_non_interactive_data[1] ______________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_entry.py, line 79
  @pytest.mark.parametrize("type_input", ["1", "feature"])
  def test_non_interactive_data(setup_env, type_input):
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py, line 24
  @pytest.fixture
  def setup_env(fake_process, monkeypatch, tmpdir, fake_date):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py:24
___________________________________________________________ ERROR at setup of test_non_interactive_data[feature] ___________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_entry.py, line 79
  @pytest.mark.parametrize("type_input", ["1", "feature"])
  def test_non_interactive_data(setup_env, type_input):
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py, line 24
  @pytest.fixture
  def setup_env(fake_process, monkeypatch, tmpdir, fake_date):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py:24
____________________________________________________________ ERROR at setup of test_entry_missing_message_types ____________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_entry.py, line 111
  def test_entry_missing_message_types(setup_env, caplog):
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py, line 24
  @pytest.fixture
  def setup_env(fake_process, monkeypatch, tmpdir, fake_date):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py:24
___________________________________________________________ ERROR at setup of test_entry_incorrect_entry_fields ____________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_entry.py, line 131
  def test_entry_incorrect_entry_fields(setup_env, caplog):
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py, line 24
  @pytest.fixture
  def setup_env(fake_process, monkeypatch, tmpdir, fake_date):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/conftest.py:24
_____________________________________________________________________ ERROR at setup of test_user_data _____________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_entry.py, line 190
  def test_user_data(monkeypatch, fake_process):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_entry.py:190
___________________________________________________________________ ERROR at setup of test_get_git_data ____________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_utils.py, line 8
  def test_get_git_data(fake_process):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_utils.py:8
________________________________________________________________ ERROR at setup of test_get_git_data_failed ________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_utils.py, line 32
  def test_get_git_data_failed(fake_process):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_utils.py:32
____________________________________________________________________ ERROR at setup of test_add_to_git _____________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_utils.py, line 37
  def test_add_to_git(fake_process, caplog):
E       fixture 'fake_process' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, fake_date, fs, fs_module, fs_session, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, setup_env, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/tkloczko/rpmbuild/BUILD/changelogd-0.1.5/tests/test_utils.py:37
============================================================================= warnings summary =============================================================================
../../../../../usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1252
  /usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1252: PytestConfigWarning: Unknown config option: collect_ignore

    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
ERROR tests/test_changelogd.py::test_full_flow
ERROR tests/test_changelogd.py::test_partial_releases
ERROR tests/test_changelogd.py::test_empty_release
ERROR tests/test_changelogd.py::test_init_rst
ERROR tests/test_entry.py::test_entry_help
ERROR tests/test_entry.py::test_non_interactive_data[1]
ERROR tests/test_entry.py::test_non_interactive_data[feature]
ERROR tests/test_entry.py::test_entry_missing_message_types
ERROR tests/test_entry.py::test_entry_incorrect_entry_fields
ERROR tests/test_entry.py::test_user_data
ERROR tests/test_utils.py::test_get_git_data
ERROR tests/test_utils.py::test_get_git_data_failed
ERROR tests/test_utils.py::test_add_to_git
================================================================= 8 passed, 1 warning, 13 errors in 0.31s ==================================================================

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.