Skip to content

Commit

Permalink
graph django models
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Dec 15, 2023
1 parent 42f6bf4 commit 39b32da
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 8 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,20 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

docs:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: ocadotechnology/codeforlife-workspace/.github/actions/python/docs@actions # TODO: use @main

release:
concurrency: release
runs-on: ubuntu-latest
needs: [test]
needs: [docs]
if: github.ref_name == 'main'
steps:
- name: 🛫 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ pip-log.txt
pip-delete-this-directory.txt

# Any graphs generated in the docs
docs/*.png
# docs/*.png

# Any dot files generated by pydot
*.dot
# *.dot

# Unit test / coverage reports
htmlcov/
Expand Down
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ django-stubs = {version = "==4.2.6", extras = ["compatible-mypy"]}
djangorestframework-stubs = {version = "==3.14.4", extras = ["compatible-mypy"]}
pylint = "==3.0.2"
pylint-django = "==2.5.5"
pygraphviz = "==1.11"

[requires]
python_version = "3.8"
15 changes: 11 additions & 4 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions codeforlife/settings/third_party.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@
],
"DEFAULT_PAGINATION_CLASS": "codeforlife.pagination.LimitOffsetPagination",
}

# Django Extensions - Graph Models
# https://django-extensions.readthedocs.io/en/latest/graph_models.html?highlight=graph_models#default-settings

GRAPH_MODELS = {
"all_applications": True,
"group_models": True,
"pygraphviz": True,
"output": "docs/entity_relationship_diagram.png",
"arrow_shape": "normal",
"color_code_deletions": True,
"rankdir": "BT",
}
1 change: 1 addition & 0 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"django.contrib.staticfiles",
"django.contrib.sites",
"codeforlife.user",
"django_extensions",
]

MIDDLEWARE = [
Expand Down

0 comments on commit 39b32da

Please sign in to comment.