avatarShane Liu

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2304

Abstract

r test cases cover various scenarios and edge cases related to the feature.</p><h1 id="e943">Step 3: Create a Test Configuration</h1><p id="7aa5">You may need to create a specific test configuration or suite that includes the test cases related to the feature. This helps isolate the testing of that feature.</p><h1 id="5b64">Step 4: Configure GitHub Actions Workflow</h1><p id="b8d2">Update your GitHub Actions workflow YAML file (usually named <code>.github/workflows/android_build.yml</code>) to include a job that runs the tests for the specific feature. Here's an example of how you can create a job specifically for testing a feature:</p><p id="3577">Here’s an example of how you can create a job specifically for testing a feature:</p><div id="8753"><pre><span class="hljs-attr">name:</span> <span class="hljs-string">AndroidBuild</span>

<span class="hljs-attr">on:</span> <span class="hljs-attr">pull_request :</span> <span class="hljs-attr">branches :</span> [ <span class="hljs-string">master</span> ] <span class="hljs-attr">push :</span> <span class="hljs-attr">branches :</span> [ <span class="hljs-string">master</span> ]

<span class="hljs-attr">jobs:</span> <span class="hljs-attr">test-feature:</span> <span class="hljs-attr">runs-on:</span> <span class="hljs-string">macOS-latest</span>

<span class="hljs-attr">needs:</span> <span class="hljs-string">build</span>

<span class="hljs-attr">steps:</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">Checkout</span> <span class="hljs-string">code</span>
    <span class="hljs-attr">uses:</span> <span class="hljs-string">actions/[email protected]</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">Set</span> <span class="hljs-string">up</span> <span class="hljs-string">JDK</span> <span class="hljs-number">11</span>
    <span class="hljs-attr">uses:</span> <span class="hljs-string">actions/[email protected]</span>
    <span class="hljs-attr">with:</span>
      <span class="hljs-attr">distribution:</span> <span class="hljs-string">'adopt'</span>
      <span class="hljs-attr">java-version:</span> <span class="hljs-string">'17'</span>

  <span class="hljs-bullet"

Options

-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">Grant</span> <span class="hljs-string">execute</span> <span class="hljs-string">permissions</span> <span class="hljs-string">for</span> <span class="hljs-string">gradlew</span> <span class="hljs-attr">run:</span> <span class="hljs-string">chmod</span> <span class="hljs-string">+x</span> <span class="hljs-string">./gradlew</span>

  <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">Run</span> <span class="hljs-string">Tests</span> <span class="hljs-string">with</span> <span class="hljs-string">Gradle</span>
    <span class="hljs-attr">run:</span> <span class="hljs-string">./gradlew</span> <span class="hljs-string">test</span>

</pre></div><p id="3df4">In this example, the job is named <code>test-feature</code>, and it runs the <code>testFeature</code> task or test suite. Adjust the build and test commands to match your project's structure and testing framework.</p><h1 id="9c43">Step 5: Trigger the Workflow</h1><p id="5c42">You can trigger the GitHub Actions workflow by pushing code changes related to the feature or by creating a pull request that includes those changes. The workflow will run automatically based on the configured triggers in your workflow file.</p><h1 id="8d0b">Step 6: Review Test Results</h1><p id="da9d">After the workflow runs, you can review the test results in the GitHub Actions tab on your repository’s page. Ensure that the tests related to the specific feature have passed successfully.</p><h1 id="adf1">Conclusion</h1><p id="0afb">Automating feature testing in your Android app with GitHub Actions is a powerful way to maintain software quality and catch issues early in the development process. By following the steps outlined in this blog post, you can set up an automated testing pipeline that helps you ensure that your app’s features work as expected. This, in turn, leads to a more reliable and robust Android application.</p><p id="a96c">With GitHub Actions, you can continuously verify that your Android app’s features meet the defined requirements and provide a seamless experience for your users. Happy testing!</p><p id="4f28">Follow to get more and improve your android development skills.</p></article></body>

Amazing picture from Geralt

如何開啟一場 Kaggle 競賽 — 資料分析的入門心得 Part 1

不務正業太久了,來寫一些正經的。

沒有會員的朋友,可以點這邊看全文

前言

筆者這學期選修了一門 Fundamental of Data Science,正想著太好了,之前做過一些爬蟲相關的工作,藉著這堂可以把實際經驗跟學術結合。殊不知,上課還不到兩個禮拜,就收到一封名為Data Science Project1,期限還在兩週之後,點開一看居然是要直接打一場Kaggle!

完全就像是叫一個平常自己游泳的人,兩個禮拜之後參加世大運的200公尺自由式那樣晴天霹靂。靜下心來想想,這堂課一個學分也好幾萬,硬著頭皮下了關鍵字:

How to start a Kaggle Competition

因此,以下就來不專業的分享一下(請有經驗的大神,鞭小力一點),身為一個全職新手,該如何開啟你的第一次Kaggle 比賽。

了解 Kaggle

Kaggle可以想像成是資料分析領域專用的某種Tender,在上面會有許多公司拋出一些問題(正妹),然後給出高額的懸賞(深夜福利之類),等待資料科學家(屠龍勇者)們好好的觀察資料,建出優質的Model,不斷精進 Pensonal Profile的吸引力,啊不對是做出精準的預測,在與資料們相處、培養感情後,或許你就能備受親睞,獲得獎賞。

相信各位有玩過 Tender 的男士們都知道,我們是沒有選擇的權利,只能全部往右滑(誤…。但在 Kaggle 的世界,我們可以選擇想挑戰的比賽來進行,當然你要都參加也是可以。

Train Data V.S. Test Data

有鑒於筆者實在太新手了,連 Train Data 和 Test Data 分別用來幹嘛都不是很清楚,因此在這邊就來解釋一下。

Train Data

顧名思義就是用來訓練的資料,挑戰者需要在裡面找到有用的 Features 或對欄位進行處理,並以這些資料建立預測模型,來供 Test Data 使用。

Test Data

平常不太需要理他的資料,等到模型都建好了,就可以把它整理一下丟進去預測。

該如何開始

如果你是一位經驗老道的高手,毫無疑問的你就直接切入資料,去找尋有用的 Features 或是做一些資料處理,印出各式各樣的圖,來找尋藏在數據背後的小秘密。

然而身為專業新手又孤軍奮戰的我們,唯一能做的就是,到 Kaggle的官網打開別人的 Notebook,開始了解別人都怎麼處理的。筆者的開始就是開啟討論區和許多分數較高的 Notebook,看看別人都是怎麼樣起手。

每個人的 Notebook 使用的圖和數據都很不相同,但更仔細的去了解,會發現對於某些欄位大家都會特別去處理,或是印出來使用。沒錯!這可能就是 Key Feature ,一開始就開始針對這些資料印出來看看。

該用哪些圖

筆者認為選擇要用哪種呈現方式,是非常困難的事情。就像不可能跟每個 Tender 滑到的伴都聊一樣的話題,針對不同的資料類型,就有其適合的呈現方式。

這邊稍微整理了一些大家常用來繪圖的套件, Seaborn, Matplotlib, Pandas.

當然最好的情況是,把資料視覺化前先看過所有套件的教學,但我知道你不會,因為筆者也是懶惰蟲。

創作的開始,來自於模仿。

學習別人視覺化過程,並套用在不同的資料上面,看看效果是不是一樣好,或是很奇怪,就是非常好的開始。

小結

做為一個資料分析的新手,筆者寫作的過程中,一直在思考要提供什麼樣的資訊。因此這篇文章的定位會在,鼓勵所有對資料分析有興趣的朋友們,一個開始的契機。再有基本的程式底子下(只要能看到懂別人大蓋在幹麻就行),大家其實都能夠參加一場比賽。筆者會在文章的下方放上一些實用的教學,有興趣的朋友可以接續著看。

好的資料分析很困難,但要跳進來並不難。

筆者的第一次的 Kaggle 挑戰,就是不停的觀察、模仿、嘗試用一些別人沒有用的數據來看看有沒有其他新的發現。最後的模型部分,歸納出本次挑戰中最多人使用的模型,用 Default 的參數和設定去跑跑看。

想當然排名是非常後面,但更多的收獲是,筆者大概了解 Kaggle 裡面賣的是什麼藥。寫程式就是這麼一回事,不了解之前就像迷霧重重的森林,等你走進來就會發現,其實就是一些相同的概念作延伸變化。

寫完文章的當下,筆者又收到 Project2 的信件,我們的下一個作業是經典的房價預測,筆者會試著了解更多分享不同的想法,也歡迎各路大神、新手一起來,說不定能幫助我完成作業(誤)。

祝福所有對資料分析有興趣的朋友,都能順利地開啟資料分析之旅,按下submission 看到分數 report 的時候,真的有種莫名的感動(建立在分數不要太慘的狀況)。

相關資料

About Kaggle

資料處理相關

Kaggle 比賽心得分享

同場加映

意外發現非常有趣的競賽,各路的寫手們會不會很好奇,How good is your Medium article?

關於作者: Shane
喜歡寫文章的理科男孩。
目前人在紐約攻讀 Master of Computer Science @ SBU.
努力的找Summmer2020在美國的實習中,懇請各路大神提攜:
我的LinkedIn
不定期分享一些留學、工作、生活、旅遊的有趣故事們。
歡迎追蹤我或是刊物【島嶼男孩】!!!
↓如果喜歡我的文章,或覺得有趣請幫我分享或拍20下手↓↓↓↓
Kaggle
Data Science
Study Abroad
Recommended from ReadMedium