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

dump/restore methods exposing writeGraphModel/readGraphModel #7

Merged
merged 1 commit into from
Mar 17, 2017

Conversation

prusse-martin
Copy link
Member

No description provided.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Lint has failed:

qmxgraph/api.py:374:80: E501 line too long (83 > 79 characters)

Could you please fix that and amend?

@prusse-martin prusse-martin force-pushed the fb-ASIM-198-project-file-io branch from 341a1dd to 5f54f4b Compare February 23, 2017 15:34
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 88.667% when pulling 5f54f4b on fb-ASIM-198-project-file-io into 3f9265a on master.

@nicoddemus
Copy link
Member

Waiting for @fogo to give his blessing. 👍

@prusse-martin
Copy link
Member Author

Did the lint fix.
The coverage got down since the 2 functions added are being tested only using selenium to check the actual javascript implementation. Do you think it is worth to have a test covering the wrapper functions in api.py?

@nicoddemus
Copy link
Member

Let's see what @fogo has to say about it.

@fogo
Copy link
Contributor

fogo commented Feb 24, 2017

The new feature seems fine. It seems this is the expected way to store/restore a mxGraph. Just take on future changes to make sure they are always compatible with this (i.e. they are visually identical after restored).

About the coverage on API, this is already a problem actually. If you take a deeper look, you'll notice that there're other methods uncovered. I guess it is time to decide to either cover them (more work, safer) all or maybe just don't cover it at all (risky, API isn't always straightforward between Python/Qt/JS).

@prusse-martin
Copy link
Member Author

Sorry for delaying the comment.
@nicoddemus think it is better to have coverage on this and I kind agree with him.
He suggested at least have tests mocking the actual javascript functions so just "API" is tested (the actual javascript is already tested).

I can add that later. If you think mocking is good enough I plan to use testdouble.js or Sinon.JS.

@prusse-martin prusse-martin merged commit 354c9c7 into master Mar 17, 2017
@prusse-martin prusse-martin deleted the fb-ASIM-198-project-file-io branch March 17, 2017 12:59
@fogo
Copy link
Contributor

fogo commented Mar 18, 2017

Sorry for the late answer, but mocking feels like a good start. I look forward to the future PR ;)

@prusse-martin prusse-martin mentioned this pull request May 4, 2017
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.

4 participants