Code Monkey home page Code Monkey logo

price-tracker-bot's People

Contributors

chen-tf avatar dependabot[bot] avatar hackmd-deploy avatar henry-on-the-internet avatar hokou avatar ken71301 avatar s9891326 avatar w305jack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

price-tracker-bot's Issues

[Dev][Refactor] pt_repository.add_user_good_info

背景

pt_repository.add_user_good_info 需替換為 SQLAlchemy 實作的方式

影響

  • 移除 pt_repository.add_user_good_info
  • pt_service 對接的方法需要替換

驗證

在 telegram bot 使用 /add 指令後可以順利將 momo 商品加入收藏,並在資料庫中查詢到對應的收藏紀錄。

[Study] 採用 ORM framework

身為 開發者
我希望 資料持久化的操作可以更簡單
如此 才可以專心在邏輯的操作上

背景

目前的 pt_repository 使用的是 psycopg2 和他的 conneciton pool 非常的痛苦,常常會有需要自行檢查是否斷線的問題,想要直接換上一套 ORM framework 在往後的資料操作上才可以更輕鬆。

Definition of Done

  1. 要使用什麼 python ORM framework
  2. 如何把目前的 code migrate 過去
  3. example code

[DEV] 排版套用至所有檔案

身為 開發者

我希望 程式碼可以有統一的coding style
如此 才更容易看懂程式碼

背景

排版三本柱都搞好了就都套用一下吧

Definition of Done

all python file has been blacked

[Study] Health check

身為 開發者
我希望 服務狀態異常的時候收到通知
如此 我才可以緊急進行處理,避免影響到太多使用者

Definition of Done

  1. define key metric (要怎麼樣我們的服務才算是活著?)
  2. 如何做到 health check

[Study] 補齊測試案例

身為 開發者
我希望 專案有足夠的測試覆蓋率
如此 才有信心相信程式的品質

背景

現在的程式沒有任何測試覆蓋,每次的改動都像是在裸奔,無法確保品質。

Definition of Done

  1. 要使用何種框架和工具來做測試
  2. 有哪些地方需要做測試
  3. example code

[Study] 調整 readme

身為 對這個專案有興趣的開發者
我希望 專案有清楚的 readme
如此 才可以快速地了解這個專案的背景

背景

目前的 readme 比較像是一個故事書...,需要思考一下該做一些什麼調整,讓未來想要 fork project 的人能快速地進入狀態。

Definition of Done

  1. 如何執行這個專案
  2. 想要擴充功能要從何進行
  3. 實際上支援幾種指令

[Study] GitHub Action 和 Fly.io 整合

身為 開發者
我希望 main branch changed 的時候,會自動部署到對應環境
如此 我才不用手動部署

背景

目前都是自己在 local 透過 fly.io CLI tool 的方式去部署

Definition of Done

  1. 順利在 code merge main branch 的時候將服務部署上去

Arrival notice not work

in pt_service.py line 83
follow_good_chat_ids = user_repository.find_all_user_by_good_id(good_id)
find_all_user_by_good_id >> will return user list (List[User]) instead of chat_ids list (List[string])

in pt_service.py line 86
pt_bot.send( ) >> can only accept msg (string) and chat_id (string or int)

in pt_service.py line 88
str(follow_good_chat_id) >> this will convert User in database to string.
suggest change to str(follow_good_chat_id.chat_id)

[Dev][Refactor] pt_repository.add_good_info

背景

pt_repository.add_good_info 需替換為 SQLAlchemy 實作的方式

影響

  • 移除 pt_repository.add_good_info
  • pt_service 對接的方法需要替換

驗證

在 telegram bot 使用 /add 指令後可以順利將 momo 商品加入收藏,並在資料庫中查詢到對應的商品紀錄。

[Feature] PChome 商品資料解析

身為一個使用者
我希望可以收藏 PChome 的商品
如此我才可以更容易地以更低價格取得商品

  • 根據 #11 的結果,實作以下功能
    • 訊息中的 URL parsing 判斷是否為 PChome 商品頁面,進一步取得商品資訊
    • 輸入一個 PChome 的商品 ID 可以取得對應的商品資訊

商品資訊

  1. ID
  2. 名稱
  3. 價格
  4. 商品狀態(可購買、下架、缺貨)

[Study] Python telegram bot + Flask

身為 要出錢去平台開機器的苦主
我希望 notifier_web.pypt_bot.py 都能使用 Flask 來接收 http request
如此 我就不用開兩台機器分別執行他們

Definition of Done

application 可以同時接受 LINE notify & Telegram Bot Webhook

[Study] 重構程式碼

身為 開發者
我希望 程式碼可以更簡潔清楚並有清楚的 module scope
如此 我才能有更好的開發效率

背景

現況是不同 use case (瀏覽收藏、新增商品、排程檢查價格)的程式碼都摻和在一起,但每個模組間應該要符合 SRP

Definition of Done

  1. 需要進行調整的 python file
  2. 調整方式

[Study] Apply python formatter

身為 開發者
我希望 有 formatter 可以幫助排版,讓大家的格式都可以統一
如此 協作起來才可以更順利

Definition of Done

  1. 要使用哪一個 formatter
  2. 如何下 command 檢查目前專案中是否有不符合規定的格式存在

[Study] PChome 商品資訊 - 爬蟲

身為 使用者
我希望 有更多的電商平台商品可以收藏
如此 我可以有更多的機會買到便宜商品

背景

現行只有支援 momo shop,需要知道 PChome 是否也有可以單靠 http request,不用 javascript render 就可以得到商品狀態的方法

Definition of Done

可以透過 PChome 商品頁 URL 得到以下資訊

  1. 商品名稱
  2. 價格
  3. 上/下架狀態

[Document] Pull request template

身為 開發者
我希望 pull request 有個 template
如此 我在發 PR 的時候,才知道需要提供哪些資訊給 reviewer

Definition of Done

create pull request 的時候會出現 template

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.