Skip to content

Commit

Permalink
Fix release conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniFdezAlvarez committed Jun 27, 2024
2 parents eb525dd + 1f8a264 commit c317ecf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ def read(file_path):
setup(
name = 'shexer',
packages = find_packages(exclude=["*.local_code.*"]), # this must be the same as the name above
version = '2.5.2',
version = '2.5.3',
description = 'Automatic schema extraction for RDF graphs',
author = 'Daniel Fernandez-Alvarez',
author_email = '[email protected]',
url = 'https://github.com/DaniFdezAlvarez/shexer',
download_url = 'https://github.com/DaniFdezAlvarez/shexer/archive/2.5.2.tar.gz',
download_url = 'https://github.com/DaniFdezAlvarez/shexer/archive/2.5.3.tar.gz',
keywords = ['testing', 'shexer', 'shexerp3', "rdf", "shex", "shacl", "schema"],
long_description = read('README.md'),
long_description_content_type='text/markdown',
Expand Down
10 changes: 6 additions & 4 deletions shexer/io/uml/uml_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _is_a_shape_link(self, statement):
def _declare_and_open_shape(self, a_shape):
target_name = prefixize_shape_name_if_possible(a_shape_name=a_shape.name,
namespaces_prefix_dict=self._namespaces_dict)
if target_name.startswith(":") or target_name.startswith("<") :
if ":" in target_name or "-" in target_name or target_name.startswith("<") :
self._declare_shape_with_alias(target_name)
else:
self._declare_shape_without_alias(target_name)
Expand All @@ -119,9 +119,11 @@ def _declare_shape_without_alias(self, target_name):
self._write_line(f"object {target_name} {{")

def _declare_shape_with_alias(self, target_name):
if target_name.startswith(":"):
alias = target_name[1:]
else:
alias = target_name
alias = alias.replace(":", "_")
alias = alias.replace("-", "_")

if alias.startswith("<"):
alias = target_name[1:-1]
self._shape_alias[target_name] = alias
self._write_line(f'object "{target_name}" as {alias} {{')
Expand Down

0 comments on commit c317ecf

Please sign in to comment.