Skip to content

Commit

Permalink
Update documentation (#1116)
Browse files Browse the repository at this point in the history
## Description of Changes
Modified documentation and removed an unused variable.

Taken from: #1115

## Tests and Linting
- [x] This branch is up-to-date with the `develop` branch.
- [x] `pytest` passes on my local development environment.
- [x] `pre-commit` passes on my local development environment.
  • Loading branch information
michplunkett authored Jul 24, 2024
1 parent 4c22eb6 commit 7cdceb0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ dispatcher where…", "Improve our handling of…", etc.


## Tests and Linting
- [ ] This branch is up-to-date with the `develop` branch.
- [ ] `pytest` passes on my local development environment.
- [ ] `pre-commit` passes on my local development environment.
- [ ] This branch is up-to-date with the `develop` branch.
- [ ] `pytest` passes on my local development environment.
- [ ] `pre-commit` passes on my local development environment.
3 changes: 1 addition & 2 deletions CONTRIB.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,14 @@ From here on out, we'll be using the Flask CLI. First we need to 'stamp' the cur
```shell
$ docker exec -it openoversight-web-1 bash # 'openoversight-web-1' is the name of the app container seen in the step above
$ flask db stamp head
$ flask db migrate -m "[THE NAME OF YOUR MIGRATION IN ALL LOWER CASE]" # NOTE: Slugs are limited to 40 characters and will be truncated after the limit
```

(Hint: If you get errors when running `flask` commands, e.g. because of differing Python versions, you may need to run the commands in the docker container by prefacing them as so: `docker exec -it openoversight_web_1 flask db stamp head`)

Next make your changes to the database models in `OpenOversight/app/models/database.py`. You'll then generate the migrations:

```shell
$ flask db migrate -m "[THE NAME OF YOUR MIGRATION IN ALL LOWER CASE]"
$ flask db migrate -m "[THE NAME OF YOUR MIGRATION IN ALL LOWER CASE]" # NOTE: Slugs are limited to 40 characters and will be truncated after the limit
```

And then you should inspect/edit the migrations. You can then apply the migrations:
Expand Down
1 change: 0 additions & 1 deletion OpenOversight/app/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ def bulk_add_officers(filename, no_create, update_by_name, update_static_fields)

for row in csvfile:
department_id = row["department_id"]
department = departments.get(department_id)
if row["department_id"] not in departments:
department = Department.query.filter_by(id=department_id).one_or_none()
if department:
Expand Down

0 comments on commit 7cdceb0

Please sign in to comment.