watchdogpolska / small_eod

System służący do usprawnienia obiegu dokumentów Stowarzyszenia na potrzeby prowadzonych litygacji Stowarzyszenia
http://small-eod.vercel.app
MIT License
56 stars 43 forks source link

wprowadzenie komendy dla diagramu modelu #180

Open ad-m opened 4 years ago

ad-m commented 4 years ago

Z użyciem poleceń:

docker-compose run web python manage.py graph_models -a -g -E -X TimestampUserLogModel --output a.dot
dot -Tpng "backend-project/a.dot" -o"diagram.png" -Kdot;

można wygenerować poniższy diagram modelu: obraz

Warto to wprowadzić do "Makefile", a może jako artefakt budowania, aby było to tego łatwy dostęp, póki nie zaczniemy prowadzić należytej dokumentacji projektu z Sphinx.

Wsparcie w zakresie polecenia "dot":

$ dpkg -S /usr/bin/dot
graphviz: /usr/bin/dot
$ type dot
dot jest /usr/bin/dot
$ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description:    Linux Mint 18.3 Sylvia
Release:    18.3
Codename:   sylvia
 $ apt show graphviz
Package: graphviz
Version: 2.38.0-12ubuntu2.1
Priority: optional
Section: graphics
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 9736 kB
Depends: libc6 (>= 2.15), libcdt5, libcgraph6, libexpat1 (>= 2.0.1), libgd3 (>= 2.1.0~alpha~), libgvc6, libgvpr2, libx11-6, libxaw7, libxmu6, libxt6
Recommends: fonts-liberation
Suggests: gsfonts, graphviz-doc
Conflicts: gdtclft
Homepage: http://www.graphviz.org/
Task: edubuntu-desktop-gnome
Supported: 5y
Download-Size: 680 kB
APT-Manual-Installed: yes
APT-Sources: http://ftp.agh.edu.pl/ubuntu xenial-updates/main amd64 Packages
Description: rich set of graph drawing tools
 Graph drawing addresses the problem of visualizing structural information
 by constructing geometric representations of abstract graphs and networks.
 Automatic generation of graph drawings has important applications in key
 technologies such as database design, software engineering, VLSI and
 network design and visual interfaces in other domains. Situations where
 these tools might be particularly useful include:
 .
   * you would like to restructure a program and first need to understand
     the relationships between its types, procedures, and source files
   * you need to find the bottlenecks in an Internet backbone - not only
     individual links, but their relationships
   * you're debugging a protocol or microarchitecture represented as a
     finite state machine and need to figure out how a certain
     error state arises
   * you would like to browse a database schema, knowledge base, or
     distributed program represented graphically
   * you would like to see an overview of a collection of linked documents
   * you would like to discover patterns and communities of interest in a
     database of telephone calls or e-mail messages
 .
 This package contains the command-line tools.

N: There is 1 additional record. Please use the '-a' switch to see it
ad-m commented 4 years ago

W celach archiwalnych diagram modelu dla v1 prezentuje się następująco: a