diff --git a/README.md b/README.md index cfcb29d0..38355af3 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ npm run dev You should now be able to access the application at http://localhost:8000/. -If you want full admin access, you can elevate your by running: +If you want full admin access, you can elevate your user by running: ```bash make elevate @@ -53,9 +53,9 @@ make elevate ## Local Development -If you can connect to the dev environment but still have issues such as; `403 - Forbidden Error` on your local, there are few steps you can follow to resolve this: +If you can connect to the dev environment but still have issues such as `403 - Forbidden Error` on your local, there are a few steps you can follow to resolve this: -- Using dev tools on your browser, go to Application tab and clear data for Local Storage, Session Storage and Cookies. +- Using dev tools on your browser, go to the Application tab and clear data for Local Storage, Session Storage and Cookies. - If the problem persists you may need to temporarily pause your VPN while you work on FFT on your local. @@ -65,49 +65,63 @@ If you can connect to the dev environment but still have issues such as; `403 - docker-compose run --service-ports ``` -## Important notes on design - -We use Django Guardian for model instance level permissions https://github.com/django-guardian/django-guardian - -Django Guardian **should not be used directly**. There is a set of wrapper functions in _forecast.permission_shortcuts_ +## Running the BDD tests -These add an additional permission check for the user being able to view forecasts at all. +Run the chrome container: -## Creating data/non-auto migrations +```bash +docker compose up -d chrome +``` -When adding data or non-auto generated migrations, please use the convention: +Build the frontend assets: -``` -[number]_data_[date]_[time] +```bash +npm run build ``` -for example: +Run the tests: -``` -0004_data_20200501_1345 +```bash +make bdd ``` -## Running the BDD tests +## Running the Python tests -Run the chrome container: +Run all tests: ```bash -docker compose up -d chrome +make test ``` -Build the frontend assets: +Run a single test or file: ```bash -npm run bdd +make test test=path/to/test.py::test_name_here ``` -Run the tests: +## Notes + +### Important notes on design + +We use Django Guardian for model instance level permissions https://github.com/django-guardian/django-guardian + +Django Guardian **should not be used directly**. There is a set of wrapper functions in _forecast.permission_shortcuts_ + +These add an additional permission check for the user being able to view forecasts at all. + +### Creating data/non-auto migrations + +When adding data or non-auto generated migrations, please use the convention: -```bash -make bdd +``` +[number]_data_[date]_[time] ``` -## Notes +for example: + +``` +0004_data_20200501_1345 +``` ### Managing user permissions