Skip to content

Discontinue ConfigManager abuse for Git identity warning - #7392

Merged
yarikoptic merged 4 commits into
datalad:maintfrom
mih:warn_gitid
Jun 3, 2023
Merged

yarikoptic merged 4 commits into
datalad:maintfrom
mih:warn_gitid

Conversation

@yarikoptic

Copy link
Copy Markdown
Member

Reincarnated (since was not complete and prematurely merged by me) #7378 by @mih .

mih and others added 2 commits April 29, 2023 21:17
DataLad warns about an undefined Git identity (user.name|email).
It does that whether or not any Git identity is actually necessary
or even anyhow considered. The `ConfigManager` constructor is
(ab)used to trigger this warning, and a `ConfigManager` class
member is used to prevent repeated warnings.

This changeset maintains the exact same behavior (warn on `datalad
import`), but move the associated code out of the `ConfigManager`
class. This class is not involved in any Git repository
manipulations. The warning is trigger in `datalad/__init__.py`
directly, hence no protection against repeated execution is needed
(Python does it automatically).
@yarikoptic yarikoptic added the CHANGELOG-missing When a PR's description does not contain a changelog item, yet. label May 24, 2023
@codecov

codecov Bot commented May 25, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and project coverage change: +2.33 🎉

Comparison is base (d90e2ce) 88.34% compared to head (2d614c2) 90.68%.

Additional details and impacted files
@@            Coverage Diff             @@
##            maint    #7392      +/-   ##
==========================================
+ Coverage   88.34%   90.68%   +2.33%     
==========================================
  Files         327      327              
  Lines       44685    44692       +7     
  Branches        0     5923    +5923     
==========================================
+ Hits        39476    40527    +1051     
+ Misses       5209     4150    -1059     
- Partials        0       15      +15     
Impacted Files Coverage Δ
datalad/__init__.py 98.03% <100.00%> (+22.03%) ⬆️
datalad/config.py 97.50% <100.00%> (+0.21%) ⬆️
datalad/tests/test_base.py 100.00% <100.00%> (+2.85%) ⬆️

... and 57 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yarikoptic
yarikoptic requested a review from mih May 25, 2023 15:25
@yarikoptic yarikoptic added the semver-internal Changes only affect the internal API label May 25, 2023
@github-actions github-actions Bot removed the CHANGELOG-missing When a PR's description does not contain a changelog item, yet. label May 25, 2023
Comment thread changelog.d/pr-7392.md Outdated
@yarikoptic
yarikoptic merged commit ce927ff into datalad:maint Jun 3, 2023
@yarikoptic-gitmate

Copy link
Copy Markdown
Collaborator

PR released in 0.18.5

@yarikoptic
yarikoptic deleted the warn_gitid branch February 13, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-internal Changes only affect the internal API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants