Skip to content

Commit f2138b2

Browse files
Small language changes in Wave 1 & 5 docs for consistency & clarity
1 parent 06474bf commit f2138b2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ada-project-docs/wave_01.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ We might also consider creating a route helper method that can:
5656
## CRUD for Tasks
5757

5858
Use the tests in `tests/test_wave_01.py` to guide your implementation.
59+
5960
- You may feel that there are missing tests and missing edge cases considered in this wave. This is intentional.
6061
- You have fulfilled wave 1 requirements if all of the wave 1 tests pass.
6162
- You are free to add additional features, as long as the wave 1 tests still pass. However, we recommend that you consider the future waves, first.
@@ -66,7 +67,7 @@ Use the tests in `tests/test_wave_01.py` to guide your implementation.
6667
- Pay attention to the exact shape of the expected JSON. Double-check nested data structures and the names of the keys for any misspellings.
6768
- That said, remember that dictionaries do not have an implied order. This is still true in JSON with objects. When you make Postman requests, the order of the key/value pairings within the response JSON object does not need to match the order specified in this document. (The term "object" in JSON is analogous to "dictionary" in Python.)
6869
- Notice that the details for a Task in the response is shared across all the endpoints that return Task details. Rather than repeating the same literal `dict` structure in each response, we should create a helper method that returns the `dict` structure for a Task, and use it in each relevant endpoint. This will ensure that all our responses are consistent.
69-
- Retrieving a model by its ID is a common operation. We should consider creating a route helper method that can retrieve a model by its ID, and use it in this route.
70+
- Retrieving a model by its ID is a common operation. We should create a route helper method that can retrieve a model by its ID, and use it in relevant routes.
7071

7172
### CLI
7273

ada-project-docs/wave_05.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ Goals should contain these attributes. **The tests require the title column to b
3737
- Don't forget to run:
3838
- `flask db migrate` every time there's a change in models, in order to generate migrations
3939
- `flask db upgrade` to run all generated migrations
40-
- Similar to the Task model, we could add a class method to the Goal model that initializes a new instance from a dictionary, and use this method in relevant routes.
40+
- Similar to the Task model, we should add a class method to the Goal model that initializes a new instance from a dictionary, and use this method in relevant routes.
4141
- If all of our models have this method, we could create a route helper method that initializes a new model instance from a dictionary, and use it in any route that creates a new model instance.
4242
- Also like the Task model, notice that routes that return a JSON response are sending a dictionary representation of the goal that was fetched or created.
4343
- Creating a model helper method to return this dictionary, which we can then use to help build these route responses, will improve the consistency of our endpoints.
44-
- Further, we should remember that retrieving a model by its ID is a common operation. We should consider creating a route helper method that can retrieve a model by its ID, and use it for relevant routes.
44+
- Further, we should remember that retrieving a model by its ID is a common operation. If it has not been done yet, we should create a route helper method that can retrieve a model by its ID, and use it for relevant routes.
4545
- This method would be very similar in functionality to retrieving a Task model by its ID, so rather than making an entirely new route helper method, we could generalize any similar function to also work with a Goal (or any other model).
4646

4747
## CRUD for Goals

0 commit comments

Comments
 (0)