Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

19 graphics #55

Merged
merged 22 commits into from
Jan 25, 2021
Merged

19 graphics #55

merged 22 commits into from
Jan 25, 2021

Conversation

holzkohlengrill
Copy link
Collaborator

@holzkohlengrill holzkohlengrill commented May 4, 2020

ToDo's / checks

  • Include obj/sec's which are partially included in the given address range -> use a different shape which visualises this fact (see below for an example) -> see Generate .svg visualisations for sec/obj's #52
  • Hardened user input
  • show warning for --noResolvOverlap and --memVisResolved behaviour (as discussed)
    • sc().warning("Incompatible arguments --noResolvOverlap and --memVisResolved were found. SVG figure will depict the unresolved scenario.")`
  • Emma should print an info with the absolute path of the generated svg.
  • Documentation has been added / updated.
  • (Unit) tests have been added / updated.
  • Manual testing in real environment has been performed and documented.
  • Breaking changes have been documented and tagged in commit message.
  • Add licence for svgwrite in documentation
  • Update version number to Emma 3.2.3 -> 4.0.0
  • Add a scaling value for x and y scaling (details tbd)
  • Add thin lines for start and end; adapt length to drawn objects
  • Adapt drawing area to drawn objects

@holzkohlengrill holzkohlengrill added this to the 3.3 milestone May 4, 2020
@holzkohlengrill holzkohlengrill requested a review from a team May 4, 2020 12:12
@holzkohlengrill
Copy link
Collaborator Author

ModuleNotFoundError: No module named 'svgwrite'

-> Add dependency in setup.py + in here in travis config

Copy link
Collaborator Author

@holzkohlengrill holzkohlengrill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DariaPigasova
These are my first comments. After resolution I will do a second review mainly on the algorithm itself and remaining changes.

Emma/emma.py Outdated Show resolved Hide resolved
Emma/emma.py Show resolved Hide resolved
Emma/emma.py Outdated Show resolved Hide resolved
Emma/emma.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
@holzkohlengrill
Copy link
Collaborator Author

Arguments should be:

  • --memVis: unresolved memory view
  • --memVisResolved: view visualising how Emma resolved the overlaps

@holzkohlengrill
Copy link
Collaborator Author

ModuleNotFoundError: No module named 'svgwrite'

-> Add dependency in setup.py + in here in travis config

Don't forget to resolve this.

Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
@holzkohlengrill
Copy link
Collaborator Author

holzkohlengrill commented May 15, 2020

@DariaPigasova Do not mix double (") and (') single quotes.

  • In Emma we always use double quotes

Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma.py Outdated Show resolved Hide resolved
Emma/emma.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@holzkohlengrill holzkohlengrill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DariaPigasova Do not mix double (") and (') single quotes.

  • In Emma we always use double quotes

Not done

Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/configuration.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Show resolved Hide resolved
# Plot objects
drawElements(image, getElementsToPlot("Object_Summary"), startPoint, y2, svgwrite.rgb(198, 233, 175))
imageHeight = drawElements(image, getElementsToPlot("Object_Summary"), startPoint, y2, svgwrite.rgb(198, 233, 175), scaling) + 15
image.update({"height": str(imageHeight * float(scalingValue)), "width": imageWidth * float(scalingValue)})
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly it is better to get the max dimensions of all objects and only then create the drawing. Like that we would spare us the additional update.

Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Comment on lines 412 to 414
try:
float(value)
except ValueError:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the way to go to check if a correct value was entered.

  1. Other errors than ValueError can appear
    2.In this case a try-catch might be O.K. but it has to be handled correctly.

@DariaPigasova DariaPigasova self-requested a review July 17, 2020 09:34
Copy link
Collaborator Author

@holzkohlengrill holzkohlengrill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also: not all previous reviews were done.

Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma.py Outdated Show resolved Hide resolved
Emma/emma.py Outdated Show resolved Hide resolved
Emma/emma_libs/memoryManager.py Outdated Show resolved Hide resolved
Emma/emma_vis_libs/helper.py Outdated Show resolved Hide resolved
@@ -184,6 +195,157 @@ def createStandardReports():
# graph.node('C', 'C', _attributes={'shape': 'triangle'})
#
# print(graph.source)
def createSvgReport(startPoint, endPoint, scalingValue="1"):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add x/y scaling: https://svgwrite.readthedocs.io/en/latest/classes/mixins.html#svgwrite.mixins.Transform.scale

The command line arguement would look like: --scaling=1:2 (x:y).

@holzkohlengrill
Copy link
Collaborator Author

Also please merge the master into this file and resolve the conflicts.

@holzkohlengrill holzkohlengrill changed the title WIP: 19 graphics 19 graphics Dec 16, 2020
@holzkohlengrill holzkohlengrill merged commit 051be57 into master Jan 25, 2021
@holzkohlengrill holzkohlengrill deleted the 19-graphics branch January 25, 2021 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants