Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
1d3d63ab
Commit
1d3d63ab
authored
Jul 03, 2024
by
赵小蒙
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
7c2f8bd9
89fe33b2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
18 deletions
+13
-18
benchmark.yml
.github/workflows/benchmark.yml
+3
-7
cli.yml
.github/workflows/cli.yml
+4
-3
conf.py
tests/test_cli/conf/conf.py
+1
-1
benchmark.py
tools/benchmark.py
+5
-7
No files found.
.github/workflows/benchmark.yml
View file @
1d3d63ab
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name
:
PDF
name
:
mineru
on
:
on
:
push
:
push
:
branches
:
branches
:
...
@@ -18,7 +18,7 @@ on:
...
@@ -18,7 +18,7 @@ on:
workflow_dispatch
:
workflow_dispatch
:
jobs
:
jobs
:
pdf-test
:
pdf-test
:
runs-on
:
pdf
runs-on
:
mineru
timeout-minutes
:
180
timeout-minutes
:
180
strategy
:
strategy
:
fail-fast
:
true
fail-fast
:
true
...
@@ -37,12 +37,8 @@ jobs:
...
@@ -37,12 +37,8 @@ jobs:
echo $changed_files
echo $changed_files
if [[ $changed_files =~ "requirements.txt" ]]; then
if [[ $changed_files =~ "requirements.txt" ]]; then
pip install -r requirements.txt
pip install -r requirements.txt
pip install -r requirements-qa.txt
fi
fi
-
name
:
config-net-reset
run
:
|
export http_proxy=""
export https_proxy=""
-
name
:
get-benchmark-result
-
name
:
get-benchmark-result
run
:
|
run
:
|
echo "start test"
echo "start test"
...
...
.github/workflows/cli.yml
View file @
1d3d63ab
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name
:
PDF
name
:
mineru
on
:
on
:
push
:
push
:
branches
:
branches
:
...
@@ -18,7 +18,7 @@ on:
...
@@ -18,7 +18,7 @@ on:
workflow_dispatch
:
workflow_dispatch
:
jobs
:
jobs
:
cli-test
:
cli-test
:
runs-on
:
pdf
runs-on
:
mineru
timeout-minutes
:
40
timeout-minutes
:
40
strategy
:
strategy
:
fail-fast
:
true
fail-fast
:
true
...
@@ -38,6 +38,7 @@ jobs:
...
@@ -38,6 +38,7 @@ jobs:
echo $changed_files
echo $changed_files
if [[ $changed_files =~ "requirements.txt" ]]; then
if [[ $changed_files =~ "requirements.txt" ]]; then
pip install -r requirements.txt
pip install -r requirements.txt
pip install -r requirements-qa.txt
fi
fi
-
name
:
config-net-reset
-
name
:
config-net-reset
...
@@ -53,7 +54,7 @@ jobs:
...
@@ -53,7 +54,7 @@ jobs:
notify_to_feishu
:
notify_to_feishu
:
if
:
${{ always() && !cancelled() && contains(needs.*.result, 'failure') && (github.ref_name == 'master') }}
if
:
${{ always() && !cancelled() && contains(needs.*.result, 'failure') && (github.ref_name == 'master') }}
needs
:
[
cli-test
]
needs
:
[
cli-test
]
runs-on
:
pdf
runs-on
:
mineru
steps
:
steps
:
-
name
:
get_actor
-
name
:
get_actor
run
:
|
run
:
|
...
...
tests/test_cli/conf/conf.py
View file @
1d3d63ab
...
@@ -2,7 +2,7 @@ import os
...
@@ -2,7 +2,7 @@ import os
conf
=
{
conf
=
{
"code_path"
:
os
.
environ
.
get
(
'GITHUB_WORKSPACE'
),
"code_path"
:
os
.
environ
.
get
(
'GITHUB_WORKSPACE'
),
"pdf_dev_path"
:
os
.
environ
.
get
(
'GITHUB_WORKSPACE'
)
+
"/tests/test_cli/pdf_dev"
,
"pdf_dev_path"
:
os
.
environ
.
get
(
'GITHUB_WORKSPACE'
)
+
"/tests/test_cli/pdf_dev"
,
"pdf_res_path"
:
"/
home/quyuan/code/Magic-PDF/Magic-PDF/Magic-PDF/ci
"
"pdf_res_path"
:
"/
share/quyuan/mineru/data/mineru
"
}
}
tools/benchmark.py
View file @
1d3d63ab
...
@@ -4,15 +4,13 @@ import shutil
...
@@ -4,15 +4,13 @@ import shutil
import
json
import
json
import
markdown_calculate
import
markdown_calculate
code_path
=
os
.
environ
.
get
(
'GITHUB_WORKSPACE'
)
code_path
=
os
.
environ
.
get
(
'GITHUB_WORKSPACE'
)
#code_path = "/home/quyuan/actions-runner/_work/Magic-PDF/Magic-PDF.bk"
#数据集存放路径
#评测集存放路径
pdf_dev_path
=
"/share/quyuan/mineru/data/"
pdf_dev_path
=
"/home/quyuan/data"
#magicpdf最终结果
#magicpdf跑测结果
pdf_res_path
=
"/share/quyuan/mineru/data/mineru"
pdf_res_path
=
"/home/quyuan/code/Magic-PDF/Magic-PDF/Magic-PDF/ci/magic-pdf"
file_types
=
[
"academic_literature"
,
"atlas"
,
"courseware"
,
"colorful_textbook"
,
"historical_documents"
,
"notes"
,
"ordinary_books"
,
"ordinary_exam_paper"
,
"ordinary_textbook"
,
"research_report"
,
"special_exam_paper"
]
file_types
=
[
"academic_literature"
,
"atlas"
,
"courseware"
,
"colorful_textbook"
,
"historical_documents"
,
"notes"
,
"ordinary_books"
,
"ordinary_exam_paper"
,
"ordinary_textbook"
,
"research_report"
,
"special_exam_paper"
]
#file_types = ["academic_literature"]
def
test_cli
():
def
test_cli
():
#magicpdf模型输出结果
magicpdf_path
=
os
.
path
.
join
(
pdf_dev_path
,
"output"
)
magicpdf_path
=
os
.
path
.
join
(
pdf_dev_path
,
"output"
)
rm_cmd
=
"rm -rf
%
s"
%
(
pdf_res_path
)
rm_cmd
=
"rm -rf
%
s"
%
(
pdf_res_path
)
os
.
system
(
rm_cmd
)
os
.
system
(
rm_cmd
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment