Skip to content

Image comparison decorator: symlinks to baseline images #6824

Closed

Description

@Kojoley

Currently image comparison decorator copies baseline image to result_images folder. Is not it better not to copy, but make symlink? With that change it still will be safe to remove result_images folder with rm -rf.

Activity

  1. jenshnielsen commented on Jul 24, 2016

    @jenshnielsen
    Member

    Sounds reasonable to me. We just need to ensure that this still runs correctly on all platforms

  2. tacaswell commented on Jul 26, 2016

    @tacaswell
    Member

    symlinks do not play well with windows

  3. Kojoley commented on Jul 26, 2016

    @Kojoley
    MemberAuthor

    Matplotlib supports Windows XP? If not then Windows is not a problem.
    Actually I have already developed cross-platform symlink support for image_comparison decorator with fallback to simple copy on unsupported platform, but it uses ctypes and gives not a big boost to testing time (around ~10 seconds)

  4. jenshnielsen commented on Jul 26, 2016

    @jenshnielsen
    Member

    As far as I remember the main problem is with symlinks within git repositories. That should not apply here. I am not sure about windows xp. We have not deliberately broken support for it but it's also not really tested.

  5. Kojoley commented on Jul 26, 2016

    @Kojoley
    MemberAuthor

    I had some problems with git and links, but they were hard links to files or symlinks to folders (because you can easily wipe your original folder or files). That does no apply here at least because result_images does not belong to git repository.

  6. tacaswell commented on Jul 26, 2016

    @tacaswell
    Member

    As a non-windows user I am greatly confused why the issues with links apply to git, but not here?

    @Kojoley If you work on windows and this works for you then 👍 to links instead of copying.

  7. added this to the milestone on Jul 26, 2016
  8. Kojoley commented on Jul 26, 2016

    @Kojoley
    MemberAuthor

    Previously git-scm on windows was not aware of symlinks (from its point they were just regular files), so git checkout or git reset will give you no error and just replace/wipe content of symlinked file.

  9. Kojoley commented on Jul 26, 2016

    @Kojoley
    MemberAuthor

    I do not know is it problem or not, but I think by default artifact tars will contain symlinks to baseline images (I believe there is some switches for this)

  10. modified the milestones: , on Oct 3, 2017
  11. jbrockmendel commented on Dec 30, 2017

    @jbrockmendel

    Just discovered @image_comparison and its a nice feature, but I'd like to be able to specify where the created images will be placed. Creating a result_images images in my project's root directory is not welcome.

    LMK if this belongs in a separate issue.

  12. tacaswell commented on Dec 30, 2017

    @tacaswell
    Member

    @jbrockmendel You should have a look at pytest-mpl instead.

  13. modified the milestones: , on Dec 30, 2017
  14. modified the milestones: v3.0, v3.1 on Aug 11, 2018
  15. modified the milestones: v3.1.0, v3.2.0 on Mar 18, 2019
  16. anntzer commented on Jul 4, 2019

    @anntzer
    Contributor

    done in #10222.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions