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

build: add jsonschema library to core dependencies #8753

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

anakin87
Copy link
Member

@anakin87 anakin87 commented Jan 20, 2025

Related Issues

  • the jsonschema library is used in our Tool implementation. The library is lightweight, and having it as a core dependency would mean making life easier for our users.
  • I had previously decided not to add it as a core dependency because in the past we had some issues with testing it in the CI (see ci: Skip collection of test_json_schema.py to fix CI failures #7353 and linked PRs). These issues are fixed now.
  • Many big and small projects depend on this library; it is also installed by default in Colab. So I would say it's pretty safe to add it as a core dependency.

Proposed Changes:

  • add jsonschema to core dependencies and remove related lazy imports.

How did you test it?

CI

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes
  • I added unit tests and updated the docstrings
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I documented my code
  • I ran pre-commit hooks and fixed any issue

@coveralls
Copy link
Collaborator

coveralls commented Jan 20, 2025

Pull Request Test Coverage Report for Build 12873698167

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 8 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.006%) to 91.3%

Files with Coverage Reduction New Missed Lines %
components/validators/json_schema.py 8 88.73%
Totals Coverage Status
Change from base Build 12864293707: -0.006%
Covered Lines: 8847
Relevant Lines: 9690

💛 - Coveralls

@anakin87 anakin87 marked this pull request as ready for review January 20, 2025 18:14
@anakin87 anakin87 requested review from a team as code owners January 20, 2025 18:14
@anakin87 anakin87 requested review from dfokina and julian-risch and removed request for a team January 20, 2025 18:14
Copy link
Member

@julian-risch julian-risch left a comment

Choose a reason for hiding this comment

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

Looks good to me! 👍 We can simplify the pip install command in the documentation pages for v2.10-unstable and cookbooks / tutorials
https://docs.haystack.deepset.ai/v2.10-unstable/docs/componenttool#usage

@anakin87 anakin87 merged commit 2bf6bf6 into main Jan 21, 2025
35 checks passed
@anakin87 anakin87 deleted the jsonschema-dependency branch January 21, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants