Skip to content

Commit 737dbc6

Browse files
authored
Merge pull request #418 from rpigneri-vol/main
README.md Updates for New Users
2 parents 216ef50 + e4f182a commit 737dbc6

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This method uses Docker to run the complete application stack.
3535
3. Build and run the project.
3636

3737
```
38-
docker-compose build && docker-compose up -d && docker-compose logs -f
38+
docker compose build && docker compose up -d && docker compose logs -f
3939
```
4040

4141
## Installation (Frontend Only)
@@ -51,7 +51,7 @@ All code must pass the unit tests and style checks before it can be merged into
5151

5252

5353
```
54-
docker exec -it "police-data-trust-api-1" /bin/bash
54+
docker exec -it "police-data-trust_api_1" /bin/bash
5555
5656
```
5757

backend/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
This is the backend for the National Police Data Index project. It is a Python Flask application that serves as the API for the front end.
44

5+
---
6+
**NOTE:**
7+
8+
If you are having trouble running your backend tests for the first time, you might be interested in [this README.md](tests/README.md) rather than this one :-).
9+
10+
---
11+
512
## Database
613

714
The backend uses a PostgreSQL database to store data. The database schema is defined in [database/models](https://github.com/codeforboston/police-data-trust/tree/a743c232b5737b193086264e1364b1475873a884/backend/database/models).

backend/tests/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ To run backend tests locally:
22

33
## Pytest (Unit Tests)
44

5-
1. Start the application cluster with `docker-compose up`
5+
1. Start the application cluster with `docker compose up`
66

7-
2. Start the test database with `docker-compose --profile test up`.
7+
2. Start the test database with `docker compose --profile test up`.
88
Yes, you should start the test database separately. It'll be more likely to boot properly this way.
99

10-
3. Add a test marker to the test DB. This will allow the DB to clear itself after each test run. See instructions below.
10+
3. Add a test marker to the test DB. This will allow the DB to clear itself after each test run. See instructions[below](#adding-a-test-marker-to-the-test-database).
1111

1212
4. Connect to the API container with `docker exec -it "police-data-trust-api-1" /bin/bash`. You can find the container name by running `docker ps`.
1313

@@ -20,22 +20,22 @@ Yes, you should start the test database separately. It'll be more likely to boot
2020

2121
1. With the test database running, navigate to `localhost:7474` in your browser.
2222

23-
2. On the Neo4J web interface, select `neo4j://127.0.0.1:7688` as the connection URL. Otherwise, you will connect to the main database.
23+
2. On the Neo4J web interface, select `neo4j://127.0.0.1:7688` as the connection URL. Otherwise, you will connect to the main database. You can connect to a new DB by typing the following into the command bar at the very top of your browser window: `:server connect neo4j://127.0.0.1:7688` and pressing Enter or clicking the run button. The command bar often starts with `neo4j$ ` at the beginning.
2424

25-
3. Log in with the username `neo4j` and the password `test_pwd`.
26-
27-
4. Run the following query to add a test marker to the database:
25+
3. Run the following query to add a test marker to the database:
2826

2927
```
3028
MERGE (n:TestMarker {name: 'TEST_DATABASE'});
3129
```
3230

31+
This command can also be run from the command bar at the top of your screen.
32+
3333
5. You can now run the tests. The database will clear itself after each test run.
3434

3535

3636
## Flake8 (Linting)
3737

38-
1. Start the application cluster with `docker-compose up`
38+
1. Start the application cluster with `docker compose up`
3939

4040
2. Connect to the API container with `docker exec -it "police-data-trust-api-1" /bin/bash`. You can find the container name by running `docker ps`.
4141

0 commit comments

Comments
 (0)