Add Elasticsearch-DSL code#2736
Conversation
|
A documentation preview will be available soon. Request a new doc build by commenting
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. |
4ec2881 to
7b1af33
Compare
1d951c6 to
9cab9c2
Compare
|
@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. |
pquentin
left a comment
There was a problem hiding this comment.
- 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.
Yes, please, as a follow-up.
@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.
I haven't looked in detail yet, but the current build has 13% coverage, and we don't use coverage for anything meaningful today. However it would be nice to fix this issue as I'm seeing 0% coverage here. (In the future, we can exclude generated code to make coverage more useful.)
528c4c5 to
5e74429
Compare
|
@pquentin The last commit addresses your feedback. One thing I want to direct your attention to, is the handling of the user agent, which I only noticed now. The connection class used to add an |
pquentin
left a comment
There was a problem hiding this comment.
Thanks! Sorry, I did not realize my mypy suggestion would bring so much changes.
* Add Elasticsearch-DSL code * reformat code * runasync dsl * dsl generator * fix pytest configuration * dsl testing fixes * wipe cluster after dsl tests * remove unused coverage option * review feedback * 2nd round of feedback addressed * fix coverage reports (cherry picked from commit 10ded22)
* Add Elasticsearch-DSL code * reformat code * runasync dsl * dsl generator * fix pytest configuration * dsl testing fixes * wipe cluster after dsl tests * remove unused coverage option * review feedback * 2nd round of feedback addressed * fix coverage reports (cherry picked from commit 10ded22)
* Add Elasticsearch-DSL code * reformat code * runasync dsl * dsl generator * fix pytest configuration * dsl testing fixes * wipe cluster after dsl tests * remove unused coverage option * review feedback * 2nd round of feedback addressed * fix coverage reports (cherry picked from commit 10ded22) Co-authored-by: Miguel Grinberg <miguel.grinberg@gmail.com>
* Add Elasticsearch-DSL code * reformat code * runasync dsl * dsl generator * fix pytest configuration * dsl testing fixes * wipe cluster after dsl tests * remove unused coverage option * review feedback * 2nd round of feedback addressed * fix coverage reports (cherry picked from commit 10ded22) Co-authored-by: Miguel Grinberg <miguel.grinberg@gmail.com>
This change adds the Elasticsearch-DSL code. Note that the documentation will be merged in a separate PR.
elasticsearch_dslpackage, except that its root is nowelasticsearch.dsl. Users can replace the_with a.in all imports.https://Elasticsearch endpoints, since that is what we are using in integration test runs.run-unasync-dsl.pyscript. We can consider merging the two.generator.pyscript that generates the query, aggregation and response source files was moved to this project asgenerator-dsl.py, along with its Jinja templates. We can consider moving this to the Python client generator project.