Skip to content

feat: add configuration files for project setup with Poetry and pre-c… #23

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Accoral
Copy link

@Accoral Accoral commented Mar 31, 2025

…ommit hooks

Copy link
Owner

@silver6wings silver6wings left a comment

Choose a reason for hiding this comment

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

giegie,请查收

@@ -0,0 +1,35 @@
[[tool.poetry.source]]
Copy link
Owner

Choose a reason for hiding this comment

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

这个poertry和pip是否冲突,我的目的是不想因为引用新技术而抬高用户的使用门槛,如果这个跟pip本身不冲突那没关系(当然也担心这些奇怪文件吓跑新手)

Copy link
Author

Choose a reason for hiding this comment

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

pip 可以继续使用,二者不冲突。
用 poetry 只是方便装了 isort 等,其实也可以不用 poetry

- repo: local
hooks:
- id: system
name: isort
Copy link
Owner

Choose a reason for hiding this comment

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

这个isort是需要把tushare那个库给ignore掉,因为默认导入tushare会有默认logging格式冲突的问题(reader那个目录)

Copy link
Author

Choose a reason for hiding this comment

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

👌🏻

- repo: local
hooks:
- id: system
name: ruff
Copy link
Owner

Choose a reason for hiding this comment

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

ruff跟isort是不是功能有重叠,保留一个就行?

- repo: local
hooks:
- id: system
name: pylint
Copy link
Owner

Choose a reason for hiding this comment

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

pylint这个会强制开发者执行么?毕竟fork的人比较多,让他们提交不了估计要炸毛

Copy link
Author

Choose a reason for hiding this comment

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

只有执行过 pre-commit install 的用户在 commit 后才会进行 pre-commit-config 中的检查,否则不会检查

- repo: local
hooks:
- id: system
name: mypy
Copy link
Owner

Choose a reason for hiding this comment

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

那个xtquant文件夹是复制进来的第三方库,需要ignore掉

Copy link
Author

Choose a reason for hiding this comment

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

👌🏻

package-mode = false

[tool.poetry.dependencies]
python = "^3.12"
Copy link
Owner

Choose a reason for hiding this comment

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

3.10

Copy link
Author

Choose a reason for hiding this comment

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

👌🏻

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.

2 participants