forked from pydot/pydot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure project directory layout
This commit brings the directory layout in line with current recommendations by the Python Packaging Authority and others. Before After |-- setup.py |-- setup.py | |-- src/ | | `-- pydot/ | | |-- __init__.py |-- pydot.py | |-- core.py |-- dot_parser.py | `-- dot_parser.py `-- test/ `-- test/ `-- pydot_unittest.py `-- pydot_unittest.py There are many opinions on what would be the best directory layout for a Python project, particularly on whether or not to use an additional `src/` layer. For example: - https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure - pypa/packaging.python.org#320 - https://github.com/pypa/packaging.python.org/blob/7866cb69f1aa290a13c94da77cfb46a079cfcfa2/source/tutorials/packaging-projects.rst#a-simple-project - https://stackoverflow.com/questions/193161/what-is-the-best-project-structure-for-a-python-application Suffice to say, I can basically understand the arguments in favor of a `src/` layout and do not find the arguments against it strong enough not to use it. Moved the dunder global variables (`__version__` etc.) to `__init__.py` to ensure they remain available to the user doing `import pydot`. (They would not be included in `from pydot.core import *` because their names start with an underscore and I did not want to start keeping `__all__` just for this.) A test for `pydot.__version__` is added to the testsuite as well. .... TODO: Something about separating parsing from core or not? ... Discussed in pydot#171, pydot#230 and pydot#271. Special thanks to Kostis Anagnostopoulos (@ankostis) for his advice.
- Loading branch information
1 parent
4d45fff
commit ed751c9
Showing
7 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"""An interface to GraphViz.""" | ||
|
||
__author__ = "Ero Carrera" | ||
__version__ = "2.0.0.dev0" | ||
__license__ = "MIT" | ||
|
||
from pydot.core import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters