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

Remove two too prominent create() INFO log message that duplicate DEBUG log and harmonize some other log messages #6638

Merged
merged 2 commits into from
Apr 25, 2022

Conversation

mih
Copy link
Member

@mih mih commented Apr 21, 2022

Every invocation produces this INFO-level message:

% datalad create myds
[INFO   ] Creating a new annex repo at /tmp/myds
create(ok): /tmp/myds (dataset)

This is not a long-running operation. In most cases, the INFO log and the result arrive near-simultaneously.
It also duplicates DEBUG messages:

[INFO   ] Creating a new annex repo at /tmp/demo12
[DEBUG  ] Initialize empty Git repository at '/tmp/demo12'
[DEBUG  ] Initializing annex repository at /tmp/demo12...

Removed for a cleaner user experience.

Fixes #6633

Changelog

Not needed.

Every invocation produces this INFO-level message:

```
% datalad create myds
[INFO   ] Creating a new annex repo at /tmp/myds
create(ok): /tmp/myds (dataset)
```
This is not a long-running operation. In most cases, the INFO log and the result arrive near-simultaneously.
It also duplicates DEBUG messages:

```
[INFO   ] Creating a new annex repo at /tmp/demo12
[DEBUG  ] Initialize empty Git repository at '/tmp/demo12'
[DEBUG  ] Initializing annex repository at /tmp/demo12...
```

Removed for a cleaner user experience.

Fixes datalad#6633
@mih mih added the semver-internal Changes only affect the internal API label Apr 21, 2022
Since majority use that form to signal beginning of some action.
Also renamed one Initating into Initializing, and removed "Attempt"
since all of them are
@codecov
Copy link

codecov bot commented Apr 21, 2022

Codecov Report

Merging #6638 (bb85528) into maint (eb55f5a) will decrease coverage by 0.49%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##            maint    #6638      +/-   ##
==========================================
- Coverage   91.17%   90.67%   -0.50%     
==========================================
  Files         353      353              
  Lines       44496    44494       -2     
==========================================
- Hits        40568    40344     -224     
- Misses       3928     4150     +222     
Impacted Files Coverage Δ
datalad/core/local/create.py 98.58% <ø> (-0.72%) ⬇️
datalad/dataset/gitrepo.py 96.75% <ø> (ø)
datalad/core/distributed/clone.py 91.20% <100.00%> (ø)
datalad/core/distributed/push.py 92.54% <100.00%> (ø)
datalad/core/local/status.py 94.80% <100.00%> (ø)
datalad/customremotes/base.py 94.11% <100.00%> (ø)
datalad/metadata/extractors/xmp.py 24.07% <0.00%> (-68.52%) ⬇️
datalad/metadata/extractors/tests/test_xmp.py 40.90% <0.00%> (-59.10%) ⬇️
datalad/metadata/tests/test_extract_metadata.py 54.05% <0.00%> (-45.95%) ⬇️
datalad/metadata/extract_metadata.py 69.44% <0.00%> (-30.56%) ⬇️
... and 29 more

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 eb55f5a...bb85528. Read the comment docs.

@yarikoptic
Copy link
Member

ok with me. I wonder if while at it we should also harmonize that DEBUG message to also use -ing form instead of imperative form: Initialize -> Initializing

Looking at instances

$> git grep lgr\..*Init
datalad/core/distributed/clone.py:    lgr.debug("Initializing annex repo at %s", ds.path)
datalad/customremotes/base.py:    lgr.info("Initiating special remote %s", remote)
datalad/distribution/create_sibling.py:            lgr.error("Initialization of remote git repository failed at %s."
datalad/distribution/create_sibling.py:                lgr.error("Initialization of remote git annex repository failed at %s."
datalad/downloaders/__init__.py:# lgr.debug("Initializing data providers credentials interface")
datalad/downloaders/base.py:            lgr.info("Initializing cache for fetches")
datalad/downloaders/providers.py:            lgr.debug("Initializing default provider for %s", scheme)
datalad/local/copy_file.py:            lgr.debug('Init additionally required special remote: %s', sri)
datalad/support/annexrepo.py:                lgr.debug('Initializing annex repository at %s...', self.path)
datalad/support/archives.py:                lgr.debug("Initiating clean cache for the archives under %s",
datalad/support/archives.py:            lgr.debug("Initiating clean cache for the archives under %s", self.path)
datalad/support/parallel.py:        lgr.debug("Initiating ThreadPoolExecutor with %d jobs", jobs)
datalad/ui/__init__.py:lgr.log(5, "Initiating UI switcher")

it seems we have that form mostly, and use also Initiating ... pushed bb85528 harmonizing some of them -- feel free to drop if don't like it

@mih
Copy link
Member Author

mih commented Apr 21, 2022

Thx @yarikoptic

I would have used a dedicated PR for that, but I am fine with the change.

@yarikoptic yarikoptic changed the title Remove too prominent create() INFO log message that duplicates DEBUG log Remove two too prominent create() INFO log message that duplicate DEBUG log and harmonize some other log messages Apr 21, 2022
@yarikoptic
Copy link
Member

Since now we are both involved in this PR, I guess best would be if some other @datalad/developers hits Merge or expresses the opinion on this tiny PR ;)

Copy link
Member

@adswa adswa left a comment

Choose a reason for hiding this comment

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

Thanks! The failures are all unrelated.

@adswa adswa merged commit 413ba87 into datalad:maint Apr 25, 2022
@adswa adswa deleted the bf-6633 branch April 25, 2022 06:05
@adswa adswa mentioned this pull request Apr 25, 2022
@github-actions
Copy link

🚀 PR was released in 0.16.3 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released semver-internal Changes only affect the internal API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants