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

Relax metadata check #135

Merged
merged 3 commits into from
Feb 13, 2024
Merged

Relax metadata check #135

merged 3 commits into from
Feb 13, 2024

Conversation

benoit74
Copy link
Collaborator

Fix #119

Changes

  • fix CHANGELOG from previous PR Fix type hints #132 ...
  • add a auto_metadata_check parameter, which default to True but can be disabled

One question: I had to disable validation at two places, is it intentional?

Copy link

codecov bot commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5558962) 100.00% compared to head (1a9b8f7) 100.00%.

❗ Current head 1a9b8f7 differs from pull request most recent head 8d6795e. Consider uploading reports for the commit 8d6795e to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #135   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           32        32           
  Lines         1370      1373    +3     
  Branches       237       239    +2     
=========================================
+ Hits          1370      1373    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@benoit74 benoit74 marked this pull request as ready for review February 13, 2024 17:17
@benoit74 benoit74 requested a review from rgaudin February 13, 2024 17:17
Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

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

Would make more sense to disable_metadata_checks IMO.
More clear (it's important but can be disabled) and more in line with recommendations.

WDYT?

@benoit74
Copy link
Collaborator Author

I hate naming things, and here I have no PoV, so I love your opinion 😉

@benoit74 benoit74 merged commit a25ec60 into main Feb 13, 2024
@benoit74 benoit74 deleted the relax_metadata_check branch February 13, 2024 17:38
@@ -106,6 +111,7 @@ def __init__(
compression: Optional[str] = None,
workaround_nocancel: Optional[bool] = True, # noqa: FBT002
ignore_duplicates: Optional[bool] = False, # noqa: FBT002
disable_metadata_checks: bool = True, # noqa: FBT001, FBT002
Copy link
Member

Choose a reason for hiding this comment

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

Should be False by default ; that's the point 😅

@@ -507,6 +507,12 @@ def test_check_metadata(tmp_path):
Creator(tmp_path, "").config_dev_metadata(LongDescription="T" * 5000).start()


def test_relax_metadata(tmp_path):
Creator(tmp_path, "", disable_metadata_checks=False).config_dev_metadata(
Copy link
Member

Choose a reason for hiding this comment

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

Drop that 🍷 😉

@rgaudin
Copy link
Member

rgaudin commented Feb 13, 2024

Well, you're up for a post-PR fix 🤓

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.

Add option to relax metadata check
2 participants