Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(templates): suppress extra newlines in default changelog#954

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@wyardley
Copy link
Contributor

@wyardleywyardley commentedJun 15, 2024
edited
Loading

  • Suppress extra newlines in default generated changelog output
  • Update test expectations to match (see TODO that I removed after fixing the issue)

Note: thiswill likely change generated changelogs on the next run, so in that sense, breaking(ish), but I think it's still probably a good idea, and shouldn't change the actual changelogs (when viewed as markdown) in any negative way.

I made similar tweaks in the example in the docs; let me know if this is unwanted.

From local testing, I believe this is correct, but would love some eyes on it to see if I missed some scenarios.

Suppress extra newlines in default generated changelog output
@wyardleywyardleyforce-pushed thewyardley/template-tweaks branch from450b675 to7f94838CompareJune 15, 2024 01:11
Copy link
Contributor

@codejedi365codejedi365 left a comment
edited
Loading

Choose a reason for hiding this comment

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

Good work. I agree that this is worth merging without considering it as a breaking change.

@wyardley
Copy link
ContributorAuthor

One general thought I had FWIW: with some of these formatting things, it's hard to understand the test cases when the test cases are all generated by code as well... while I get the urge to not have too many raw fixtures in the codebase, it might be good to have at least some tests where there's a fixture or heredoc that'sjust the raw text of the rendered changelog / release notes / whatever. IMO that would make understanding and testing changes like that somewhat easier.

@codejedi365
Copy link
Contributor

One general thought I had FWIW: with some of these formatting things, it's hard to understand the test cases when the test cases are all generated by code as well... while I get the urge to not have too many raw fixtures in the codebase, it might be good to have at least some tests where there's a fixture or heredoc that'sjust the raw text of the rendered changelog / release notes / whatever. IMO that would make understanding and testing changes like that somewhat easier.

That would be ideal but it is not really possible. That was my initial plan and implementation but it doesn't work out well with the varying HVCS links, always different git commit dates, the changing commit hashes with each build of the test repos. The pytest pretty diff plugin is supposed to show you the difference in your two logs but it doesn't work well with newline changes (I think its a bug). I don't like how much code I have to generate the changelog but it was the cleanest way to take a changelog spec and turn it into the correct content with variable HVCS and ever changing hashes. If you have a better solution that overcomes these obstacles then I'd be glad to switch.

wyardley reacted with thumbs up emoji

@wyardley
Copy link
ContributorAuthor

Yeah, to replace it entirely probably wouldn’t make sense, especially since it’s already working, but maybe as an extra / separate and more limited test, not intended to cover all different scenarios.

The diffs make it easy to somewhat easy to see the difference between old and new (and did work in this case), but a little harder to see how the end result is supposed to look, or to adjust the test case before the code.

@codejedi365codejedi365 merged commit7b0079b intopython-semantic-release:masterJun 17, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@codejedi365codejedi365codejedi365 approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@wyardley@codejedi365

[8]ページ先頭

©2009-2025 Movatter.jp