Skip to content

Commit

Permalink
Fix #22
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultmarin committed Mar 27, 2022
1 parent 583b9af commit d53292f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
6 changes: 3 additions & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
# built documents.
#
# The short X.Y version.
version = u'v' + u'0.8.2'
version = u'v' + u'0.8.3'
# The full version, including alpha/beta/rc tags.
release = u'v' + u'0.8.2'
release = u'v' + u'0.8.3'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -155,7 +155,7 @@
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#
# html_title = u'hpp2plantuml ' + u'v' + u'0.8.2'
# html_title = u'hpp2plantuml ' + u'v' + u'0.8.3'

# A shorter title for the navigation bar. Default is the same as html_title.
#
Expand Down
18 changes: 10 additions & 8 deletions doc/source/org-doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The current version of the code is:
::
:name: hpp2plantuml-version

0.8.2
0.8.3


The source code can be found on GitHub:
Expand Down Expand Up @@ -1697,8 +1697,10 @@ be used to avoid this sorting step.
ns_pre = '::'.join(ns_split[:ni])
if ns_pre not in ns_list_in:
ns_list.append(ns_pre)
# Ensure nested namespaces are processed first
ns_list = sorted(ns_list, key=lambda ns: len(ns.split('::')),
# Remove duplicates (#22)
ns_list = list(set(ns_list))
# Ensure nested namespaces are processed first (secondary sort by name)
ns_list = sorted(ns_list, key=lambda ns: (len(ns.split('::')), ns),
reverse=True)
# Create namespace objects (flat map)
ns_obj_map = {ns: Namespace(ns) for ns in ns_list}
Expand Down Expand Up @@ -2052,7 +2054,7 @@ to parse input arguments. The function passes the command line arguments to the
required=False, default=None, metavar='JINJA-FILE',
help='path to jinja2 template file')
parser.add_argument('--version', action='version',
version='%(prog)s ' + '0.8.2')
version='%(prog)s ' + '0.8.3')
args = parser.parse_args()
if len(args.input_files) > 0:
CreatePlantUMLFile(args.input_files, args.output_file,
Expand Down Expand Up @@ -3330,7 +3332,7 @@ obtained using the source block described `sec-org-el-version`_.
__title__ = "hpp2plantuml"
__description__ = "Convert C++ header files to PlantUML"
__version__ = '0.8.2'
__version__ = '0.8.3'
__uri__ = "https://github.com/thibaultmarin/hpp2plantuml"
__doc__ = __description__ + " <" + __uri__ + ">"
__author__ = "Thibault Marin"
Expand Down Expand Up @@ -3842,9 +3844,9 @@ content of the file is mostly following the defaults, with a few exceptions:
# built documents.
#
# The short X.Y version.
version = u'v' + u'0.8.2'
version = u'v' + u'0.8.3'
# The full version, including alpha/beta/rc tags.
release = u'v' + u'0.8.2'
release = u'v' + u'0.8.3'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -3918,7 +3920,7 @@ content of the file is mostly following the defaults, with a few exceptions:
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#
# html_title = u'hpp2plantuml ' + u'v' + u'0.8.2'
# html_title = u'hpp2plantuml ' + u'v' + u'0.8.3'
# A shorter title for the navigation bar. Default is the same as html_title.
#
Expand Down
8 changes: 5 additions & 3 deletions hpp2plantuml.org
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ this single org-file.

The current version of the code is:
#+NAME: hpp2plantuml-version
: 0.8.2
: 0.8.3

The source code can be found on GitHub:
https://github.com/thibaultmarin/hpp2plantuml.
Expand Down Expand Up @@ -1674,8 +1674,10 @@ class Diagram(object):
ns_pre = '::'.join(ns_split[:ni])
if ns_pre not in ns_list_in:
ns_list.append(ns_pre)
# Ensure nested namespaces are processed first
ns_list = sorted(ns_list, key=lambda ns: len(ns.split('::')),
# Remove duplicates (#22)
ns_list = list(set(ns_list))
# Ensure nested namespaces are processed first (secondary sort by name)
ns_list = sorted(ns_list, key=lambda ns: (len(ns.split('::')), ns),
reverse=True)
# Create namespace objects (flat map)
ns_obj_map = {ns: Namespace(ns) for ns in ns_list}
Expand Down
2 changes: 1 addition & 1 deletion src/hpp2plantuml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@

__title__ = "hpp2plantuml"
__description__ = "Convert C++ header files to PlantUML"
__version__ = '0.8.2'
__version__ = '0.8.3'
__uri__ = "https://github.com/thibaultmarin/hpp2plantuml"
__doc__ = __description__ + " <" + __uri__ + ">"
__author__ = "Thibault Marin"
Expand Down
8 changes: 5 additions & 3 deletions src/hpp2plantuml/hpp2plantuml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1274,8 +1274,10 @@ def render(self):
ns_pre = '::'.join(ns_split[:ni])
if ns_pre not in ns_list_in:
ns_list.append(ns_pre)
# Ensure nested namespaces are processed first
ns_list = sorted(ns_list, key=lambda ns: len(ns.split('::')),
# Remove duplicates (#22)
ns_list = list(set(ns_list))
# Ensure nested namespaces are processed first (secondary sort by name)
ns_list = sorted(ns_list, key=lambda ns: (len(ns.split('::')), ns),
reverse=True)
# Create namespace objects (flat map)
ns_obj_map = {ns: Namespace(ns) for ns in ns_list}
Expand Down Expand Up @@ -1491,7 +1493,7 @@ def main():
required=False, default=None, metavar='JINJA-FILE',
help='path to jinja2 template file')
parser.add_argument('--version', action='version',
version='%(prog)s ' + '0.8.2')
version='%(prog)s ' + '0.8.3')
args = parser.parse_args()
if len(args.input_files) > 0:
CreatePlantUMLFile(args.input_files, args.output_file,
Expand Down

0 comments on commit d53292f

Please sign in to comment.