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

Improve pypi automation #495

Merged
merged 6 commits into from Sep 9, 2019

Conversation

@tommyli3318
Copy link
Member

commented Aug 18, 2019

What does this PR do?

Improve automated PyPI test suite

Why was it initiated? Any relevant Issues?

GSoC 2019

PR Checklist

  • Correct base branch selected? develop for new features and bug fixes too.
    If it's part of a hotfix, it will be moved to master during it.
  • All tests still pass. Check the developer manual about Running the Tests.
    There are Travis tests that cover the most important things however, and you
    are welcome to rely on those, but they might not cover enough.
  • Ideally new features or fixed regressions ought to be covered via new tests.
  • Ideally new or changed features have documentation updates.
nuitka/tools/testing/OutputComparison.py Outdated Show resolved Hide resolved
tests/PyPI-pytest/run_all.py Show resolved Hide resolved
@tommyli3318

This comment has been minimized.

Copy link
Member Author

commented Aug 18, 2019

@kayhayen

Sometimes (very rarely) pytest would output different amounts of equal signs for the summary. I'm guessing the first one was under 10 seconds and the second was over 10 (so one less "=" is printed to make space for the extra digit of time).

This is the output after normalizeTimeDiff

--- C:\Users\Tommy\AppData\Local\Programs\Python\Python37-32\python.exe (stdout)
+++ nuitka (stdout)

@@ -47,5 +47,5 @@

 dateutil\test\property\test_parser_prop.py ..                            [ 99%]
 docs\exercises\solutions\mlk_day_rrule_solution.py .                     [100%]

-================ 1977 passed, 76 skipped, 21 xfailed in x.xx seconds =================
+================ 1977 passed, 76 skipped, 21 xfailed in x.xx seconds ================

What would be a good way to normalize this? re.findall(b"=+") doesn't seem like the best idea, but I can't think of a better way.

Should we instead use matchgroups to find the integers of passed, skipped, failed, and xfailed?

@kayhayen

This comment has been minimized.

Copy link
Member

commented Aug 19, 2019

That's a really funny type of difference, I guess, it does center like this;

> " allo ".center(20, "=")
'======= allo ======='

So it could be on either side of the text, could it not be?

@tommyli3318

This comment has been minimized.

Copy link
Member Author

commented Aug 19, 2019

So it could be on either side of the text, could it not be?

Actually no, it always prefers right-centered if it cannot be perfectly centered

>>> " allo ".center(9, "=")
'== allo ='

@tommyli3318 tommyli3318 force-pushed the tommyli3318:improve-pypi branch from f7763da to 4237dc2 Aug 20, 2019

@tommyli3318 tommyli3318 reopened this Aug 20, 2019

@tommyli3318

This comment has been minimized.

Copy link
Member Author

commented Aug 20, 2019

Should I move the gitClone function to another file? Maybe Common.py?

"pytest", # compiled __import__ check fails; should we even test this?
"pandas", # ModuleNotFoundError: No module named 'Cython'
"pytz", # need to 'make build'
"rsa", # Now uses Poetry (no setup.py)

This comment has been minimized.

Copy link
@kayhayen

kayhayen Sep 6, 2019

Member

This poetry thing is something I encountered elsewhere too, can you look into how it could be plugged with Nuitka?

This comment has been minimized.

Copy link
@tommyli3318

tommyli3318 Sep 7, 2019

Author Member

they are using a tox.ini file instead of setup.py from what I see

This comment has been minimized.

Copy link
@kayhayen

kayhayen Sep 8, 2019

Member

I think tox.ini is just a way of making it test with multiple Python versions, but in the end, it should be still something like py.test, esp. with tox I think it's extremely common. What is in that tox.ini ?

@kayhayen

This comment has been minimized.

Copy link
Member

commented Sep 6, 2019

Can you rebase it to current develop once more, then it will check the new doc with restlint automatically, so we can find errors in the formatting automatically?

@tommyli3318 tommyli3318 force-pushed the tommyli3318:improve-pypi branch from 808f414 to c7b7426 Sep 7, 2019

@tommyli3318

This comment has been minimized.

Copy link
Member Author

commented Sep 7, 2019

Can you rebase it to current develop once more, then it will check the new doc with restlint automatically, so we can find errors in the formatting automatically?

Ok

@kayhayen kayhayen added the enhancement label Sep 9, 2019

@kayhayen kayhayen added this to the 0.6.6 milestone Sep 9, 2019

@kayhayen kayhayen added this to In progress in Planning via automation Sep 9, 2019

@kayhayen

This comment has been minimized.

Copy link
Member

commented Sep 9, 2019

Thanks for making it perfect. :-)

@kayhayen kayhayen merged commit dac8727 into Nuitka:develop Sep 9, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

Planning automation moved this from In progress to Done Sep 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants
You can’t perform that action at this time.