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

fix invalid panel dx/dy offsets #294

Merged
merged 3 commits into from
Jul 4, 2018

Conversation

carandraug
Copy link
Contributor

After parsing the JSON string, check if it's valid and fix it where we can. Fixes issue #292

@will-moore
Copy link
Member

I've not tested yet but looks good.
We will be releasing figure 4.0.0 very soon so this won't go into that release I'm afraid.
I just noticed travis failed:

./omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py:651:9: E266 too many leading '#' for block comment
./omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py:652:9: E266 too many leading '#' for block comment

@carandraug
Copy link
Contributor Author

I've not tested yet but looks good.
We will be releasing figure 4.0.0 very soon so this won't go into that release I'm afraid.

No problem. We already are using a modified version of the script that skips the annotation after the build.

I just noticed travis failed:

I have changed the comment style to follow pep 8

Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

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

This PR tries to address the bug described in #292 which had already been raised in #189 and tentatively fixed in #257 .

The proposed changes should handle the scenario where the dx key or the dy key exists but has a null value and set its value to DEFAULT_OFFSET in the context of the export script.

The change reverts the usage of dict.key(key, default) introduced in 77fd869. This logic would still be necessary if the keys could be missing under certain conditions as the script would raise a KeyError. Since the original PR (#257) was attempting to fix the same bug as here, it is possible the code path defining a default dictionary value in the getter was never used in practice. Leaving @will-moore to comment on this point.

Overall, 👍 for getting this into a 4.0.1.

@will-moore will-moore merged commit 7ec1718 into ome:master Jul 4, 2018
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.

3 participants