Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use symlinks instead of copies for test result_images.#10222

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dstansby merged 1 commit intomatplotlib:masterfromanntzer:link
Jun 18, 2019

Conversation

anntzer
Copy link
Contributor

PR Summary

This seems to shave a few minutes(!) from the CI.

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@tacaswell
Copy link
Member

power-cycled to get the gdb fix.

@tacaswelltacaswell added this to thev2.2 milestoneJan 11, 2018
@jklymak
Copy link
Member

OK, but are these tests really any faster on CI? 15 minutes 37 sec for the 3.6 test doesn't seem any faster than other recent tests...https://travis-ci.org/matplotlib/matplotlib/builds/325962079?utm_source=github_status&utm_medium=notification took 14 minutes 50 seconds (as a completely non-scientific comparison).

@anntzer
Copy link
ContributorAuthor

Seems quite variable. Will probably try to accumulate some statistics on my side first...

orig_expected_fname))
raise ImageComparisonFailure(reason)
try:
try: # os.symlink errors if the target already exists.
Copy link
Member

Choose a reason for hiding this comment

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

Better:

with contextlib.suppress(FileNotFoundError):    os.remove(expected_fname)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

sure

@timhoffm
Copy link
Member

What is the right way forward here? Should we try to verify the speed gain again? Should we drop this? Should we just accept on the basis that symlinking feels better and may even bring a performance gain (without test) and it's just slightly more complicated.

@WeatherGod
Copy link
Member

WeatherGod commentedJun 11, 2019 via email

Are there going to be issues on Windows filesystems?
On Tue, Jun 11, 2019 at 4:27 PM Tim Hoffmann ***@***.***> wrote: What is the right way forward here? Should we try to verify the speed gain again? Should we drop this? Should we just accept on the basis that symlinking feels better and may even bring a performance gain (without test) and it's just slightly more complicated. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#10222?email_source=notifications&email_token=AACHF6CI34LIQ3XERB2ZDB3P2ADBTA5CNFSM4ELHZLJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOMZ2A#issuecomment-501009640>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AACHF6DGTMK5LY555GUUDMTP2ADBTANCNFSM4ELHZLJA> .

@timhoffm
Copy link
Member

timhoffm commentedJun 11, 2019
edited
Loading

You need privileges to symlink on Windows, which a regular user on Windows does not have (https://docs.python.org/3/library/os.html?highlight=symlink#os.symlink). This is covered in the code with theexcept OSError and copied instead. - Not sure what that means for NTFS under linux.

The code is not compatible with WindowsXP and earlier, as that would throw aNotImplementedError. Probably we don't have to worry about testing for XP, but one could check that as well and resort to copying again.

@anntzer
Copy link
ContributorAuthor

It feels better to use symlinks, although I have admittedly no numbers to show real improvements. I don't really care if this goes in or if we abandon it.
The OSError check will handle Windows just fine.

Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

I've run the testsuite on master:

  • 610s as is
  • 565s with this patch

Using a PCI-E SSD, which should already be fast for file copying.

Copy link
Member

@dstansbydstansby left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me 👍

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

@timhoffmtimhoffmtimhoffm approved these changes

@dstansbydstansbydstansby approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.2.0
Development

Successfully merging this pull request may close these issues.

6 participants
@anntzer@tacaswell@jklymak@timhoffm@WeatherGod@dstansby

[8]ページ先頭

©2009-2025 Movatter.jp