Skip to content

Commit

Permalink
fix condition to write MD file to project
Browse files Browse the repository at this point in the history
  • Loading branch information
muddymudskipper committed Jul 25, 2024
1 parent 5f8263e commit 79e9366
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions cmem_plugin_reason/plugin_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ def __init__( # noqa: PLR0913
self.reasoner = reasoner
self.output_graph_iri = output_graph_iri
self.stop_at_inconsistencies = stop_at_inconsistencies
self.md_filename = md_filename if md_filename else "mdfile.md"
if md_filename:
self.md_filename = md_filename
self.write_md = True
else:
self.md_filename = "mdfile.md"
self.write_md = False
self.validate_profile = validate_profile
self.max_ram_percentage = max_ram_percentage

Expand Down Expand Up @@ -218,8 +223,7 @@ def _execute(self, context: ExecutionContext) -> Entities:
self.add_profiles(validate_profiles(self, graphs)) if self.validate_profile else []
)

# if self.write_md:
if self.md_filename:
if self.write_md:
setup_cmempy_user_access(context.user)
self.make_resource(context)

Expand Down
2 changes: 1 addition & 1 deletion cmem_plugin_reason/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def get_provenance(plugin: WorkflowPlugin, context: ExecutionContext) -> dict |
def robot(cmd: str, max_ram_percentage: int) -> CompletedProcess:
"""Run robot.jar"""
jar = Path(__path__[0]) / "bin" / "robot.jar"
cmd = f"java -XX:MaxRAMPercentage={max_ram_percentage} -jar {jar} " + cmd
cmd = f"java -XX:MaxRAMPercentage={max_ram_percentage} -jar {jar} {cmd}"
return run(shlex.split(cmd), check=False, capture_output=True) # noqa: S603


Expand Down

0 comments on commit 79e9366

Please sign in to comment.