You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): add current working directory to path so that py2puml can import and inspect modules in specific folders (#40)
* build(poetry): make poetry use the current python binary
* fix(cli): add current working directory to system path so that its modules can be imported and inspected by poetry
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Some parsing features are available only since Python 3.8 (like [ast.get_source_
20
20
21
21
## Features
22
22
23
-
From a given path corresponding to a folder containing Python code, `py2puml` processes each file as a module and generates a [PlantUML script](https://plantuml.com/en/class-diagram) of its classe-like definitions using:
23
+
From a given path corresponding to a folder containing Python code, `py2puml` processes each Python module and generates a [PlantUML script](https://plantuml.com/en/class-diagram)from the definitions of various data structures using:
24
24
25
25
***[inspection](https://docs.python.org/3/library/inspect.html)** and [type annotations](https://docs.python.org/3/library/typing.html) to detect:
26
26
* static class attributes and [dataclass](https://docs.python.org/3/library/dataclasses.html) fields
@@ -29,7 +29,7 @@ From a given path corresponding to a folder containing Python code, `py2puml` pr
29
29
* composition and inheritance relationships (between your domain classes only, for documentation sake).
30
30
The detection of composition relationships relies on type annotations only, assigned values or expressions are never evaluated to prevent unwanted side-effects
31
31
32
-
* parsing [abstract syntax trees](https://docs.python.org/3/library/ast.html#ast.NodeVisitor) to detect the instance attributes defined in `__init__` constructors
32
+
* parsing **[abstract syntax trees](https://docs.python.org/3/library/ast.html#ast.NodeVisitor)** to detect the instance attributes defined in `__init__` constructors
33
33
34
34
`py2puml` outputs diagrams in PlantUML syntax, which can be:
35
35
* versioned along your code with a unit-test ensuring its consistency (see the [test_py2puml.py's test_py2puml_model_on_py2uml_domain](tests/py2puml/test_py2puml.py) example)
poetry run pytest -v --cov=py2puml --cov-branch --cov-report term-missing --cov-fail-under 90
195
+
poetry run pytest -v --cov=py2puml --cov-branch --cov-report term-missing --cov-fail-under 92
196
196
```
197
197
198
198
# Changelog
199
199
200
+
*`0.7.2`: added the current working directory to the import path to make py2puml work in any directory or in native virtual environment (not handled by poetry)
200
201
*`0.7.1`: removed obsolete part of documentation: deeply compound types are now well handled (by version `0.7.0`)
201
202
*`0.7.0`: improved the generated PlantUML documentation (added the namespace structure of the code base, homogenized type between inspection and parsing), improved relationships management (handle forward references, deduplicate relationships)
0 commit comments