diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5dced081ce..ad68394fca 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,7 @@ CHANGELOG * doc-fix: move overview content in main README into sphynx project * bug-fix: pass accelerator_type in ``deploy`` for REST API TFS ``Model`` * doc-fix: move content from tf/README.rst into sphynx project +* doc-fix: Improve new developer experience in README 1.18.3.post1 ============ diff --git a/README.rst b/README.rst index 96161850ea..91d8bda716 100644 --- a/README.rst +++ b/README.rst @@ -97,9 +97,16 @@ Running tests SageMaker Python SDK has unit tests and integration tests. +You can install the libraries needed to run the tests by running :code:`pip install --upgrade .[test]` or, for Zsh users: :code:`pip install --upgrade .\[test\]` + **Unit tests** -tox is a prerequisite for running unit tests so you need to make sure you have it installed. To run the unit tests: + +We run unit tests with tox, which is a program that lets you run unit tests for multiple Python versions, and also make sure the +code fits our style guidelines. We run tox with Python 2.7 and 3.6, so to run unit tests +with the same configuration we do, you'll need to have interpreters for Python 2.7 and Python 3.6 installed. + +To run the unit tests with tox, run: :: @@ -109,23 +116,29 @@ tox is a prerequisite for running unit tests so you need to make sure you have i To run the integration tests, the following prerequisites must be met -1. Access to an AWS account to run the tests on -2. AWS account credentials available to boto3 clients used in the tests -3. The AWS account has an IAM role named :code:`SageMakerRole` -4. The libraries listed in the ``extras_require`` object in ``setup.py`` for ``test`` are installed. - You can do this by running the following command: :code:`pip install --upgrade .[test]` +1. AWS account credentials are available in the environment for the boto3 client to use. +2. The AWS account has an IAM role named :code:`SageMakerRole` with the AmazonSageMakerFullAccess policy attached. + +We recommend selectively running just those integration tests you'd like to run. You can filter by individual test function names with: + +:: + + pytest -k 'test_i_care_about' + -You can run integ tests by issuing the following command: +You can also run all of the integration tests by running the following command, which runs them in sequence, which may take a while: :: pytest tests/integ -You can also filter by individual test function names (usable with any of the previous commands): + +You can also run them in parallel: :: - pytest -k 'test_i_care_about' + pytest -n auto tests/integ + Building Sphinx docs ~~~~~~~~~~~~~~~~~~~~