-
Notifications
You must be signed in to change notification settings - Fork 16
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
Avoid passing an emptry string as the tag_regex
parameter to setuptools_scm.get_version
#68
Avoid passing an emptry string as the tag_regex
parameter to setuptools_scm.get_version
#68
Conversation
tag-pattern
instead of empty stringtag_regex
parameter of setuptools_scm.get_version
tag_regex
parameter of setuptools_scm.get_version
tag_regex
parameter to setuptools_scm.get_version
d9e5a1e
to
8971d8a
Compare
…tools_scm.get_version` Closes ofek#67
8971d8a
to
644b478
Compare
@@ -86,7 +86,7 @@ def create_project(directory, metadata, *, setup_vcs=True, nested=False): | |||
git('config', '--local', 'user.email', 'foo@bar.baz') | |||
git('add', '.') | |||
git('commit', '-m', 'test') | |||
git('tag', '1.2.3') | |||
git('tag', '1.2.3', '-m', 'test') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old code was causing tests to hang for me locally, so let me know if this is ok or I should revert it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's log a follow up to investigate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes please let's add a todo comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ofek should I apply the necessary changes for tool changes in a separate mr or can this get in whole? |
1 similar comment
This comment was marked as duplicate.
This comment was marked as duplicate.
it's fine to do it here I think |
@@ -53,7 +53,9 @@ def construct_setuptools_scm_config(self): | |||
config = deepcopy(self.config_raw_options) | |||
config.setdefault('root', self.root) | |||
|
|||
config.setdefault('tag_regex', self.config_tag_pattern) | |||
# Only set for non-empty strings | |||
if self.config_tag_pattern: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe instead of setdefault the normal setitem operation should be used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
80a8191 I also added a test that goes into the if
block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Closes #67