-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f99d236
commit f78e4b8
Showing
40 changed files
with
3,562 additions
and
2,988 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ indent_style = tab | |
|
||
[*.{md,rst}] | ||
trim_trailing_whitespace = false | ||
indent_size = 3 | ||
|
||
[Makefile] | ||
indent_style = tab |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.. _additional-bug_reporting: | ||
|
||
========== | ||
错误报告 | ||
========== | ||
|
||
如果您认为发现了错误,请先验证以下步骤: | ||
|
||
- 此 issue 是否已经提及并解决呢? | ||
- 这个错误是否发生在 Scrapy 中?如果是这样,问题可能出在你的代码上或者是 Scrapy 本身,而不是 AyugeSpiderTools; | ||
- 您使用的是最新的版本吗?新版本一般包含已发现的错误修复,请升级到最新版本再次尝试; | ||
- 如果您确定问题是由 AyugeSpiderTools 引起的,请随时提交新问题。提 issue 特别是 Feature request 或 \ | ||
Bug report 时,尽量按照 issue 模板来书写,可方便编写。非强制要求,能清晰地描述问题即可; | ||
|
||
注:并非存在以上的问题就不允许提 issue,它只是用于自我快速排查问题。 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
.. _additional-contributing: | ||
|
||
====== | ||
贡献 | ||
====== | ||
|
||
在编写和提交 pull request 前,建议先创建一个对应 issues 并在其中讨论相关详细信息。 | ||
|
||
前提准备 | ||
========== | ||
|
||
本指南假设您已拥有 github 账户,以及 python3,虚拟环境和 git 的安装配置。但不会限制你使用的工具,比如\ | ||
你可以使用 virtualenv 代替 pyenv。 | ||
|
||
1. `Fork <https://github.com/shengchenyang/AyugeSpiderTools/fork>`_ AyugeSpiderTools | ||
|
||
2. Clone your forked repository | ||
|
||
.. code:: bash | ||
git clone https://github.com/<username>/AyugeSpiderTools | ||
cd AyugeSpiderTools | ||
3. Create a virtual environment | ||
|
||
.. code:: bash | ||
pyenv virtualenv 3.9.20 venv | ||
pyenv activate venv | ||
pip install poetry | ||
poetry install | ||
pre-commit install | ||
4. Run a test | ||
|
||
.. code:: bash | ||
pytest tests/test_items.py | ||
开发工作流 | ||
============ | ||
|
||
本项目有两个分支,分别是 master 和 feature,master 为稳定分支,feature 分支活跃度较高,通常情况下新\ | ||
功能及 bug 修复等通过此分支测试后才会最终同步到 master 分支。所以,若您有 pull request 需求请推送至 \ | ||
feature。若您不太了解 pull request 流程,我会在以下部分介绍,并给出参考文章。 | ||
|
||
注意:请完成以上前提准备,以下步骤皆在你的 repo 中操作。 | ||
|
||
1. Checkout the feature branch | ||
|
||
.. code:: bash | ||
git checkout feature | ||
2. Create and checkout a new branch | ||
|
||
.. note:: | ||
|
||
通常情况下,都不推荐直接在当前分支下操作(会影响后续与原作者的同步操作),需要新建一个新分支,如果这个\ | ||
分支修复了某个 issues,那么新建分支的名称可以为 ``issue#<id>``。比如本项目中,有一个 `issue`_ 标\ | ||
题为 ``安装后运行报错:ModuleNotFoundError: No module named 'yaml'``,假设你的 pull request \ | ||
修复了此问题,那么新建的分支名称就可以为 ``issue#9``,或者为 ``fix-ModuleNotFoundError-yaml``,\ | ||
这里只是给出建议,具体名称可自定义,通俗易懂即可。 | ||
|
||
.. code:: bash | ||
git checkout -b <new-branch> | ||
.. note:: | ||
|
||
以上两步也可以直接优化为一句命令 git checkout -b <new-branch> feature | ||
|
||
3. Make your changes | ||
|
||
4. Run tests | ||
|
||
.. note:: | ||
|
||
只测试与当前 pull request 相关的功能即可。由于执行全部测试的依赖过多,所以你可以自行本地打包测试通过\ | ||
即可,可不用补充相关测试代码。 | ||
|
||
5. Commit and push your work | ||
|
||
.. code:: bash | ||
git add . | ||
git commit -m "Your commit message goes here" | ||
git push -u origin <new-branch> | ||
6. `Create a pull request`_ | ||
|
||
.. warning:: | ||
|
||
完成上一步后,在你 fork 的 github 项目页面上就会有创建 pull request 合并的按钮了, 记得要从你 repo \ | ||
的 ``<new-branch>`` 分支 pull request 到我 repo 的 ``feature`` 中,到此已完成整个流程。 | ||
|
||
.. _issue: https://github.com/shengchenyang/AyugeSpiderTools/issues/9 | ||
.. _Create a pull request: https://help.github.com/articles/creating-a-pull-request/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.. _additional-documentation: | ||
|
||
===== | ||
文档 | ||
===== | ||
|
||
贡献方式 | ||
========== | ||
|
||
贡献的一种方式是完善此项目的文档。若您觉得文档中有需要改进的地方,可减少用户的理解成本,可通过以下方式反馈\ | ||
和 pr。 | ||
|
||
- 文档中每个页面顶部都有一个 ``Edit on GitHub`` 的链接。通过单击该链接,您可以创建包含更改的拉取请求。\ | ||
您需要一个 Github 帐户才能编辑页面。 | ||
- 但我还是推荐按照 `Pull Requests`_ 的规则来修改和提交 pr。 | ||
|
||
.. warning:: | ||
|
||
同样地,在有完善文档的想法时请先提 issue 进行简要说明,主要是避免贡献浪费。 | ||
|
||
本地构建 | ||
========== | ||
|
||
在提交 pr 前,如何在本地查看修改后的效果呢? | ||
|
||
1. Create a virtual environment | ||
|
||
.. code:: bash | ||
pyenv virtualenv 3.9.20 venv | ||
pyenv activate venv | ||
pip install poetry | ||
poetry install | ||
pre-commit install | ||
2. Make changes | ||
|
||
在 docs 文件夹下修改您关心的部分。 | ||
|
||
3. Check the effect | ||
:: | ||
|
||
# 进入文档目录 | ||
cd docs | ||
|
||
# 构建文档 | ||
make html | ||
|
||
.. note:: | ||
|
||
当构建完成时使用浏览器访问本项目中 ``docs/_build/html/index.html`` 即可查看修改后的效果。 | ||
|
||
.. _Pull Requests: https://ayugespidertools.readthedocs.io/en/latest/additional/contributing.html |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.. _additional-donating: | ||
|
||
========= | ||
微信赞赏 | ||
========= | ||
|
||
如果此项目对你有所帮助,可以选择打赏作者。 | ||
|
||
.. image:: https://github.com/shengchenyang/AyugeSpiderTools/raw/master/artwork/ayugespidertools-donating.jpg | ||
:alt: 微信赞赏码 | ||
:width: 280 |
Oops, something went wrong.