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

Add Elasticsearch-DSL code #2736

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

miguelgrinberg
Copy link
Contributor

@miguelgrinberg miguelgrinberg commented Jan 10, 2025

This change adds the Elasticsearch-DSL code. Note that the documentation will be merged in a separate PR.

  • The imported source tree has the same structure as in the elasticsearch_dsl package, except that its root is now elasticsearch.dsl. Users can replace the _ with a . in all imports.
  • I had to make minor changes to some of the DSL's test fixtures, because this client uses function scope for the client fixtures and DSL used session scope. I have switched all the DSL fixtures to function scope.
  • I had to make the DSL client fixtures work with https:// Elasticsearch endpoints, since that is what we are using in integration test runs.
  • The unasync of the DSL classes remains in a separate run-unasync-dsl.py script. We can consider merging the two.
  • The generator.py script that generates the query, aggregation and response source files was moved to this project as generator-dsl.py, along with its Jinja templates. We can consider moving this to the Python client generator project.

Copy link

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

@miguelgrinberg miguelgrinberg force-pushed the dsl-merge branch 2 times, most recently from 8092ab9 to 4ec2881 Compare January 10, 2025 16:00
@@ -43,6 +43,8 @@ keywords = [
dynamic = ["version"]
dependencies = [
"elastic-transport>=8.15.1,<9",
"python-dateutil",
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me see if we can drop it.

@miguelgrinberg miguelgrinberg force-pushed the dsl-merge branch 2 times, most recently from 5dd57f6 to 2bde52a Compare January 13, 2025 16:21
@miguelgrinberg miguelgrinberg force-pushed the dsl-merge branch 5 times, most recently from 51af1c2 to 735e364 Compare January 14, 2025 15:50
@miguelgrinberg miguelgrinberg force-pushed the dsl-merge branch 2 times, most recently from 7831804 to 1d951c6 Compare January 15, 2025 12:42
@miguelgrinberg miguelgrinberg marked this pull request as ready for review January 15, 2025 16:44
@miguelgrinberg
Copy link
Contributor Author

miguelgrinberg commented Jan 15, 2025

@pquentin The builds are currently not generating code coverage data, and I haven't been able to figure out why. And I get coverage data when I run the tests locally. I'll continue looking for this, but if you have any ideas why this is happening let me know. Other than this the PR is ready for a review.

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