Description
PyCon APAC 2022|一般演講 Talks|國泰金控 Cathay Financial Holdings / 美光科技 Micron 冠名贊助
✏️ 共筆 Note:https://hackmd.io/@pycontw/rkcoIaXJi 🖐🏻 Slido:https://app.sli.do/event/9mocDRmn6yeMAqNbQTxXMo 🪧 投影片 Slides:https://docs.google.com/presentation/d/1Iji1klGczzQ4DxN6-E-zfEN5oPMMs2LZtD482-plGAM/edit?usp=sharing 💬 語言 Language:英文 English 🎯 層級 Level:中階 Intermediate 🔎 分類 Category:測試 Testing
💡 摘要 Abstract 💡 Unit testing and code coverage are two essential aspects of an open-source codebase. These unit tests often run in spawned sub-processes or threads as sub-processes or multi-threading allow them to run parallelly. However, running unit tests in a sub-process creates a problem; as the documentation of coverage.py says — “Measuring coverage in those sub-processes can be tricky because you have to modify the code spawning the process to invoke coverage.py.”. As we will see in this tutorial, as soon as we run unit tests inside a sub-process, the coverage module ignores them completely, and the coverage value goes down. Through this talk, we will build up a solution (using coverage.py itself) to tackle this problem! Prerequisites - - familiarity with unit testing and code coverage in Python - familiarity with CI/CD using GitHub Actions - knowledge of multi-threading, multi-processing, CodeCov, and basic data structures like queue would be helpful but is not mandatory.
🚀 講者介紹 About Speaker - Saransh Chopra 🚀 Saransh is an engineering junior at the University of Delhi, pursuing a major in Information Technology and Mathematics. In daylight, he work towards his academic skills and professional commitments, and by night, he develops and maintains open-source research software, which he believes are the key to collaborative and reproducible research. He is currently a fellow at the Institute for Research and Innovation in Software for High Energy Physics (IRIS-HEP), working on the first major release of Vector. He is also working as a technical writer for FluxML, which is being funded by the Julia Programming Language. He is interested in everything a Research Software Engineer and a Machine Learning Engineer do, including Scientific Machine Learning, code optimization, developing packages, technical writing, building infrastructures, developing open-source research software, JuliaLang, and Python.
#python #pycontw #pyconapac2022 #unittests #codecoverage
Follow “PyCon Taiwan” ⭐️ Official Website: https://tw.pycon.org ⭐️ Facebook: https://www.facebook.com/pycontw ⭐️ Instagram: https://www.instagram.com/pycontw ⭐️ Twitter: https://twitter.com/PyConTW ⭐️ LinkedIn: https://www.linkedin.com/company/pycontw ⭐️ Blogger: https://pycontw.blogspot.com