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

* 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>
(cherry picked from commit 00dc55b3bdc843c2fb1f6faf3f17da9bcb4ab642)

Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
This commit is contained in:
github-actions[bot] 2025-04-24 17:14:37 +04:00 committed by GitHub
parent 040ea97965
commit 70233ec27d
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
``` ```