chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
---
|
||||
name: 🐛发现一个bug
|
||||
about: 需提交版本号、触发代码、错误日志
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: hankcs
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
感谢找出bug,请认真填写下表:
|
||||
-->
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Code to reproduce the issue**
|
||||
Provide a reproducible test case that is the bare minimum necessary to generate the problem.
|
||||
|
||||
```python
|
||||
```
|
||||
|
||||
**Describe the current behavior**
|
||||
A clear and concise description of what happened.
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**System information**
|
||||
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
|
||||
- Python version:
|
||||
- HanLP version:
|
||||
|
||||
**Other info / logs**
|
||||
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
|
||||
|
||||
* [ ] I've completed this form and searched the web for solutions.
|
||||
<!-- ⬆️此处务必勾选,否则你的issue会被机器人自动删除! -->
|
||||
<!-- ⬆️此处务必勾选,否则你的issue会被机器人自动删除! -->
|
||||
<!-- ⬆️此处务必勾选,否则你的issue会被机器人自动删除! -->
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: ⁉️ 提问求助请上论坛
|
||||
url: https://bbs.hankcs.com/
|
||||
about: 欢迎前往蝴蝶效应论坛求助
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
name: 🚀新功能请愿
|
||||
about: 建议增加一个新功能
|
||||
title: ''
|
||||
labels: feature request
|
||||
assignees: hankcs
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
提问请上论坛,不要发这里!
|
||||
提问请上论坛,不要发这里!
|
||||
提问请上论坛,不要发这里!
|
||||
|
||||
以下必填,否则直接关闭。
|
||||
-->
|
||||
|
||||
**Describe the feature and the current behavior/state.**
|
||||
|
||||
**Will this change the current api? How?**
|
||||
|
||||
**Who will benefit with this feature?**
|
||||
|
||||
**Are you willing to contribute it (Yes/No):**
|
||||
|
||||
**System information**
|
||||
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
|
||||
- Python version:
|
||||
- HanLP version:
|
||||
|
||||
**Any other info**
|
||||
|
||||
* [ ] I've carefully completed this form.
|
||||
<!-- 发表前先搜索,此处一定要勾选! -->
|
||||
<!-- 发表前先搜索,此处一定要勾选! -->
|
||||
<!-- 发表前先搜索,此处一定要勾选! -->
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--
|
||||
Thank you for being interested in contributing to HanLP! You are awesome ✨.
|
||||
⚠️Changes must be made on dev branch.
|
||||
-->
|
||||
|
||||
# Title of Your Pull Request
|
||||
|
||||
## Description
|
||||
|
||||
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
|
||||
|
||||
Fixes # (issue)
|
||||
|
||||
## Type of Change
|
||||
|
||||
Please check any relevant options and delete the rest.
|
||||
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] This change requires a documentation update
|
||||
|
||||
## How Has This Been Tested?
|
||||
|
||||
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
|
||||
|
||||
## Checklist
|
||||
|
||||
Check all items that apply.
|
||||
|
||||
- [ ] ⚠️Changes **must** be made on `dev` branch instead of `master`
|
||||
- [ ] I have added tests that prove my fix is effective or that my feature works
|
||||
- [ ] New and existing unit tests pass locally with my changes
|
||||
- [ ] My code follows the style guidelines of this project
|
||||
- [ ] I have commented my code, particularly in hard-to-understand areas
|
||||
- [ ] I have made corresponding changes to the documentation
|
||||
- [ ] My changes generate no new warnings
|
||||
- [ ] I have checked my code and corrected any misspellings
|
||||
@@ -0,0 +1,86 @@
|
||||
name: Unit Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "**" ]
|
||||
pull_request:
|
||||
branches: [ "**" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
HANLP_HOME: ${{ github.workspace }}/data
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
||||
python-version: [ 3.6, 3.7, 3.8, 3.9, '3.10' ]
|
||||
exclude:
|
||||
# GHA doesn't list 3.6 for ubuntu-22.04
|
||||
- os: ubuntu-latest
|
||||
python-version: "3.6"
|
||||
|
||||
# MacOS 14.4.1 for arm64 doesn't support Python < 3.8
|
||||
- os: macos-latest
|
||||
python-version: "3.6"
|
||||
- os: macos-latest
|
||||
python-version: "3.7"
|
||||
|
||||
include:
|
||||
# GHA doesn't list 3.6 for ubuntu-22
|
||||
- os: ubuntu-20.04
|
||||
python-version: "3.6"
|
||||
|
||||
# MacOS 13 required for Python < 3.8
|
||||
- os: macos-13
|
||||
python-version: "3.6"
|
||||
- os: macos-13
|
||||
python-version: "3.7"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
python -m pip install -e plugins/hanlp_trie
|
||||
python -m pip install -e plugins/hanlp_common
|
||||
python -m pip install -e .
|
||||
python -m pip install pytest
|
||||
|
||||
- name: Cache data
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ env.HANLP_HOME }}
|
||||
key: hanlp-data
|
||||
|
||||
- name: Test with pytest
|
||||
shell: bash
|
||||
run: |
|
||||
pytest tests
|
||||
pytest plugins/hanlp_trie/tests
|
||||
deploy:
|
||||
needs: build
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install setuptools wheel twine
|
||||
- name: Deploy to PyPI
|
||||
run: |
|
||||
python setup.py sdist bdist_wheel
|
||||
python -m twine upload dist/*
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
||||
TWINE_REPOSITORY: pypi
|
||||
Reference in New Issue
Block a user