Skip to content

Commit eeb8350

Browse files
committed
Init commit
0 parents  commit eeb8350

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2874
-0
lines changed

.github/FUNDING.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: https://raw.githubusercontent.com/RapidAI/.github/6db6b6b9273f3151094a462a61fbc8e88564562c/assets/Sponsor.png
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Feature Request
3+
about: requests for new RapidOCR features
4+
title: 'Feature Request'
5+
labels: 'Feature Request'
6+
assignees: ''
7+
8+
---
9+
10+
请您详细描述想要添加的新功能或者是新特性
11+
(Please describe in detail the new function or new feature you want to add)

.github/ISSUE_TEMPLATE/02-bug.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Bug
3+
about: Bug
4+
title: 'Bug'
5+
labels: 'Bug'
6+
assignees: ''
7+
8+
---
9+
10+
请提供下述完整信息以便快速定位问题
11+
(Please provide the following information to quickly locate the problem)
12+
- **系统环境/System Environment**
13+
- **使用的是哪门语言的程序/Which programing language**
14+
- **所使用语言相关版本信息/Version**
15+
- **OnnxRuntime版本/OnnxRuntime Version**
16+
- **可复现问题的demo/Demo of reproducible problems**
17+
- **完整报错/Complete Error Message**
18+
- **可能的解决方案/Possible solutions**:

.github/ISSUE_TEMPLATE/03-blank.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: Blank Template
3+
about: Blank Template
4+
title: 'Blank Template'
5+
labels: 'Blank Template'
6+
assignees: ''
7+
8+
---

.github/workflows/SyncToGitee.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: SyncToGitee
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
repo-sync:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout source codes
11+
uses: actions/checkout@v3
12+
13+
- name: Mirror the Github organization repos to Gitee.
14+
uses: Yikun/hub-mirror-action@v1.2
15+
with:
16+
src: 'github/RapidAI'
17+
dst: 'gitee/RapidAI'
18+
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
19+
dst_token: ${{ secrets.GITEE_TOKEN }}
20+
force_update: true
21+
# only sync this repo
22+
static_list: "RapidOCR"
23+
debug: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Push rapidocr_layout to pypi
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'rapid_layout/**'
8+
- 'docs/doc_whl_rapid_layout.md'
9+
- 'setup_layout.py'
10+
- '.github/workflows/gen_whl_to_pypi_rapid_layout.yml'
11+
- 'tests/test_layout.py'
12+
13+
env:
14+
RESOURCES_URL: https://github.com/RapidAI/RapidOCR/releases/download/v1.1.0/rapid_layout_models.zip
15+
16+
jobs:
17+
UnitTesting:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Pull latest code
21+
uses: actions/checkout@v3
22+
23+
- name: Set up Python 3.7
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.7'
27+
architecture: 'x64'
28+
29+
- name: Display Python version
30+
run: python -c "import sys; print(sys.version)"
31+
32+
- name: Unit testings
33+
run: |
34+
wget $RESOURCES_URL
35+
ZIP_NAME=${RESOURCES_URL##*/}
36+
DIR_NAME=${ZIP_NAME%.*}
37+
unzip $DIR_NAME
38+
cp $DIR_NAME/*.onnx rapid_layout/models/
39+
cd python/rapid_structure
40+
pip install -r requirements.txt
41+
pytest tests/test_layout.py
42+
43+
GenerateWHL_PushPyPi:
44+
needs: UnitTesting
45+
runs-on: ubuntu-latest
46+
47+
steps:
48+
- uses: actions/checkout@v3
49+
50+
- name: Run setup
51+
run: |
52+
cd python/rapid_structure
53+
pip install -r requirements.txt
54+
wget $RESOURCES_URL
55+
ZIP_NAME=${RESOURCES_URL##*/}
56+
DIR_NAME=${ZIP_NAME%.*}
57+
unzip $ZIP_NAME
58+
mv $DIR_NAME/*.onnx rapid_layout/models/
59+
python setup_layout.py bdist_wheel ${{ github.event.head_commit.message }}
60+
61+
# - name: Publish distribution 📦 to Test PyPI
62+
# uses: pypa/gh-action-pypi-publish@v1.5.0
63+
# with:
64+
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
65+
# repository_url: https://test.pypi.org/legacy/
66+
# packages_dir: dist/
67+
68+
- name: Publish distribution 📦 to PyPI
69+
uses: pypa/gh-action-pypi-publish@v1.5.0
70+
with:
71+
password: ${{ secrets.RAPID_STRUCTURE }}
72+
packages_dir: dist/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Push rapidocr_orientation to pypi
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'rapid_orientation/**'
8+
- 'docs/doc_whl_rapid_orientation.md'
9+
- 'setup_orientation.py'
10+
- '.github/workflows/gen_whl_to_pypi_rapid_orientation.yml'
11+
- 'tests/test_orientation.py'
12+
13+
env:
14+
RESOURCES_URL: https://github.com/RapidAI/RapidOCR/releases/download/v1.1.0/rapid_orientation_models.zip
15+
16+
jobs:
17+
UnitTesting:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Pull latest code
21+
uses: actions/checkout@v3
22+
23+
- name: Set up Python 3.7
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.7'
27+
architecture: 'x64'
28+
29+
- name: Unit testings
30+
run: |
31+
wget $RESOURCES_URL
32+
ZIP_NAME=${RESOURCES_URL##*/}
33+
DIR_NAME=${ZIP_NAME%.*}
34+
unzip $ZIP_NAME
35+
rm rapid_orientation/models/.gitkeep
36+
mv $DIR_NAME/*.onnx rapid_orientation/models/
37+
cd python/rapid_structure
38+
pip install -r requirements.txt
39+
cd tests
40+
pytest test_orientation.py
41+
42+
GenerateWHL_PushPyPi:
43+
needs: UnitTesting
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- uses: actions/checkout@v3
48+
49+
- name: Set up Python 3.7
50+
uses: actions/setup-python@v4
51+
with:
52+
python-version: '3.7'
53+
architecture: 'x64'
54+
55+
- name: Run setup
56+
run: |
57+
cd python/rapid_structure
58+
pip install -r requirements.txt
59+
wget $RESOURCES_URL
60+
ZIP_NAME=${RESOURCES_URL##*/}
61+
DIR_NAME=${ZIP_NAME%.*}
62+
unzip $ZIP_NAME
63+
mv $DIR_NAME/*.onnx rapid_orientation/models/
64+
python setup_orientation.py bdist_wheel ${{ github.event.head_commit.message }}
65+
66+
# - name: Publish distribution 📦 to Test PyPI
67+
# uses: pypa/gh-action-pypi-publish@v1.5.0
68+
# with:
69+
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
70+
# repository_url: https://test.pypi.org/legacy/
71+
# packages_dir: dist/
72+
73+
- name: Publish distribution 📦 to PyPI
74+
uses: pypa/gh-action-pypi-publish@v1.5.0
75+
with:
76+
password: ${{ secrets.RAPID_STRUCTURE }}
77+
packages_dir: dist/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Push rapidocr_table to pypi
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'rapid_table/**'
8+
- 'docs/doc_whl_rapid_table.md'
9+
- 'setup_table.py'
10+
- '.github/workflows/gen_whl_to_pypi_rapid_table.yml'
11+
- 'tests/test_table.py'
12+
13+
env:
14+
RESOURCES_URL: https://github.com/RapidAI/RapidOCR/releases/download/v1.1.0/rapid_table_models.zip
15+
16+
jobs:
17+
UnitTesting:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Pull latest code
21+
uses: actions/checkout@v3
22+
23+
- name: Set up Python 3.7
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.7'
27+
architecture: 'x64'
28+
29+
- name: Display Python version
30+
run: python -c "import sys; print(sys.version)"
31+
32+
- name: Unit testings
33+
run: |
34+
wget $RESOURCES_URL
35+
ZIP_NAME=${RESOURCES_URL##*/}
36+
DIR_NAME=${ZIP_NAME%.*}
37+
unzip $DIR_NAME
38+
cp $DIR_NAME/*.onnx rapid_table/models/
39+
cd python/rapid_structure
40+
pip install -r requirements.txt
41+
pip install rapidocr_onnxruntime
42+
pytest tests/test_table.py
43+
44+
GenerateWHL_PushPyPi:
45+
needs: UnitTesting
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- uses: actions/checkout@v3
50+
51+
- name: Set up Python 3.7
52+
uses: actions/setup-python@v4
53+
with:
54+
python-version: '3.7'
55+
architecture: 'x64'
56+
57+
- name: Run setup
58+
run: |
59+
cd python/rapid_structure
60+
pip install -r requirements.txt
61+
wget $RESOURCES_URL
62+
ZIP_NAME=${RESOURCES_URL##*/}
63+
DIR_NAME=${ZIP_NAME%.*}
64+
unzip $ZIP_NAME
65+
mv $DIR_NAME/en_ppstructure_mobile_v2_SLANet.onnx rapid_table/models/
66+
python setup_table.py bdist_wheel ${{ github.event.head_commit.message }}
67+
68+
# - name: Publish distribution 📦 to Test PyPI
69+
# uses: pypa/gh-action-pypi-publish@v1.5.0
70+
# with:
71+
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
72+
# repository_url: https://test.pypi.org/legacy/
73+
# packages_dir: dist/
74+
75+
- name: Publish distribution 📦 to PyPI
76+
uses: pypa/gh-action-pypi-publish@v1.5.0
77+
with:
78+
password: ${{ secrets.RAPID_STRUCTURE }}
79+
packages_dir: dist/

0 commit comments

Comments
 (0)