From 930f3825d72656ac225fb30015c20e9137e0eb18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=20V=C3=AEjdea?= Date: Wed, 19 Dec 2018 19:48:10 +0200 Subject: [PATCH] Improve installation walkthroughs --- CONTRIBUTING.rst | 10 +++++----- README.rst | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 0642199..1f38c6e 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -35,6 +35,7 @@ You want to contribute some code? Great! Here are a few steps to get you started $ virtualenv venv $ source venv/bin/activate + (venv) $ python -m pip install -U pip (venv) $ pip install -U -e .[validation] (venv) $ pip install -U -r requirements/dev.txt @@ -57,8 +58,7 @@ You want to contribute some code? Great! Here are a few steps to get you started .. code:: console - (venv) $ cd testproj - (venv) $ python manage.py generate_swagger ../tests/reference.yaml --overwrite --user admin --url http://test.local:8002/ + (venv) $ python testproj/manage.py generate_swagger ../tests/reference.yaml --overwrite --user admin --url http://test.local:8002/ After checking the git diff to verify that no unexpected changes appeared, you should commit the new ``reference.yaml`` together with your changes. @@ -67,13 +67,13 @@ You want to contribute some code? Great! Here are a few steps to get you started .. code:: console - # (optional) sort imports with isort and check flake8 linting - (venv) $ isort --apply - (venv) $ flake8 src/drf_yasg testproj tests setup.py # install test dependencies (venv) $ pip install -U -r requirements/test.txt # run tests in the current environment, faster than tox (venv) $ pytest -n auto --cov + # (optional) sort imports with isort and check flake8 linting + (venv) $ isort --apply + (venv) $ flake8 src/drf_yasg testproj tests setup.py # (optional) run tests for other python versions in separate environments (venv) $ tox diff --git a/README.rst b/README.rst index f262ebc..7d60c10 100644 --- a/README.rst +++ b/README.rst @@ -140,7 +140,7 @@ In ``urls.py``: ... ] -This exposes 4 cached, validated and publicly available endpoints: +This exposes 4 endpoints: * A JSON view of your API specification at ``/swagger.json`` * A YAML view of your API specification at ``/swagger.yaml`` @@ -294,6 +294,7 @@ For additional usage examples, you can take a look at the test project in the `` $ virtualenv venv $ source venv/bin/activate (venv) $ cd testproj + (venv) $ python -m pip install -U pip (venv) $ pip install -U -r requirements.txt (venv) $ python manage.py migrate (venv) $ python manage.py shell -c "import createsuperuser"