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 contour offsets #40

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Fix contour offsets #40

merged 1 commit into from
Mar 6, 2024

Conversation

cgohlke
Copy link
Member

@cgohlke cgohlke commented Mar 6, 2024

Description

Fix contour coordinates are offset by half a pixel in each direction.

Release note

Summarize the changes in the code block below to be included in the
release notes:

Fix contour offsets

Checklist

  • The pull request title, summary, and description are concise.
  • Related issues are linked in the description.
  • New dependencies are explained.
  • The source code and documentation can be distributed under the MIT license.
  • The source code adheres to code standards.
  • New classes, functions, and features are thoroughly tested.
  • New, user-facing classes, functions, and features are documented.
  • New features are covered in tutorials.
  • No files other than source code, documentation, and project settings are added to the repository.

@cgohlke cgohlke added the bug Something isn't working label Mar 6, 2024
@cgohlke cgohlke requested a review from bruno-pannunzio March 6, 2024 02:23
@cgohlke cgohlke self-assigned this Mar 6, 2024
Copy link
Contributor

@bruno-pannunzio bruno-pannunzio left a comment

Choose a reason for hiding this comment

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

@cgohlke this seems ok. Although it is not strictly from this PR, I think that testing all plots as it is now can be a little bit tedius when you have to run the pytest multiple times, since each time, all the plots are showed one by one and you have to manually close all windows one at a time, which can be a little bit time consuming when having to run it several times as I had to do it for the previous PR. Maybe we can think of an alternative to test the plots without having to manually see one by one an close them, but for now that we are testing a lot it can be a good idea to avoid this tests and maybe visually check the tutorials to see if the plots are correct?

@cgohlke
Copy link
Member Author

cgohlke commented Mar 6, 2024

I think that testing all plots as it is now can be a little bit tedius when you have to run the pytest multiple times, since each time, all the plots are showed one by one and you have to manually close all windows one at a time

Yes, we discussed this in the last meeting. When the plotting functionality stabilizes we will switch to comparing against ground truth images using the matplotlib testing API. I think it is still too early.

Interactive mode is off by default during testing. Does that switch not work on your setup? I manually enabled it when implementing the tests. Pytest and VSCode, for example, allow to select which tests to run. There is no need to always run all tests.

@bruno-pannunzio
Copy link
Contributor

You are right, I forgot you can select which tests to run instead of all, so it's a good idea to leave it as it is and then review it when we can implement the matplotlib testing API. I didn't modified from the default, so in my setup by default it enabled the interactive mode, I will look more into this in my mac.

@cgohlke
Copy link
Member Author

cgohlke commented Mar 6, 2024

I will look more into this in my mac.

Yes, please share a fix if you find one.

@cgohlke cgohlke merged commit ca8994c into phasorpy:main Mar 6, 2024
13 checks passed
@cgohlke cgohlke deleted the fix_contour branch March 6, 2024 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants