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

chore: change scripts to makefile #821

Draft
wants to merge 2 commits into
base: 3.12
Choose a base branch
from

Conversation

rockleona
Copy link
Collaborator

@rockleona rockleona commented Feb 21, 2024

關於之前寫 script 的時候,來自 @mattwang44願望 (?)

也感謝 #643 方格子跟 Josix 的寫法參考,第一次寫 Makefile 再麻煩大家提供建議了

@rockleona
Copy link
Collaborator Author

目前是在 .scripts 底下新增了一個 requirements.txt
然後仿造 venv for sphinx 的環境,做了一個給 script 使用的。

目前測試結果:

  • summarize_progress : success
  • google_translate : partial failed

. $(VENV_FOR_SCRIPT)/bin/activate; \
python3 google_translate/main.py $(_file_path) > $(_tmp_po_file) ; \
pomerge -t $(_file_path) -i $(_tmp_po_file) -o $(_file_path) ; \
# rm $(_tmp_po_file)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

被我註解起來的這一行會有下列錯誤

/bin/sh: 4:  : not found
make: *** [Makefile:100:google_translate] 錯誤 127

完全不知道錯誤在哪裡@@,再麻煩好心人協助

@mattwang44 mattwang44 self-requested a review February 21, 2024 07:54
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原本有 pyproject.toml,不延用 poetry 嗎?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我想說跟 makefile 完美結合的話,應該是改成 venv + pip 做管理;
但對,沿用的話會簡單很多(嗎?)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

沿用不一定比較好寫,畢竟現在比較像是 follow makefile 現有的寫法,所以不太會有 survey 的成分。
只是我就沒有覺得哪個跟 makefile 會比較能夠完美結合

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

poetry 也有能力去建立與管理 virtual environment

python package tools

原來根本的原因是因為我不熟QQ,我來研究一下怎麼做

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants