Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor(targets): Create interface for schema validation in sinks, and implement it for python-jsonschema #2136

Conversation

BuzzCutNorman
Copy link
Contributor

@BuzzCutNorman BuzzCutNorman commented Jan 3, 2024

This PR pulls out the JSONSchmea library abstraction work done in PR #2066 which built upon PR #1471.

This refactor will allow Target developers more control of what JSONSchema validation will be performed and also what JSONSChema library will perform the validation. Format validation is turned off by default.

Closes #1457


📚 Documentation preview 📚: https://meltano-sdk--2136.org.readthedocs.build/en/2136/

@BuzzCutNorman BuzzCutNorman marked this pull request as draft January 3, 2024 16:26
Copy link

codspeed-hq bot commented Jan 3, 2024

CodSpeed Performance Report

Merging #2136 will not alter performance

Comparing BuzzCutNorman:1457-abstract-jsonschmea-library-allowing-customization (7a158b5) with main (1385aeb)

Summary

✅ 6 untouched benchmarks

@BuzzCutNorman
Copy link
Contributor Author

BuzzCutNorman commented Jan 3, 2024

@edgarrmondragon when you get a chance can you give this a quick look. If you would please make sure I got the basics moved over and I didn't miss anything. I don't like the name JSONSchemaValidator for the class but couldn't think of a better one. Thanks 🙏

@BuzzCutNorman BuzzCutNorman changed the title refactor: Abstract JSONSchmea library refactor: Abstract JSONSchema Library Jan 3, 2024
singer_sdk/sinks/core.py Outdated Show resolved Hide resolved
tests/core/sinks/test_type_checker.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (1385aeb) 87.89% compared to head (7a158b5) 87.98%.

Files Patch % Lines
singer_sdk/sinks/core.py 97.67% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2136      +/-   ##
==========================================
+ Coverage   87.89%   87.98%   +0.08%     
==========================================
  Files          60       60              
  Lines        4958     5002      +44     
  Branches     1008     1013       +5     
==========================================
+ Hits         4358     4401      +43     
  Misses        424      424              
- Partials      176      177       +1     

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

…-abstract-jsonschmea-library-allowing-customization
@BuzzCutNorman BuzzCutNorman marked this pull request as ready for review January 11, 2024 18:05
@BuzzCutNorman BuzzCutNorman requested a review from a team as a code owner January 11, 2024 18:05
@edgarrmondragon edgarrmondragon changed the title refactor: Abstract JSONSchema Library refactor: Create interface for schema validation in sinks, and implement it for python-jsonschema Jan 11, 2024
Copy link
Collaborator

@edgarrmondragon edgarrmondragon left a comment

Choose a reason for hiding this comment

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

Thanks a ton @BuzzCutNorman!

@edgarrmondragon edgarrmondragon added this pull request to the merge queue Jan 11, 2024
@edgarrmondragon edgarrmondragon removed this pull request from the merge queue due to a manual request Jan 11, 2024
@edgarrmondragon edgarrmondragon changed the title refactor: Create interface for schema validation in sinks, and implement it for python-jsonschema refactor(targets): Create interface for schema validation in sinks, and implement it for python-jsonschema Jan 11, 2024
@edgarrmondragon edgarrmondragon added this pull request to the merge queue Jan 11, 2024
Merged via the queue into meltano:main with commit 1354410 Jan 11, 2024
33 checks passed
@BuzzCutNorman BuzzCutNorman deleted the 1457-abstract-jsonschmea-library-allowing-customization branch February 23, 2024 22:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: SQL TIME columns causing jsonschema ValidationError Failed validating 'format': 'time'
2 participants