From b2455e42115ba494bf8427a1bc09a43db538e501 Mon Sep 17 00:00:00 2001 From: Pepijn <83588709+pepijn-motosumo@users.noreply.github.com> Date: Mon, 9 Oct 2023 21:09:49 +0200 Subject: [PATCH] Small documentation improvements for new developers (#6895) --- .../docs/contributing/development_tips/tests.rst | 2 +- docs/docs/contributing/installation.rst | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/docs/contributing/development_tips/tests.rst b/docs/docs/contributing/development_tips/tests.rst index b41488821..6939c5372 100644 --- a/docs/docs/contributing/development_tips/tests.rst +++ b/docs/docs/contributing/development_tips/tests.rst @@ -33,7 +33,7 @@ To verify whether your tests pass in ServerMode, you can run the following comma .. sourcecode:: bash - moto_server + python moto/server.py TEST_SERVER_MODE=true pytest -sv tests/test_service/.. diff --git a/docs/docs/contributing/installation.rst b/docs/docs/contributing/installation.rst index b1ed9e25a..d520cabcd 100644 --- a/docs/docs/contributing/installation.rst +++ b/docs/docs/contributing/installation.rst @@ -36,13 +36,20 @@ With all dependencies installed, run the following command to run all the tests Note that this may take awhile - there are many services, and each service will have a boatload of tests. +You can also run the linting checks separately: + +.. code-block:: bash + + make lint + To verify all tests pass for a specific service, for example for `s3`, run these commands manually: .. code-block:: bash - ruff moto/s3 + ruff moto/s3 tests/test_s3 black --check moto/s3 tests/test_s3 - pylint tests/test_s3 + pylint moto/s3 tests/test_s3 + mypy pytest -sv tests/test_s3 If black fails, you can run the following command to automatically format the offending files: @@ -76,7 +83,8 @@ Then standard development on Moto can proceed, for example: .. code-block:: bash - ruff moto/s3 + ruff moto/s3 tests/test_s3 black --check moto/s3 tests/test_s3 - pylint tests/test_s3 + pylint moto/s3 tests/test_s3 + mypy pytest -sv tests/test_s3 \ No newline at end of file