Articles on tommyli3318's Bloghttps://blogs.python-gsoc.orgUpdates on different articles published on tommyli3318's BlogenMon, 26 Aug 2019 08:24:13 +0000Google Summer of Code with Nuitka 7th Weekly Check-inhttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-7th-weekly-check-in/<p><b>1. What did you do this week?</b></p> <p><b>As GSoC is wrapping up, I wrote a summary of my work which can be found<a href="https://github.com/tommyli3318/Nuitka-website/blob/GSoC-final-posting/posts/tommy-gsoc-summary.rst"> here</a>. </b></p> <p><b>In addition, I have finalized my pull requests<a href="https://github.com/Nuitka/Nuitka/pull/495"> #495</a> and<a href="https://github.com/Nuitka/Nuitka/pull/484"> #484</a> which are now ready for merge.</b></p> <p> </p> <p><b>2. What is coming up next?</b></p> <p><b>After GSoC ends, I plan on continuing my contributions to Nuitka and PSF.</b></p> <p> </p> <p><b>3. Did you get stuck anywhere?</b></p> <p><b>I do not remember being stuck anywhere this week :)</b></p> <p><br>  </p>taofengl@uci.edu (tommyli3318)Mon, 26 Aug 2019 08:24:13 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-7th-weekly-check-in/Google Summer of Code with Nuitka 6th Blog Posthttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-6th-blog-post/<p><b>This week, I focused mostly on bug fixes and improving my PyPI-pytest automation script while also working on adding more standalone tests.</b></p> <ol> <li> <p><b>I created a pull request <a href="https://github.com/Nuitka/Nuitka/pull/483">https://github.com/Nuitka/Nuitka/pull/483</a> to add support for py_modules compilation support in Nuitka. The pull request turned out very well, adding support for not only py_modules compilation but also the combination of package and module. In addition, a new distutil example was also added to showcase the compilation of package and module</b></p> </li> <li> <p><b>In the process of the above pull request, I discovered a regression in Nuitka and <a href="https://github.com/Nuitka/Nuitka/pull/487">https://github.com/Nuitka/Nuitka/pull/487</a> was created as a hotfix.</b></p> </li> <li> <p><b>In addition, Issue <a href="https://github.com/Nuitka/Nuitka/issues/479">https://github.com/Nuitka/Nuitka/issues/479</a> is fixed by #483 and is now closed</b></p> </li> <li> <p><b>I continued to improve my PyPI-pytest automated testing script, including functional improvements, minor speed improvements, readability, and documentation improvements. My work could be found at <a href="https://github.com/Nuitka/Nuitka/pull/495">https://github.com/Nuitka/Nuitka/pull/495</a>.</b></p> </li> <li> <p><b>More standalone tests were also added to my pull request at <a href="https://github.com/Nuitka/Nuitka/pull/484">https://github.com/Nuitka/Nuitka/pull/484</a>. This is a side goal and is less important</b></p> </li> </ol> <p> </p> <p><b>I am very proud of the work I have done this week. The goal for this final week is to finish up pull request #495, and I plan on finishing #484 after GSoC ends. I also discussed with my mentor and plan on working for Nuitka long term, even after GSoC :). </b></p> <p><br>  </p>taofengl@uci.edu (tommyli3318)Mon, 19 Aug 2019 21:53:49 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-6th-blog-post/Google Summer of Code with Nuitka 6th Weekly Check-inhttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-6th-weekly-check-in/<p>1. What did you do this week?</p> <p>This week, I finished my script which automates the testing of nuitka-wheel pytest. Details can be found on my pull request: https://github.com/Nuitka/Nuitka/pull/440</p> <p>The script automates the manual testing of comparing pytest results of a nuitka compiled wheel using `python setup.py bdist_nuitka` to the pytest results of an uncompiled wheel built using `python setup.py bdist_wheel` for the most popular PyPI packages. Testing is done to ensure that nuitka is building the wheel correctly. If the pytests pass/fail in the same way, that means Nuitka built the wheel properly. Else if the tests differ, then something is wrong. Virtualenv is used to create a clean environment with no outside pollution.</p> <p>Many improvements have been made this week, including the addition of more PyPI packages. The pull request was merged after some final touches.<br> <br> In addition, standalone tests are now being created for the PyPI packages. Details can be found in my pull request: <a href="https://github.com/Nuitka/Nuitka/pull/484">https://github.com/Nuitka/Nuitka/pull/484</a></p> <p><br> 2. What is coming up next?<br> Add more packages to standalone tests. Add support for py_modules only compilation with Nuitka. Work on documentation (README.rst) for the automated testing script. </p> <p><br> 3. Did you get stuck anywhere?<br> I ran into some issues with the Jinja2 package. I’ve skipped over it for now for the sake of time but will hopefully get back to it in the future.</p>taofengl@uci.edu (tommyli3318)Mon, 12 Aug 2019 22:01:32 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-6th-weekly-check-in/Google Summer of Code with Nuitka 5th Blog Posthttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-5th-blog-post/<p>&lt;meta charset="utf-8"&gt;</p> <p dir="ltr"><b id="docs-internal-guid-64bee0b3-7fff-e78a-b66b-62005d549dd7">This week, I continued to work on my script which automates the testing of nuitka-wheel pytest. Details can be found on my pull request: https://github.com/Nuitka/Nuitka/pull/440</b></p> <p> </p> <p dir="ltr"><b id="docs-internal-guid-64bee0b3-7fff-e78a-b66b-62005d549dd7">The script automates the manual testing of comparing pytest results of a nuitka compiled wheel using `python setup.py bdist_nuitka` to the pytest results of an uncompiled wheel built using `python setup.py bdist_wheel` for the most popular PyPI packages. Testing is done to ensure that nuitka is building the wheel correctly. If the pytests pass/fail in the same way, that means Nuitka built the wheel properly. Else if the tests differ, then something is wrong. Virtualenv is used to create a clean environment with no outside pollution.</b></p> <p> </p> <p dir="ltr"><b id="docs-internal-guid-64bee0b3-7fff-e78a-b66b-62005d549dd7">A lot was done this week, including:</b></p> <ul dir="ltr"> <li><b id="docs-internal-guid-64bee0b3-7fff-e78a-b66b-62005d549dd7">Fixing automation for various pypi packages</b></li> <li><b id="docs-internal-guid-64bee0b3-7fff-e78a-b66b-62005d549dd7">Figuring out failures for many packages</b></li> <li><b id="docs-internal-guid-64bee0b3-7fff-e78a-b66b-62005d549dd7">Created a new issue for package pyyaml - <a href="https://github.com/Nuitka/Nuitka/issues/476">https://github.com/Nuitka/Nuitka/issues/476</a></b></li> <li><b id="docs-internal-guid-64bee0b3-7fff-e78a-b66b-62005d549dd7">Created a new issue for packages decorator, ipaddress, and pyparsing - <a href="https://github.com/Nuitka/Nuitka/issues/479">https://github.com/Nuitka/Nuitka/issues/479</a></b></li> <li><b id="docs-internal-guid-64bee0b3-7fff-e78a-b66b-62005d549dd7">Created a new issue for packages pycparser and numpy - <a href="https://github.com/Nuitka/Nuitka/issues/477">https://github.com/Nuitka/Nuitka/issues/477</a></b></li> <li><b id="docs-internal-guid-64bee0b3-7fff-e78a-b66b-62005d549dd7">Created a py_modules only example of `distutils` (can be seen in my main PR)</b></li> <li><b id="docs-internal-guid-64bee0b3-7fff-e78a-b66b-62005d549dd7">Summary improvement and run-time improvements</b></li> <li><b id="docs-internal-guid-64bee0b3-7fff-e78a-b66b-62005d549dd7">Fixed pylint errors</b></li> </ul> <p> </p> <p dir="ltr"><b id="docs-internal-guid-64bee0b3-7fff-e78a-b66b-62005d549dd7">Very proud of the work I have done this week. The pull request is pretty much ready to be merged at this point. The plan for next week is to find bugs and probably work on documentation for the test suite.</b></p> <p> </p>taofengl@uci.edu (tommyli3318)Tue, 06 Aug 2019 04:06:17 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-5th-blog-post/Google Summer of Code with Nuitka 5th Weekly Check-inhttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-5th-weekly-check-in/<p>1. What did you do this week?<br> This week, I continued to work on my script which automates the testing of nuitka-wheel pytest. Details can be found on my pull request: https://github.com/Nuitka/Nuitka/pull/440</p> <p>The script automates the manual testing of comparing pytest results of a nuitka compiled wheel using `python setup.py bdist_nuitka` to the pytest results of an uncompiled wheel built using `python setup.py bdist_wheel` for the most popular PyPI packages. Testing is done to ensure that nuitka is building the wheel correctly. If the pytests pass/fail in the same way, that means Nuitka built the wheel properly. Else if the tests differ, then something is wrong. Virtualenv is used to create a clean environment with no outside pollution.</p> <p>Testing has been improved and extended to many more PyPI packages.</p> <p><br> 2. What is coming up next?<br> Perfect the script in preparation for merging and work on documentations.</p> <p><br> 3. Did you get stuck anywhere?<br> Some PyPI packages are special and require special handling during automation. I skipped these for the sake of speed, but I will need to get back to them in the future.</p>taofengl@uci.edu (tommyli3318)Tue, 30 Jul 2019 20:47:43 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-5th-weekly-check-in/Google Summer of Code with Nuitka 4th Blog Posthttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-4th-blog-post/<p>&lt;meta charset="utf-8"&gt;</p> <p>&lt;meta charset="utf-8"&gt;</p> <p dir="ltr"><b id="docs-internal-guid-06652882-7fff-4d76-134c-f372a4da0326">This week, I continued to work on my script which automates the testing of nuitka-wheel pytest. Details can be found on my pull request: <a href="https://github.com/Nuitka/Nuitka/pull/440">https://github.com/Nuitka/Nuitka/pull/440</a></b></p> <p> </p> <p dir="ltr"><b id="docs-internal-guid-06652882-7fff-4d76-134c-f372a4da0326">The script automates the manual testing of comparing pytest results of a nuitka compiled wheel using `python setup.py bdist_nuitka` to the pytest results of an uncompiled wheel built using `python setup.py bdist_wheel` for the most popular PyPI packages. Testing is done to ensure that nuitka is building the wheel correctly. If the pytests pass/fail in the same way, that means Nuitka built the wheel properly. Else if the tests differ, then something is wrong. Virtualenv is used to create a clean environment with no outside pollution.</b></p> <p> </p> <p dir="ltr"><b id="docs-internal-guid-06652882-7fff-4d76-134c-f372a4da0326">There were a lot of changes made this week.</b></p> <ul> <li dir="ltr"> <p dir="ltr"><b id="docs-internal-guid-06652882-7fff-4d76-134c-f372a4da0326">Added an `__import__` check to make sure pytest used the correct (uncompiled or compiled) package</b></p> </li> <li dir="ltr"> <p dir="ltr"><b id="docs-internal-guid-06652882-7fff-4d76-134c-f372a4da0326">Added a mechanism to ignore certain tests which are unimportant (fixed the comparison issue for urllib3)</b></p> </li> <li dir="ltr"> <p dir="ltr"><b id="docs-internal-guid-06652882-7fff-4d76-134c-f372a4da0326">Added coloring to output for better visuals</b></p> </li> <li dir="ltr"> <p dir="ltr"><b id="docs-internal-guid-06652882-7fff-4d76-134c-f372a4da0326">Added a summary of all packages at the very end of testing</b></p> </li> <li dir="ltr"> <p dir="ltr"><b id="docs-internal-guid-06652882-7fff-4d76-134c-f372a4da0326">Extended testing to many more packages</b></p> </li> <li dir="ltr"> <p dir="ltr"><b id="docs-internal-guid-06652882-7fff-4d76-134c-f372a4da0326">Added local caching of `git clone`</b></p> </li> <li dir="ltr"> <p dir="ltr"><b id="docs-internal-guid-06652882-7fff-4d76-134c-f372a4da0326">Many run time improvements</b></p> </li> </ul> <p> </p> <p dir="ltr"><b id="docs-internal-guid-06652882-7fff-4d76-134c-f372a4da0326">Very proud of the work I have done this week. The plan for next week is to extend the automation to more PyPI packages.</b></p> <p> </p>taofengl@uci.edu (tommyli3318)Mon, 22 Jul 2019 21:27:28 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-4th-blog-post/Google Summer of Code with Nuitka 4th Weekly Check-inhttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-4th-weekly-check-in/<p>1. What did you do this week?<br> This week, I worked on my script which automates the testing of nuitka-wheel pytest. Details can be found on my pull request: https://github.com/Nuitka/Nuitka/pull/440<br> Automated testing compares the pytest results of a nuitka wheel built using python setup.py bdist_nuitka to the uncompiled bdist_wheel pytest of each PyPI package. Testing is done to ensure that nuitka is building the wheel correctly. If the pytests pass/fail in the same way, that means Nuitka built the wheel properly. Else if the tests differ, then something is wrong. Virtualenv is used to create a clean environment with no outside pollution.<br> I used subprocess to capture the output from terminal for comparison. I also implemented mechanics to ignore the time differences found in pytests. Furthermore, the testing has been extended to three more packages.</p> <p>2. What is coming up next?<br> Perfect the automation and extend the testing to even more PyPI packages. There are also bugs regarding PermissionError on the deletion of the .git folder that need to be fixed. Furthermore, there are inconsistencies between different packages which require special handling.</p> <p>3. Did you get stuck anywhere?<br> Yes, output comparison took account of the time differences from pytests when that should have been ignored. I came up with a solution using regular expressions to find and standardize the time differences.</p> <p><br>  </p>taofengl@uci.edu (tommyli3318)Tue, 16 Jul 2019 05:01:29 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-4th-weekly-check-in/Google Summer of Code with Nuitka 3rd Blog Posthttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-3rd-blog-post/<p>This week, I created a script to automate the testing of nuitka-wheel pytest. Details can be found on my pull request: https://github.com/Nuitka/Nuitka/pull/440<br> Automated testing compares the pytest results of a nuitka wheel built using python setup.py bdist_nuitka to the regular python wheel pytest of each PyPI package. Testing is done to ensure that nuitka is building the wheel correctly. If the pytests pass/fail in the same way, that means Nuitka built the wheel properly. Else if the tests differ, then something is wrong. Virtualenv is used to create a clean environment with no outside pollution.</p> <p>In addition, a post documenting manual test results of dateutil was made to nuitka.net with a pull request: https://github.com/Nuitka/Nuitka-website/pull/11</p> <p>I ran into many bugs this week but I was proud of myself for being able to overcome all of them with the help of mentors. In particular, getting stdout and stderr from the virtualenv was not easy. There are also some PermissionErrors that I will still need to look more into. Nevertheless, automation now fully works for the urllib3 and dateutil packages and I am very happy with this week’s progress.</p> <p>The plan for next week is to extend the automation to more PyPI packages.</p>taofengl@uci.edu (tommyli3318)Mon, 08 Jul 2019 23:07:23 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-3rd-blog-post/Google Summer of Code with Nuitka 3rd Weekly Check-inhttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-3rd-weekly-check-in/<p>1. What did you do this week?<br> Created a script to automate the testing of nuitka-wheel pytest. Details can be found on my pull request: https://github.com/Nuitka/Nuitka/pull/440<br> Automated testing compares the pytest results of a nuitka wheel built using python setup.py bdist_nuitka to the regular pytest of each PyPI package. Testing is done to ensure that nuitka is building the wheel correctly. If the pytests pass/fail in the same way, that means Nuitka built the wheel properly. Else if the tests differ, then something is wrong. Virtualenv is used to create a clean environment with no outside pollution.</p> <p>2. What is coming up next?<br> Keep working to fully automate nuitka-wheel testing and fix current errors for urllib3. Then, extend the testing to other PyPI packages.</p> <p>3. Did you get stuck anywhere?<br> Yes, testing creates two virtualenv directories which needs to be removed after testing. However, I ran into PermissionError on Windows because you cannot delete a binary that has been executed. I will need to look more into that to fix it. Furthermore, I ran into problems trying to get the virualenv to run correctly, but that has been fixed.</p> <p><br>  </p>taofengl@uci.edu (tommyli3318)Tue, 02 Jul 2019 00:16:02 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-3rd-weekly-check-in/Google Summer of Code with Nuitka 2nd Blog Posthttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-2nd-blog-post/<p>This week, I created nuitka standalone tests for python-dateutil and pyyaml packages. Details can be found here: https://github.com/Nuitka/Nuitka/pull/418</p> <p><meta charset="utf-8"></p> <p>In addition, I performed manual virtualenv pytest testing for the urllib3 package wheel built using nuitka. A pull request was made to document my work on the official nuitka.net website:  https://github.com/Nuitka/Nuitka-website/pull/10. The pull request was then merged, the full posting can be found here: https://nuitka.net/posts/urllib3-wheel-with-nuitka.html#</p> <p>In summary, the tests passed with urllib3 and the results of uncompiled pytest was very similar to the nuitka-compiled pytest. However, there were a few minor differences. My aim is to make this process automatic to avoid having to manually perform testing for every PyPI package.</p> <p>The plan for next week is to start automating the wheel nuitka tests with the top PyPI packages.<br>  </p>taofengl@uci.edu (tommyli3318)Mon, 01 Jul 2019 23:22:47 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-2nd-blog-post/Google Summer of Code with Nuitka 2nd Weekly Check-inhttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-2nd-weekly-check-in/<p><meta charset="utf-8"></p> <p>1. What did you do this week?<br> Created nuitka standalone tests for python-dateutil and pyyaml packages. Details can be found here: https://github.com/Nuitka/Nuitka/pull/418</p> <p>Performed manual virtualenv pytest testing for the urllib3 package wheel built using nuitka. Details can be found here: https://github.com/Nuitka/Nuitka-website/pull/10</p> <p> </p> <p>2. What is coming up next?<br> Finish up urllib3 wheel test report, then move on to manual virtualenv wheel tests for python-dateutil and pyyaml.</p> <p> </p> <p>3. Did you get stuck anywhere?<br> Yes, the nuitka-built urllib3 wheel originally had import problems that was crashing pytest execution. The C code of nuitka was changed to fix the bug.</p>taofengl@uci.edu (tommyli3318)Mon, 17 Jun 2019 23:02:18 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-2nd-weekly-check-in/Google Summer of Code with Nuitka 1st Blog Posthttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-1st-blog-post/<p><meta charset="utf-8">This week, I created nuitka standalone tests for boto3 and made changes to urllib3. Details can be seen in my PR: https://github.com/Nuitka/Nuitka/pull/339</p> <p>I also created standalone tests for the python-dateutil and pyyaml packages. My pull request for that can be seen here: https://github.com/Nuitka/Nuitka/pull/418</p> <p><br> In addition, I tested urllib3 bdist_nuitka compatibility with Nuitka by building the urllib3 dist wheel via Nuitka inside a virtual environment and then running urllib3’s pytests with the compiled version. It ended up raising an error which I reported here: https://github.com/Nuitka/Nuitka/issues/413</p> <p>The plan for next week is to look more into this issue and also work on testing the other packages, python-dateutil and pyyaml are next on the list.</p>taofengl@uci.edu (tommyli3318)Mon, 10 Jun 2019 01:15:18 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-1st-blog-post/Google Summer of Code with Nuitka 1st Weekly Check-inhttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-1st-weekly-check-in/<p>1. What did you do this week?<br> Created nuitka standalone tests for boto3 and made changes to urllib3. Details can be seen in my PR: <a href="https://github.com/Nuitka/Nuitka/pull/339">https://github.com/Nuitka/Nuitka/pull/339</a></p> <p>2. What is coming up next?<br> Compatibility test for Nuitka distutils with urllib3, then move on to the next package, which will be python-dateutil.</p> <p>3. Did you get stuck anywhere?<br> Yes, the boto3 standalone test was not passing with nuitka compilation due to unknown errors. My guess was that it has to do with the AWS mocking package moto. If this is too complicated to figure out, we will probably skip this test.</p>taofengl@uci.edu (tommyli3318)Tue, 04 Jun 2019 23:44:40 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka-1st-weekly-check-in/Google Summer of Code with Nuitkahttps://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka/Hi all! :) My name is Taofeng Li and I go by the nickname of Tommy, github handle tommyli3318. I'm a Computer Science major at the University of California, Irvine in the United States. I am very excited to announce that I'll be contributing to Nuitka this summer under the Google Summer of Code program! My project is "Nuitka support for PyPI top 50", it ensures Nuitka’s compatibility with the 50 most popular PyPI packages by setting up automated testing for each package. These automated tests will serve to be very important tools for the development of Nuitka, as they will be used to assure Nuitka’s compatibility with the most used Python packages every time Nuitka receives a new update. My mentors will be Vaibhav Tulsyan, Kamran Ghanaat, and Kay Hayen. My project abstract can be seen at https://summerofcode.withgoogle.com/projects/#4874692681269248 and the full details of my project can be found at https://docs.google.com/document/d/1tdbXyMy5xjVEeWociI_t2f6tlmge6czT0xmfCLyDXYg/edit?usp=sharing This week, I am mainly working on the first standalone tests for urllib3 while trying to get the test for boto3 to work. I have been struggling for a while trying to get boto3 tests, getting a weird build error when compiled with nuitka. I plan on using custom plugins to see if that will fix the errors. Furthermore, if the originally proposed 50 tests of my project seems to be too much to do, my mentor says I might have to lower that number. I am greatly looking forward to the many things that I'll learn this summer!taofengl@uci.edu (tommyli3318)Tue, 28 May 2019 22:38:40 +0000https://blogs.python-gsoc.org/en/tommyli3318s-blog/google-summer-of-code-with-nuitka/