Skip to content

Commit 51c2851

Browse files
committed
chore: Init commit
0 parents  commit 51c2851

31 files changed

+1838
-0
lines changed

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
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
Lines changed: 11 additions & 0 deletions
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

Lines changed: 18 additions & 0 deletions
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

Lines changed: 8 additions & 0 deletions
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

Lines changed: 23 additions & 0 deletions
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/[email protected]
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
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Push rapidocr_layout to pypi
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
env:
9+
RESOURCES_URL: https://github.com/RapidAI/RapidStructure/releases/download/v0.0.0/rapid_layout_models.zip
10+
11+
jobs:
12+
UnitTesting:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Pull latest code
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Python 3.10
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.10'
22+
architecture: 'x64'
23+
24+
- name: Display Python version
25+
run: python -c "import sys; print(sys.version)"
26+
27+
- name: Unit testings
28+
run: |
29+
wget $RESOURCES_URL
30+
ZIP_NAME=${RESOURCES_URL##*/}
31+
DIR_NAME=${ZIP_NAME%.*}
32+
33+
unzip $DIR_NAME
34+
cp $DIR_NAME/*.onnx rapid_layout/models/
35+
pip install -r requirements.txt
36+
pip install pytest wheel get_pypi_latest_version
37+
pytest tests/test_layout.py
38+
39+
GenerateWHL_PushPyPi:
40+
needs: UnitTesting
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- uses: actions/checkout@v3
45+
46+
- name: Run setup
47+
run: |
48+
pip install -r requirements.txt
49+
wget $RESOURCES_URL
50+
ZIP_NAME=${RESOURCES_URL##*/}
51+
DIR_NAME=${ZIP_NAME%.*}
52+
unzip $ZIP_NAME
53+
mv $DIR_NAME/*.onnx rapid_layout/models/
54+
python setup_layout.py bdist_wheel ${{ github.ref_name }}
55+
56+
- name: Publish distribution 📦 to PyPI
57+
uses: pypa/[email protected]
58+
with:
59+
password: ${{ secrets.RAPID_STRUCTURE }}
60+
packages_dir: dist/

.gitignore

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Python template
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
.pytest_cache
8+
9+
# C extensions
10+
*.so
11+
12+
# Distribution / packaging
13+
.Python
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
pip-wheel-metadata/
27+
share/python-wheels/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
MANIFEST
32+
33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
# *.manifest
37+
# *.spec
38+
*.res
39+
40+
# Installer logs
41+
pip-log.txt
42+
pip-delete-this-directory.txt
43+
44+
# Unit test / coverage reports
45+
htmlcov/
46+
.tox/
47+
.nox/
48+
.coverage
49+
.coverage.*
50+
.cache
51+
nosetests.xml
52+
coverage.xml
53+
*.cover
54+
*.py,cover
55+
.hypothesis/
56+
.pytest_cache/
57+
58+
# Translations
59+
*.mo
60+
*.pot
61+
62+
# Django stuff:
63+
*.log
64+
local_settings.py
65+
db.sqlite3
66+
db.sqlite3-journal
67+
68+
# Flask stuff:
69+
instance/
70+
.webassets-cache
71+
72+
# Scrapy stuff:
73+
.scrapy
74+
75+
# Sphinx documentation
76+
docs/_build/
77+
78+
# PyBuilder
79+
target/
80+
81+
# Jupyter Notebook
82+
.ipynb_checkpoints
83+
84+
# IPython
85+
profile_default/
86+
ipython_config.py
87+
88+
# pyenv
89+
.python-version
90+
91+
# pipenv
92+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
94+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
95+
# install all needed dependencies.
96+
#Pipfile.lock
97+
98+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
99+
__pypackages__/
100+
101+
# Celery stuff
102+
celerybeat-schedule
103+
celerybeat.pid
104+
105+
# SageMath parsed files
106+
*.sage.py
107+
108+
# Environments
109+
.env
110+
.venv
111+
env/
112+
venv/
113+
ENV/
114+
env.bak/
115+
venv.bak/
116+
117+
# Spyder project settings
118+
.spyderproject
119+
.spyproject
120+
121+
# Rope project settings
122+
.ropeproject
123+
124+
# mkdocs documentation
125+
/site
126+
127+
# mypy
128+
.mypy_cache/
129+
.dmypy.json
130+
dmypy.json
131+
132+
# Pyre type checker
133+
.pyre/
134+
135+
#idea
136+
.vs
137+
.vscode
138+
.idea
139+
/images
140+
/models
141+
142+
#models
143+
*.onnx
144+
145+
*.ttf
146+
*.ttc
147+
148+
long1.jpg
149+
150+
*.bin
151+
*.mapping
152+
*.xml
153+
154+
*.pdiparams
155+
*.pdiparams.info
156+
*.pdmodel
157+
158+
.DS_Store

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
repos:
2+
- repo: https://gitee.com/SWHL/autoflake
3+
rev: v2.1.1
4+
hooks:
5+
- id: autoflake
6+
args:
7+
[
8+
"--recursive",
9+
"--in-place",
10+
"--remove-all-unused-imports",
11+
"--remove-unused-variable",
12+
"--ignore-init-module-imports",
13+
]
14+
files: \.py$
15+
- repo: https://gitee.com/SWHL/black
16+
rev: 23.1.0
17+
hooks:
18+
- id: black
19+
files: \.py$

0 commit comments

Comments
 (0)