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

Move apply_patch() to reduce chance for circular imports #391

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

mih
Copy link
Member

@mih mih commented Jun 1, 2023

This could happen when core components like the ConfigManager are patched.

This changeset moves the set of enabled patches into a dedicated leaf-module. And move the apply_patch() helper into the patches module directly.

Imports are adjusted and a legacy import is kept in place. The documentation on patching is updated accordingly.

This could happen when core components like the `ConfigManager` are
patched.

This changeset moves the set of enabled patches into a dedicated
leaf-module. And move the `apply_patch()` helper into the `patches`
module directly.

Imports are adjusted and a legacy import is kept in place. The
documentation on patching is updated accordingly.
@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Patch coverage: 94.92% and project coverage change: +0.04 🎉

Comparison is base (db38176) 92.30% compared to head (18c0e39) 92.34%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #391      +/-   ##
==========================================
+ Coverage   92.30%   92.34%   +0.04%     
==========================================
  Files         109      110       +1     
  Lines        8262     8273      +11     
==========================================
+ Hits         7626     7640      +14     
+ Misses        636      633       -3     
Impacted Files Coverage Δ
datalad_next/patches/distribution_dataset.py 0.00% <0.00%> (ø)
datalad_next/utils/patch.py 0.00% <0.00%> (-100.00%) ⬇️
datalad_next/datasets/__init__.py 93.33% <90.90%> (ø)
datalad_next/annexremotes/archivist.py 92.50% <92.50%> (+2.69%) ⬆️
datalad_next/annexremotes/tests/test_archivist.py 98.09% <98.09%> (+0.13%) ⬆️
datalad_next/__init__.py 100.00% <100.00%> (ø)
datalad_next/annexremotes/__init__.py 100.00% <100.00%> (ø)
datalad_next/annexremotes/uncurl.py 94.91% <100.00%> (ø)
datalad_next/patches/__init__.py 100.00% <100.00%> (ø)
datalad_next/patches/annexrepo.py 93.02% <100.00%> (ø)
... and 8 more

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

@mih mih merged commit 359e2d6 into datalad:main Jun 1, 2023
@mih mih deleted the patch branch June 1, 2023 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant