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

ZO-4649: calculate checksum of article body and compare against tts audio before adding audio reference #607

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

stollero
Copy link
Contributor

@stollero stollero commented Feb 7, 2024

Checklist

  • Documentation
  • Changelog
  • Tests
  • Translations

gif

… a checksum calculate

somalia article has no division element and this element is required to calculate a realistic checksum, after checkin the somalia article gets the element therefore we have another checksum after that even though we not changed the article
@stollero stollero requested a review from wosc February 7, 2024 15:33
@@ -110,7 +111,7 @@ def _article(self, speech: IAudio) -> IArticle:

def _assert_checksum_matches(self, speech: IAudio) -> IArticle:
article = self._article(speech)
article_checksum = zeit.content.article.interfaces.ISpeechbertChecksum(article)
article_checksum = calculate_checksum(article, None)
Copy link
Member

Choose a reason for hiding this comment

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

Man könnte das ausrechnen auf den SpeechbertChecksum Adapter schieben (anstatt freischwebende Funktion), dann wär der Zusammenhang etwas klarer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Auf jeden Fall!

core/src/zeit/speech/tests/test_connection.py Show resolved Hide resolved
@@ -110,7 +111,7 @@ def _article(self, speech: IAudio) -> IArticle:

def _assert_checksum_matches(self, speech: IAudio) -> IArticle:
article = self._article(speech)
article_checksum = zeit.content.article.interfaces.ISpeechbertChecksum(article)
article_checksum = calculate_checksum(article, None)
Copy link
Member

Choose a reason for hiding this comment

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

Und ich glaube, wir sollten die frisch berechnete Checksumme hier nicht speichern, oder? Denn sonst ist doch nicht mehr klar, auf welchen Stand sie sich bezieht (denn die sonstige Annahme ist ja, "wird before publish ausgerechnet").

@stollero stollero requested a review from wosc February 9, 2024 07:09
Copy link
Member

@wosc wosc left a comment

Choose a reason for hiding this comment

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

@wosc wosc merged commit c4b3f4a into main Feb 9, 2024
4 checks passed
@wosc wosc deleted the ZO-4649 branch February 9, 2024 07:45
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.

2 participants