data-flow-diagram 1.11.1.post1__tar.gz → 1.12.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/PKG-INFO +1 -1
  2. data_flow_diagram-1.12.0/setup.py +159 -0
  3. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram/dfd.py +11 -2
  4. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram/dfd_dot_templates.py +7 -7
  5. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram.egg-info/PKG-INFO +1 -1
  6. data_flow_diagram-1.11.1.post1/setup.py +0 -64
  7. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/README.md +0 -0
  8. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/pyproject.toml +0 -0
  9. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/setup.cfg +0 -0
  10. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram/__init__.py +0 -0
  11. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram/config.py +0 -0
  12. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram/dependency_checker.py +0 -0
  13. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram/dot.py +0 -0
  14. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram/error.py +0 -0
  15. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram/markdown.py +0 -0
  16. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram/model.py +0 -0
  17. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram/parser.py +0 -0
  18. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram/scanner.py +0 -0
  19. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram.egg-info/SOURCES.txt +0 -0
  20. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram.egg-info/dependency_links.txt +0 -0
  21. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram.egg-info/entry_points.txt +0 -0
  22. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram.egg-info/requires.txt +0 -0
  23. {data_flow_diagram-1.11.1.post1 → data_flow_diagram-1.12.0}/src/data_flow_diagram.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: data-flow-diagram
3
- Version: 1.11.1.post1
3
+ Version: 1.12.0
4
4
  Summary: Commandline tool to generate data flow diagrams from text
5
5
  Home-page: https://github.com/pbauermeister/dfd
6
6
  Author: Pascal Bauermeister
@@ -0,0 +1,159 @@
1
+ """A setuptools based setup module.
2
+
3
+ See:
4
+ https://packaging.python.org/guides/distributing-packages-using-setuptools/
5
+ """
6
+
7
+ from setuptools import setup, find_packages
8
+ import pathlib
9
+
10
+ CHANGES = """
11
+
12
+ ## Version 1.12.0:
13
+ - Support style (and hence attrib) on Stores and Channels.
14
+
15
+ ## Version 1.11.1.post2:
16
+
17
+ Bug fixes:
18
+ - Apply attribs on frames.
19
+ - Attribs are matched by whole names, so e.g. DATA and DATABASE will work.
20
+
21
+ Improvements:
22
+ - 'make install' to install locally.
23
+ - CHANGES.md is read by setup.py to deduce the version.
24
+
25
+ ## Version 1.11.0:
26
+
27
+ - Keyword "attrib" to define styles.
28
+
29
+ ## Version 1.10.1:
30
+
31
+ - When item text is numbered, add newline after the number.
32
+
33
+ ## Version 1.9.1:
34
+
35
+ - Add troubleshooting in README.md.
36
+
37
+ ## Version 1.9.0:
38
+
39
+ - Allow line continuation with a trailing backslash
40
+
41
+ ## Version 1.8.0:
42
+
43
+ - Add frames
44
+
45
+ ## Version 1.7.1:
46
+
47
+ - Support continuous back- and relaxed- flows.
48
+
49
+ ## Version 1.7.0:
50
+
51
+ - Add continuous flow (cflow or -->>).
52
+ - Add control (may only connect to signals).
53
+
54
+ ## Version 1.6.0:
55
+
56
+ - Dependencies:
57
+ - items with name #SNIPPET:[NAME] or FILE:[NAME] refer to another graph,
58
+ - referred item is rendered "ghosted",
59
+ - dependencies are checked (unless --no-check-dependencies is passed).
60
+ - Add graph title (unless --no-graph-title is passed).
61
+ - Error in snippets of MD files: display line number relative to MD file (not snippet).
62
+
63
+ ## Version 1.5.0:
64
+
65
+ - Wrap labels by `style item-text-width N` (default N=20).
66
+ - and `style connection-text-width N` (default N=14).
67
+
68
+ ## Version 1.4.1:
69
+
70
+ - Processes have very light grey backgrounds.
71
+ - Add the 'none' item type.
72
+ - Connections with reversed direction affect the items placements.
73
+ - A '?' postfix to a connection, removes the edge constraint.
74
+ - Fix formatting of '\n' for Store and Channel (which are HTML nodes).
75
+ - Colorize error messages.
76
+ - Add drawable attributes as [ATTRS...] prefix before labels.
77
+
78
+ ## Version 1.3.x:
79
+
80
+ - Style vertical: is supported.
81
+ - Style context: for context (top-level) diagrams.
82
+ - Add undirected flow (uflow aka '--').
83
+
84
+ ## Version 1.2.3
85
+
86
+ - Snippet reference and ungenerated snippet were marked with '<'; now
87
+ use '#' instead.
88
+ - Detect include (infinite) recursions and print error.
89
+ - Can print its own version.
90
+
91
+ ## Version 1.1.1
92
+
93
+ - Fix bug with left/bidir arrows.
94
+
95
+ ## Version 1.1.0
96
+
97
+ - Upon error, print error stack trace.
98
+ - Items: label can be ommitted.
99
+ - Connections: syntactic sugars with arrows.
100
+
101
+ ## Version 1.0.0
102
+
103
+ - Initial release.
104
+ """
105
+
106
+ here = pathlib.Path(__file__).parent.resolve()
107
+ long_description = (here / "README.md").read_text(encoding="utf-8")
108
+
109
+ # extract version
110
+ lines = CHANGES.splitlines()
111
+ lines = [l[2:] for l in lines if l.startswith('##')]
112
+ version = lines[0].strip().split(':', 1)[0].split()[-1].strip()
113
+
114
+ setup(
115
+ name="data-flow-diagram",
116
+ version=version,
117
+ description="Commandline tool to generate data flow diagrams from text",
118
+ long_description=long_description,
119
+ long_description_content_type="text/markdown",
120
+ url="https://github.com/pbauermeister/dfd",
121
+ author="Pascal Bauermeister",
122
+ author_email="pascal.bauermeister@gmail.com",
123
+ classifiers=[
124
+ # https://pypi.org/classifiers/ :
125
+ "Development Status :: 3 - Alpha",
126
+ "Intended Audience :: Information Technology",
127
+ "Topic :: Software Development",
128
+ "Topic :: Software Development :: Documentation",
129
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
130
+ "Programming Language :: Python :: 3",
131
+ ],
132
+ keywords="diagram-generator, development, tool",
133
+ license="GNU General Public License v3 (GPLv3)",
134
+ package_dir={"": "src"},
135
+ packages=find_packages(where="src"),
136
+ python_requires=">=3.10, <4",
137
+ install_requires=[],
138
+ extras_require={
139
+ "dev": ["check-manifest"],
140
+ "test": ["coverage"],
141
+ },
142
+ package_data={
143
+ # "data_flow_diagram": ["tbdpackage__data.dat"],
144
+ },
145
+ # data_files=[('data_flow_diagram', ["VERSION"])],
146
+ # The following would provide a command called `data-flow-diagram` which
147
+ # executes the function `main` from this package when invoked:
148
+ entry_points={
149
+ "console_scripts": [
150
+ "data-flow-diagram=data_flow_diagram:main",
151
+ ],
152
+ },
153
+ project_urls={
154
+ "Bug Reports": "https://github.com/pbauermeister/dfd/issues",
155
+ # "Funding": "https://donate.pypi.org",
156
+ # "Say Thanks!": "http://saythanks.io/to/example",
157
+ "Source": "https://github.com/pbauermeister/dfd",
158
+ },
159
+ )
@@ -99,12 +99,12 @@ class Generator:
99
99
  f'{attrs}]'
100
100
  )
101
101
  case model.STORE:
102
- d = self._item_to_html_dict(copy)
102
+ d = self._attrib_to_dict(copy, attrs)
103
103
  line = TMPL.STORE.format(**d)
104
104
  case model.NONE:
105
105
  line = f'"{copy.name}" [shape=none label="{copy.text}" {attrs}]'
106
106
  case model.CHANNEL:
107
- d = self._item_to_html_dict(copy)
107
+ d = self._attrib_to_dict(copy, attrs)
108
108
  if self.graph_options.is_vertical:
109
109
  line = TMPL.CHANNEL_HORIZONTAL.format(**d)
110
110
  else:
@@ -116,6 +116,15 @@ class Generator:
116
116
  )
117
117
  self.append(line, item)
118
118
 
119
+ def _attrib_to_dict(self, item: model.Item, attrs: str) -> dict[str, str]:
120
+ d = self._item_to_html_dict(item)
121
+ d.update({'fontcolor': 'black', 'color': 'black'})
122
+ attrs_d = {
123
+ k: v for k, v in [each.split('=', 1) for each in attrs.split()]
124
+ }
125
+ d.update(attrs_d)
126
+ return d
127
+
119
128
  def _item_to_html_dict(self, item: model.Item) -> dict[str, Any]:
120
129
  d = item.__dict__
121
130
  d['text'] = d['text'].replace('\\n', '<br/>')
@@ -1,9 +1,9 @@
1
1
  STORE = """
2
2
  "{name}" [shape=none label=<
3
3
  <TABLE BORDER="0">
4
- <TR><TD BGCOLOR="black" WIDTH="6"></TD></TR>
5
- <TR><TD>{text}</TD></TR>
6
- <TR><TD BGCOLOR="black" WIDTH="6"></TD></TR>
4
+ <TR><TD BGCOLOR="{color}" WIDTH="6"></TD></TR>
5
+ <TR><TD><FONT COLOR="{fontcolor}">{text}</FONT></TD></TR>
6
+ <TR><TD BGCOLOR="{color}" WIDTH="6"></TD></TR>
7
7
  </TABLE>>]
8
8
  """.strip()
9
9
 
@@ -13,11 +13,11 @@ CHANNEL = """
13
13
  <TABLE BORDER="0">
14
14
  <TR>
15
15
  <TD WIDTH="48"></TD>
16
- <TD BGCOLOR="black" WIDTH="0" PORT="x"><BR/><BR/></TD>
16
+ <TD BGCOLOR="{color}" WIDTH="0" PORT="x"><BR/><BR/></TD>
17
17
  <TD WIDTH="48"></TD>
18
18
  </TR>
19
19
  <TR>
20
- <TD COLSPAN="3">{text}</TD>
20
+ <TD COLSPAN="3"><FONT COLOR="{fontcolor}">{text}</FONT></TD>
21
21
  </TR>
22
22
  </TABLE>>]
23
23
  """.strip()
@@ -26,8 +26,8 @@ CHANNEL = """
26
26
  CHANNEL_HORIZONTAL = """
27
27
  "{name}" [shape=none label=<
28
28
  <TABLE BORDER="0">
29
- <TR><TD BGCOLOR="black" PORT="x"></TD></TR>
30
- <TR><TD>{text}</TD></TR>
29
+ <TR><TD BGCOLOR="{color}" PORT="x"></TD></TR>
30
+ <TR><TD><FONT COLOR="{fontcolor}">{text}</FONT></TD></TR>
31
31
  </TABLE>>]
32
32
  """.strip()
33
33
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: data-flow-diagram
3
- Version: 1.11.1.post1
3
+ Version: 1.12.0
4
4
  Summary: Commandline tool to generate data flow diagrams from text
5
5
  Home-page: https://github.com/pbauermeister/dfd
6
6
  Author: Pascal Bauermeister
@@ -1,64 +0,0 @@
1
- """A setuptools based setup module.
2
-
3
- See:
4
- https://packaging.python.org/guides/distributing-packages-using-setuptools/
5
- """
6
-
7
- from setuptools import setup, find_packages
8
- import pathlib
9
-
10
- here = pathlib.Path(__file__).parent.resolve()
11
- long_description = (here / "README.md").read_text(encoding="utf-8")
12
-
13
- # extract version
14
- with open(here / "CHANGES.md") as f:
15
- lines = f.read().splitlines()
16
- lines = [l[2:] for l in lines if l.startswith('##')]
17
- version = lines[0].strip().split(':', 1)[0].split()[-1].strip()
18
-
19
- setup(
20
- name="data-flow-diagram",
21
- version=version,
22
- description="Commandline tool to generate data flow diagrams from text",
23
- long_description=long_description,
24
- long_description_content_type="text/markdown",
25
- url="https://github.com/pbauermeister/dfd",
26
- author="Pascal Bauermeister",
27
- author_email="pascal.bauermeister@gmail.com",
28
- classifiers=[
29
- # https://pypi.org/classifiers/ :
30
- "Development Status :: 3 - Alpha",
31
- "Intended Audience :: Information Technology",
32
- "Topic :: Software Development",
33
- "Topic :: Software Development :: Documentation",
34
- "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
35
- "Programming Language :: Python :: 3",
36
- ],
37
- keywords="diagram-generator, development, tool",
38
- license="GNU General Public License v3 (GPLv3)",
39
- package_dir={"": "src"},
40
- packages=find_packages(where="src"),
41
- python_requires=">=3.10, <4",
42
- install_requires=[],
43
- extras_require={
44
- "dev": ["check-manifest"],
45
- "test": ["coverage"],
46
- },
47
- package_data={
48
- # "data_flow_diagram": ["tbdpackage__data.dat"],
49
- },
50
- # data_files=[('data_flow_diagram', ["VERSION"])],
51
- # The following would provide a command called `data-flow-diagram` which
52
- # executes the function `main` from this package when invoked:
53
- entry_points={
54
- "console_scripts": [
55
- "data-flow-diagram=data_flow_diagram:main",
56
- ],
57
- },
58
- project_urls={
59
- "Bug Reports": "https://github.com/pbauermeister/dfd/issues",
60
- # "Funding": "https://donate.pypi.org",
61
- # "Say Thanks!": "http://saythanks.io/to/example",
62
- "Source": "https://github.com/pbauermeister/dfd",
63
- },
64
- )