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

Homebrew Update #278

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

Merged
Lee-W merged 2 commits into commitizen-tools:master from harens:homebrew-update
Nov 5, 2020
Merged

Homebrew Update #278

Lee-W merged 2 commits into commitizen-tools:master from harens:homebrew-update
Nov 5, 2020

Conversation

Copy link
Contributor

@harens harens commented Oct 6, 2020

Description

Following the addition of commitizen to homebrew, I've updated the docs and added a Github Action.

The workflow depends on a Personal Access Token being made available for it.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./script/format and ./script/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

Whenever a release is published, a PR should be sent to update the Homebrew formula.

Steps to Test This Pull Request

N/A

Additional context

Closes #256

Github Action based on #256 (comment) and nef's workflow.

An example of nef's workflow being run successfully can be found here

Copy link
Contributor Author

harens commented Oct 6, 2020

Error seems unrelated:

commitizen/commands/init.py:50: error: Argument "choices" to "select" has incompatible type "List[str]"; expected "List[Union[str, Choice, Dict[str, Any]]]"

Copy link
Member

Lee-W commented Oct 7, 2020

I'm still trying to understand this issue. It seems related to https://mypy.readthedocs.io/en/stable/generics.html#variance-of-generic-types

Copy link
Member

woile commented Oct 7, 2020

I think it's related to questionary, but not sure.
we could skip linting there by adding a comment: # type: ignore
When I have more time I'll check again

Copy link
Member

woile commented Oct 8, 2020

I've opened a ticket on mypy python/mypy#9555

Copy link
Member

Lee-W commented Oct 8, 2020
edited
Loading

I think that is not actually a bug but rather how mypy is designed.
python/mypy#3351

The error message of this issue is as followed.

commitizen/commands/init.py:50: error: Argument "choices" to "select" has incompatible type "List[str]"; expected "List[Union[str, Choice, Dict[str, Any]]]"
commitizen/commands/init.py:50: note: "List" is invariant -- see http://mypy.readthedocs.io/en/latest/common_issues.html#variance
commitizen/commands/init.py:50: note: Consider using "Sequence" instead, which is covariant
commitizen/commands/init.py:82: error: Argument "choices" to "select" has incompatible type "Optional[List[str]]"; expected "List[Union[str, Choice, Dict[str, Any]]]"

In mypy doc, it explains how we might be able to solve this problem. However, the type annotation is located in questionary. I'm still trying to figure out what's the better way to solve this problem.
If questionary uses Sequence[Union[Text, Choice, Dict[Text, Any]]] instead, we might not encounter this problem.

As for line 82, it's probably an error I created. I discussed it with the author or #279 offline, we'll fix that one.

@harens harens marked this pull request as ready for review October 8, 2020 09:07
Copy link
Member

woile commented Nov 4, 2020

Can u rebase the PR? Thanks

Copy link

codecov bot commented Nov 4, 2020
edited
Loading

Codecov Report

Merging #278 into master will increase coverage by 0.33%.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@
## master #278 +/- ##
==========================================
+ Coverage 96.62% 96.96% +0.33% 
==========================================
 Files 33 33 
 Lines 919 923 +4 
==========================================
+ Hits 888 895 +7 
+ Misses 31 28 -3 
Flag Coverage Δ
unittests 96.96% <ø> (+0.33%) ⬆️

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

Impacted Files Coverage Δ
commitizen/cz/base.py 100.00% <0.00%> (ø)
commitizen/defaults.py 100.00% <0.00%> (ø)
commitizen/commands/changelog.py 97.29% <0.00%> (ø)
commitizen/git.py 95.55% <0.00%> (+0.04%) ⬆️
commitizen/commands/bump.py 94.25% <0.00%> (+3.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c0dd54...341f3c1. Read the comment docs.

Copy link
Contributor Author

harens commented Nov 4, 2020

Hopefully that should do it, although let me know if it didn't. I'm happy to squash my commits if necessary, although I left them as two separate ones since one's for the docs and the other is for the workflow.

(I like the summary above ☝by the way)

Lee-W reacted with thumbs up emoji

Copy link
Member

Lee-W commented Nov 5, 2020

Left them as separate commits is great! Thanks for your great work! Let's merge it 😃

@Lee-W Lee-W merged commit ae03624 into commitizen-tools:master Nov 5, 2020
@harens harens deleted the homebrew-update branch November 5, 2020 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Make commitizen homebrew installable

AltStyle によって変換されたページ (->オリジナル) /