-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
Cython cache diff compare #13526
Cython cache diff compare #13526
Conversation
# Conflicts: # ci/prep_cython_cache.sh
At the moment this code does the follow:
then at the start of a run:
|
Current coverage is 84.42%@@ master #13526 diff @@
==========================================
Files 138 138
Lines 51111 51349 +238
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 43107 43350 +243
+ Misses 8004 7999 -5
Partials 0 0
|
Tests to perform:
|
clear_cache=0 | ||
|
||
pyx_files=`echo "$pyx_file_list" | wc -l` | ||
pyx_cache_files=`echo "$pyx_cache_file_list" | wc -l` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will not work. you would need to compare .pyx file sizes I think to make this reliable. Just adding / removing a file is not good enough at all. Most often we have a change in actual contents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actually checking is done below. diff -u $i $PYX_CACHE_DIR${i}
for each pyx file . This code is only here to check no pyx files have been deleted in full.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh i c.
git diff HEAD~2 --numstat | grep -E "pyx|pxd" | ||
retval=$(git diff HEAD~2 --numstat | grep -E "pyx|pxd"| wc -l) | ||
echo "Not a PR" | ||
# Uncomment next 2 lines to turn off cython caching not in a PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you meaning to leave in these comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about it; as a quick way of turning off caching of cython files in the future if something goes wrong. But happy to take them out also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok that's fine then.
@nparley ok let's try this. ping when green / ready. |
There is an interesting gocha with the way travis checks out commits. On a branch travis actually checks out the hash. However, for a PR travis just checks out the latest merge. Therefore if you push lots of changes quickly before travis has started (like I just did early), then builds might not actually reflect the push. (They might all be testing the last push). |
Travis is having problems with Mac OSx runs at the moment. I will not do any more until they fix it. |
Delete pyx file Add pyx file Change pyx file Undo pyx change Un test commit Test commit after ci change Change a pyx file Bug fix
@jreback OK this is ready to go. |
Looks good to me! |
thanks @nparley let's give this a watch over next few days to make sure its behaving. |
As talked about in #13425 with @gfyoung and @jreback this PR does cython caching by comparing the pyx files and not relying on the git history.