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

introduce snippets #3

Merged
merged 3 commits into from
May 30, 2024
Merged

introduce snippets #3

merged 3 commits into from
May 30, 2024

Conversation

brainelectronics
Copy link
Owner

Added

  • ChangelogCreator class to render new changelog from snippets and existing base changelog
  • New changelog-generator changelog CLI interface available and documented
  • SnippetCollector to provide iterable of snippets found in specified folder, sorted by the appearance in the Git history (oldest first)
  • Template for single changelog entry
  • Template for complete rendered and updated changelog

Changed

Breaking

  • SnippetCreator class has no file_name init parameter anymore
    • content property renamed to parsed_content
    • parse function takes file_name parameter
    • parsed_content gets resetted with every new parse(file_name) call
    • _required_keys renamed to _required_parser_keys
  • SnippetCreator class has no file_name and content init parameter anymore
    • snippets_file property removed
    • content property renamed to rendered_content
    • render function takes content parameter and returns None
    • create function takes file_name parameter

Other

  • changelog2version moved from dev dependency to package dependency
  • Create changelog from snippets in GitHub workflow before creating the python package

Fixed

  • Sorted package dependencies in pyproject.toml
  • Ignore all .venv* directories

@brainelectronics brainelectronics added the enhancement New feature or request label May 30, 2024
@brainelectronics brainelectronics self-assigned this May 30, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.78%. Comparing base (db4f2df) to head (48ef03a).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #3   +/-   ##
=======================================
  Coverage   83.78%   83.78%           
=======================================
  Files           1        1           
  Lines          37       37           
  Branches       10       10           
=======================================
  Hits           31       31           
  Misses          4        4           
  Partials        2        2           
Flag Coverage Δ
unittests 83.78% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

def snippets(self) -> Iterator[tuple[Commit, Path]]:
collected_snippets = list(self.all_snippet_files())

# nice chaos :)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be fixed, but not today, it's already tomorrow ... 😩

Copy link
Owner Author

@brainelectronics brainelectronics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMyself, I'm tired

@brainelectronics brainelectronics merged commit 53d662c into main May 30, 2024
4 checks passed
@brainelectronics brainelectronics deleted the feature/create-changelog branch May 30, 2024 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants