Skip to content

Commit e73a4df

Browse files
Merge pull request #411 from Representable/database_diagram
Database diagram and protocols
2 parents 9eb21d9 + 9f72726 commit e73a4df

5 files changed

Lines changed: 17 additions & 1 deletion

File tree

docs/docs/doc1.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,11 @@ python3 -m venv venv
6767
```
6868
pip install -r requirements.txt
6969
```
70+
71+
For Mac users, you may need to use
72+
73+
```
74+
brew install graphviz
75+
```
76+
77+
if you're having trouble with your `pygraphviz` installation.

docs/docs/doc2.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@ Now that you've got your local development environment set up, please read throu
1515

1616
- When you're starting a new feature, open a branch off the main branch to start making your changes with the relevant issue in mind.
1717
- If the feature that you're working on takes a long time, you wanna make sure that your code is constantly being updated to the changes being pushed by teammates. In order to keep your feature branch updated to prevent conflicts later on, make sure to sync up your branch with main - by pulling changes in main and merging main with your branch. Syncing your branch daily is usually good practice.
18+
- If you have made any changes to the database schema (anything that requires a migration), run `python manage.py graph_models -a -o models.png` and push to your branch before you open a PR.
19+
- Write tests for _all_ your new code - try to make sure your tests call every function and test every case.
1820
- When you're ready to open a PR, open a PR to the main or to a chosen dev branch for features that aren't ready to be merged with the main branch yet. Try to make the PR as small as possible so that your reviewer can easily see what you've done. Be descriptive in your PR! Include screenshots if possible. Write "resolves #<issue_number>" at the end of your PR to automatically close the issue when the PR is merged.
21+
- Ensure you wrote enough tests for your new code! CodeCov will give you a coverage report on every pull request, and your PR may fail CodeCov's tests if coverage drops. _Even if all the tests pass_, don't merge a PR that has a negative `diff` in the coverage report. If coverage is down from the main branch, you can go to the CodeCov dashboard to see which lines are being missed, and then add new test cases to hit those lines. If there are lines you can't hit with any tests, double check that it's dead code by testing without it. Please remove all code that is actually dead, it's easier to review without it and much easier to maintain.
1922
- You need at least one review for any PR to the main branch.
2023

2124
### Reviewing
2225

2326
You've been assigned to review a PR. Now what?
2427

25-
- **Check tests:** Make sure the PR passes CI checks. If it does not, kindly ask the PR opener to review why their PR is failing checks and ask them to recommit if needed (they can recommit to the branch and it will be added to the same PR).
28+
- **Check tests:** Make sure the PR passes CI and CodeCov checks. Also check the CodeCov report comment, and ensure it does not reflect a drop in coverage. If it does not pass checks, or if coverage drops, kindly ask the PR opener to review why their PR is failing checks and ask them to recommit if needed (they can recommit to the branch and it will be added to the same PR).
2629
- **High-level review:** Read the PR description and screenshots. Does that match what's in the relevant spec doc? If there's a clear change that they can make, request changes by going to files->review changes-> request changes.
2730
- **Code review:** Check out the PR locally. You may do this in Github desktop, for example. Run the code and make sure the relevant features work. At the same time, go to the files tab in github and check each file off as you review them.
2831

models.png

353 KB
Loading

representable/settings/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"django.contrib.messages",
6464
"django.contrib.sites",
6565
"django.contrib.staticfiles",
66+
"django_extensions",
6667
"import_export",
6768
"main",
6869
"leaflet",

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ django-redis==4.10.0
1616
django-redis-cache==2.0.0
1717
django-select2==6.3.1
1818
django-widget-tweaks==1.4.3
19+
django-extensions==3.0.9
1920
Faker==1.0.5
2021
geojson==2.4.1
2122
geojson-rewind==0.2.0
23+
graphviz==0.14.1
2224
gunicorn==19.9.0
2325
idna==2.8
2426
isort==4.3.21
@@ -33,6 +35,8 @@ oauthlib==3.0.1
3335
psycopg2==2.7.6
3436
psycopg2-binary==2.7.7
3537
pycodestyle==2.5.0
38+
pydotplus==2.0.2
39+
pygraphviz==1.6
3640
pylibmc==1.6.0
3741
pylint==2.4.4
3842
python-binary-memcached==0.28.0

0 commit comments

Comments
 (0)