Update instructions to run ML tests with Elasticsearch (#781)

* Update instructions to run ML tests with Elasticsearch

* Update CONTRIBUTING.md

Co-authored-by: David Kyle <david.kyle@elastic.co>

---------

Co-authored-by: David Kyle <david.kyle@elastic.co>
This commit is contained in:
Quentin Pradet 2025-04-24 15:42:00 +04:00 committed by GitHub
parent 8147eb517a
commit 00dc55b3bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,9 +78,15 @@ Once your changes and tests are ready to submit for review:
# Run Auto-format, lint, mypy type checker for your changes # Run Auto-format, lint, mypy type checker for your changes
$ nox -s format $ nox -s format
# Run the test suite # Launch Elasticsearch with a trial licence and ML enabled
$ pytest --doctest-modules eland/ tests/ $ docker run --name elasticsearch -p 9200:9200 -e "discovery.type=single-node" -e "xpack.security.enabled=false" -e "xpack.license.self_generated.type=trial" docker.elastic.co/elasticsearch/elasticsearch:9.0.0
$ pytest --nbval tests/notebook/
# See all test suites
$ nox -l
# Run a specific test suite
$ nox -rs "test-3.12(pandas_version='2.2.3')"
# Run a specific test
$ nox -rs "test-3.12(pandas_version='2.2.3')" -- -k test_learning_to_rank
``` ```