Skip to content

CLN: Clean up of CI scripts #28482

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

Merged
merged 10 commits into from
Sep 19, 2019
Merged

CLN: Clean up of CI scripts #28482

merged 10 commits into from
Sep 19, 2019

Conversation

datapythonista
Copy link
Member

Making the CI scripts simpler, and fixing typos (this was part of #26949, which couldn't be merged because --dist=loadfile was making the tests much slower).

@datapythonista datapythonista added CI Continuous Integration Clean labels Sep 17, 2019
@datapythonista
Copy link
Member Author

@jreback I think we discussed this in the past, do you know why import pandas; pandas.get_option("display.encoding") is not getting the system locale?

I see that #23923 was closed, but I'm unsure on whether we're actually testing the locales or not.

ci/run_tests.sh Outdated
echo "pandas could not detect the locale. System locale: $LOCALE_OVERRIDE, pandas detected: $PANDAS_LOCALE"
# TODO Not really aborting the tests until https://github.com/pandas-dev/pandas/issues/23923 is fixed
# exit 1
# Testing if this is still failing
exit 1
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the part of the code that is making the CI fail, the rest is just styling.

print("SKIPPED TESTS:")
i = 1
for file_type in ("-single", "-multi", ""):
for test_data in main("test-data{}.xml".format(file_type)):
Copy link
Member

Choose a reason for hiding this comment

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

Minor stylistic comment but does using a glob with path lib and iterating over results simplify this? Took me a bit to grok what we were doing here and I think a glob would be more stable if we added xml docs or changed name in future

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, didn't think about that. But in the next PR after this one I'll make the test just run once and remove the single/multi, so this loop will be removed. So not really worth to change it.

if os.path.isfile(fn):
print(parse_results(fn))
return 0
yield None
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain why this yields None? Does this not print skips that aren't associated to a class?

Haven't looked deeply but compared the number of skipped tests in this build to another from today for Linux Py35_Compat and numbers were way lower, so just curious if this is a reason for that

Copy link
Member Author

Choose a reason for hiding this comment

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

This yield None shouldn't prevent the next yield from happening, so it's not causing to miss tests.

In the output of the skipped tests we print some division (i.e. --------------) between classes, so it's easier to see the different groups of tests that have been skipped.

With this yield None this becomes as simple as the if in the caller, and reduced significantly the code here, and makes things much compact and clear, which is the goal of this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

There was indeed a typo that was causing the skipped tests of the multiple file to not be printed, good catch. Should be fixed now.

Copy link
Member

Choose a reason for hiding this comment

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

Cool. Looks like this is printing out more skips now though?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so. If you're checking the number of the last test, before this PR that is not the number of tests. The "single" and "multiple" tests were printed independently, so they start both from 1 and are not added up.

In this PR I'm fixing that, and the numbers don't reset. So, for example, in the Linux py35_compat, not it shows from 1 to 2,902. And before it was 1 to 568, and then 1 to 2334. The cases that I've checked, the number of the tests are the same, just the numbers in the second batch don't match.

Does this explain the difference you saw?

Copy link
Member

Choose a reason for hiding this comment

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

Yea makes sense - thanks for clarifying

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm - something we need to back port?

@datapythonista
Copy link
Member Author

This should only affect the CI (and other than the small changes to the visualization of the skipped tests, there is no impact more than in the code clarity. So I don't think anything needs to be backported.

@datapythonista datapythonista merged commit 0d69d91 into pandas-dev:master Sep 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Clean
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants