Skip to content

Commit

Permalink
FFT-177 Update README (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
CaitBarnard authored Feb 5, 2025
1 parent 1c9f180 commit eded299
Showing 1 changed file with 39 additions and 25 deletions.
64 changes: 39 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand All @@ -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

Expand Down

0 comments on commit eded299

Please sign in to comment.