dy-docs-tools 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. dy_docs_tools-0.1.0/.github/workflows/ci.yml +162 -0
  2. dy_docs_tools-0.1.0/.github/workflows/publish.yml +160 -0
  3. dy_docs_tools-0.1.0/.gitignore +164 -0
  4. dy_docs_tools-0.1.0/.idea/.gitignore +10 -0
  5. dy_docs_tools-0.1.0/.idea/inspectionProfiles/profiles_settings.xml +6 -0
  6. dy_docs_tools-0.1.0/.idea/misc.xml +7 -0
  7. dy_docs_tools-0.1.0/.idea/modules.xml +8 -0
  8. dy_docs_tools-0.1.0/.idea/tools.iml +11 -0
  9. dy_docs_tools-0.1.0/.idea/vcs.xml +6 -0
  10. dy_docs_tools-0.1.0/Cargo.lock +1076 -0
  11. dy_docs_tools-0.1.0/Cargo.toml +18 -0
  12. dy_docs_tools-0.1.0/PKG-INFO +368 -0
  13. dy_docs_tools-0.1.0/README.md +359 -0
  14. dy_docs_tools-0.1.0/docs/charts/505344_resolution_quality.svg +47 -0
  15. dy_docs_tools-0.1.0/docs/charts/benchmark_seq_vs_concurrent.svg +36 -0
  16. dy_docs_tools-0.1.0/docs/charts/optimization_overview.svg +155 -0
  17. dy_docs_tools-0.1.0/docs/charts/optimization_overview_landscape.svg +176 -0
  18. dy_docs_tools-0.1.0/docs/charts/optimization_ppt_cn.svg +180 -0
  19. dy_docs_tools-0.1.0/docs/charts/optimization_ppt_cn_505344.svg +173 -0
  20. dy_docs_tools-0.1.0/docs/charts/stress_memory_before_after.svg +36 -0
  21. dy_docs_tools-0.1.0/docs/charts/stress_round_times_before_after.svg +62 -0
  22. dy_docs_tools-0.1.0/pyproject.toml +17 -0
  23. dy_docs_tools-0.1.0/python/dy_docs_tools/__init__.py +157 -0
  24. dy_docs_tools-0.1.0/python/examples/demo.py +55 -0
  25. dy_docs_tools-0.1.0/scripts/benchmark_submit_to_pdf.py +273 -0
  26. dy_docs_tools-0.1.0/scripts/generate_comparison_charts.py +1084 -0
  27. dy_docs_tools-0.1.0/scripts/generate_ppt_cn_505344_report.py +371 -0
  28. dy_docs_tools-0.1.0/scripts/make_plain_dist.ps1 +50 -0
  29. dy_docs_tools-0.1.0/scripts/stress_submit_to_pdf_monitor.py +360 -0
  30. dy_docs_tools-0.1.0/scripts/test_submit_to_pdf.py +197 -0
  31. dy_docs_tools-0.1.0/scripts/verify.py +306 -0
  32. dy_docs_tools-0.1.0/src/lib.rs +3973 -0
  33. dy_docs_tools-0.1.0/uv.lock +8 -0
@@ -0,0 +1,162 @@
1
+ name: CI
2
+
3
+ "on":
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+ tags:
9
+ - "v*"
10
+ workflow_dispatch:
11
+
12
+ concurrency:
13
+ group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14
+ cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') }}
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ env:
20
+ CIBW_BUILD: cp311-*
21
+ CIBW_SKIP: pp* *-musllinux_*
22
+ PIP_DISABLE_PIP_VERSION_CHECK: "1"
23
+
24
+ jobs:
25
+ build-cibw:
26
+ runs-on: ${{ matrix.os }}
27
+ timeout-minutes: 30
28
+ permissions:
29
+ contents: write
30
+ strategy:
31
+ fail-fast: false
32
+ matrix:
33
+ include:
34
+ - os: ubuntu-latest
35
+ artifact_name: dist-linux-glibc-2_24
36
+ manylinux_image: quay.io/pypa/manylinux_2_24_x86_64:latest
37
+ build_sdist: true
38
+ publish_release: true
39
+
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+
43
+ - uses: actions/setup-python@v5
44
+ with:
45
+ python-version: "3.11"
46
+ cache: pip
47
+
48
+ - uses: dtolnay/rust-toolchain@stable
49
+
50
+ - uses: Swatinem/rust-cache@v2
51
+
52
+ - name: Install build tools
53
+ run: python -m pip install --upgrade pip cibuildwheel build
54
+
55
+ - name: Build wheels (one abi3 wheel per platform)
56
+ env:
57
+ CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
58
+ run: python -m cibuildwheel --output-dir wheelhouse
59
+
60
+ - name: Smoke test built wheel
61
+ run: |
62
+ python -m pip install --force-reinstall wheelhouse/*.whl
63
+ python - <<'PY'
64
+ import dy_docs_tools
65
+
66
+ assert dy_docs_tools.__all__ == ["submit_to_pdf", "submit_to_images"]
67
+ public_names = sorted(name for name in dir(dy_docs_tools) if not name.startswith("_"))
68
+ assert public_names == ["submit_to_images", "submit_to_pdf"], public_names
69
+ print("smoke-ok", public_names)
70
+ PY
71
+
72
+ - uses: actions/upload-artifact@v4
73
+ with:
74
+ name: ${{ matrix.artifact_name }}
75
+ path: wheelhouse/*.whl
76
+
77
+ - name: Build sdist
78
+ if: matrix.build_sdist
79
+ run: python -m build --sdist --outdir wheelhouse
80
+
81
+ - uses: actions/upload-artifact@v4
82
+ if: matrix.build_sdist
83
+ with:
84
+ name: dist-sdist
85
+ path: wheelhouse/*.tar.gz
86
+
87
+ - name: Publish assets to GitHub release
88
+ if: matrix.publish_release && startsWith(github.ref, 'refs/tags/v')
89
+ uses: softprops/action-gh-release@v2
90
+ with:
91
+ files: |
92
+ wheelhouse/*.whl
93
+ wheelhouse/*.tar.gz
94
+
95
+ build-linux-glibc-2_36:
96
+ runs-on: ubuntu-latest
97
+ timeout-minutes: 45
98
+ permissions:
99
+ contents: write
100
+ container:
101
+ image: debian:12
102
+
103
+ steps:
104
+ - name: Install system dependencies
105
+ run: |
106
+ apt-get update
107
+ apt-get install -y --no-install-recommends \
108
+ build-essential \
109
+ ca-certificates \
110
+ curl \
111
+ git \
112
+ patchelf \
113
+ pkg-config \
114
+ python3 \
115
+ python3-dev \
116
+ python3-pip \
117
+ python3-venv
118
+
119
+ - uses: actions/checkout@v4
120
+
121
+ - name: Install Rust
122
+ run: |
123
+ curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
124
+ . "$HOME/.cargo/env"
125
+ rustc --version
126
+
127
+ - name: Add Cargo to PATH
128
+ run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
129
+
130
+ - uses: Swatinem/rust-cache@v2
131
+
132
+ - name: Install Python build tools
133
+ run: python3 -m pip install --break-system-packages --upgrade pip maturin auditwheel
134
+
135
+ - name: Build wheel on glibc 2.36
136
+ run: |
137
+ mkdir -p wheelhouse/raw
138
+ maturin build --release --interpreter python3 --compatibility linux --out wheelhouse/raw
139
+ python3 -m auditwheel repair --plat manylinux_2_36_x86_64 wheelhouse/raw/*.whl -w wheelhouse
140
+
141
+ - name: Smoke test built wheel
142
+ run: |
143
+ python3 -m pip install --break-system-packages --force-reinstall wheelhouse/*.whl
144
+ python3 - <<'PY'
145
+ import dy_docs_tools
146
+
147
+ assert dy_docs_tools.__all__ == ["submit_to_pdf", "submit_to_images"]
148
+ public_names = sorted(name for name in dir(dy_docs_tools) if not name.startswith("_"))
149
+ assert public_names == ["submit_to_images", "submit_to_pdf"], public_names
150
+ print("smoke-ok", public_names)
151
+ PY
152
+
153
+ - uses: actions/upload-artifact@v4
154
+ with:
155
+ name: dist-linux-glibc-2_36
156
+ path: wheelhouse/*.whl
157
+
158
+ - name: Publish assets to GitHub release
159
+ if: startsWith(github.ref, 'refs/tags/v')
160
+ uses: softprops/action-gh-release@v2
161
+ with:
162
+ files: wheelhouse/*.whl
@@ -0,0 +1,160 @@
1
+ name: Publish
2
+
3
+ "on":
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ concurrency:
10
+ group: publish-${{ github.ref }}
11
+ cancel-in-progress: false
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ env:
17
+ CIBW_BUILD: cp311-*
18
+ CIBW_SKIP: pp* *-musllinux_*
19
+ PIP_DISABLE_PIP_VERSION_CHECK: "1"
20
+
21
+ jobs:
22
+ build:
23
+ runs-on: ${{ matrix.os }}
24
+ timeout-minutes: 30
25
+ strategy:
26
+ fail-fast: false
27
+ matrix:
28
+ include:
29
+ - os: ubuntu-latest
30
+ artifact_name: dist-linux-glibc-2_24
31
+ manylinux_image: quay.io/pypa/manylinux_2_24_x86_64:latest
32
+ build_sdist: true
33
+
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+
37
+ - uses: actions/setup-python@v5
38
+ with:
39
+ python-version: "3.11"
40
+ cache: pip
41
+
42
+ - uses: dtolnay/rust-toolchain@stable
43
+
44
+ - uses: Swatinem/rust-cache@v2
45
+
46
+ - name: Install build tools
47
+ run: python -m pip install --upgrade pip cibuildwheel build
48
+
49
+ - name: Build wheels
50
+ env:
51
+ CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
52
+ run: python -m cibuildwheel --output-dir dist
53
+
54
+ - name: Smoke test built wheel
55
+ run: |
56
+ python -m pip install --force-reinstall dist/*.whl
57
+ python - <<'PY'
58
+ import dy_docs_tools
59
+
60
+ assert dy_docs_tools.__all__ == ["submit_to_pdf", "submit_to_images"]
61
+ public_names = sorted(name for name in dir(dy_docs_tools) if not name.startswith("_"))
62
+ assert public_names == ["submit_to_images", "submit_to_pdf"], public_names
63
+ print("smoke-ok", public_names)
64
+ PY
65
+
66
+ - uses: actions/upload-artifact@v4
67
+ with:
68
+ name: ${{ matrix.artifact_name }}
69
+ path: dist/*.whl
70
+
71
+ - name: Build sdist
72
+ if: matrix.build_sdist
73
+ run: python -m build --sdist --outdir dist
74
+
75
+ - uses: actions/upload-artifact@v4
76
+ if: matrix.build_sdist
77
+ with:
78
+ name: dist-sdist
79
+ path: dist/*.tar.gz
80
+
81
+ build-linux-glibc-2_36:
82
+ runs-on: ubuntu-latest
83
+ timeout-minutes: 45
84
+ container:
85
+ image: debian:12
86
+
87
+ steps:
88
+ - name: Install system dependencies
89
+ run: |
90
+ apt-get update
91
+ apt-get install -y --no-install-recommends \
92
+ build-essential \
93
+ ca-certificates \
94
+ curl \
95
+ git \
96
+ patchelf \
97
+ pkg-config \
98
+ python3 \
99
+ python3-dev \
100
+ python3-pip \
101
+ python3-venv
102
+
103
+ - uses: actions/checkout@v4
104
+
105
+ - name: Install Rust
106
+ run: |
107
+ curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
108
+ . "$HOME/.cargo/env"
109
+ rustc --version
110
+
111
+ - name: Add Cargo to PATH
112
+ run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
113
+
114
+ - uses: Swatinem/rust-cache@v2
115
+
116
+ - name: Install Python build tools
117
+ run: python3 -m pip install --break-system-packages --upgrade pip maturin auditwheel
118
+
119
+ - name: Build wheel on glibc 2.36
120
+ run: |
121
+ mkdir -p wheelhouse/raw
122
+ maturin build --release --interpreter python3 --compatibility linux --out wheelhouse/raw
123
+ python3 -m auditwheel repair --plat manylinux_2_36_x86_64 wheelhouse/raw/*.whl -w wheelhouse
124
+
125
+ - name: Smoke test built wheel
126
+ run: |
127
+ python3 -m pip install --break-system-packages --force-reinstall wheelhouse/*.whl
128
+ python3 - <<'PY'
129
+ import dy_docs_tools
130
+
131
+ assert dy_docs_tools.__all__ == ["submit_to_pdf", "submit_to_images"]
132
+ public_names = sorted(name for name in dir(dy_docs_tools) if not name.startswith("_"))
133
+ assert public_names == ["submit_to_images", "submit_to_pdf"], public_names
134
+ print("smoke-ok", public_names)
135
+ PY
136
+
137
+ - uses: actions/upload-artifact@v4
138
+ with:
139
+ name: dist-linux-glibc-2_36
140
+ path: wheelhouse/*.whl
141
+
142
+ publish:
143
+ needs:
144
+ - build
145
+ - build-linux-glibc-2_36
146
+ runs-on: ubuntu-latest
147
+ timeout-minutes: 15
148
+ permissions:
149
+ id-token: write
150
+ contents: read
151
+
152
+ steps:
153
+ - uses: actions/download-artifact@v4
154
+ with:
155
+ pattern: dist-*
156
+ path: dist
157
+ merge-multiple: true
158
+
159
+ - name: Publish to PyPI
160
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,164 @@
1
+ ### Python template
2
+ # Byte-compiled / optimized / DLL files
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
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
+ # poetry
99
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
103
+ #poetry.lock
104
+
105
+ # pdm
106
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
107
+ #pdm.lock
108
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
109
+ # in version control.
110
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
111
+ .pdm.toml
112
+ .pdm-python
113
+ .pdm-build/
114
+
115
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116
+ __pypackages__/
117
+
118
+ # Celery stuff
119
+ celerybeat-schedule
120
+ celerybeat.pid
121
+
122
+ # SageMath parsed files
123
+ *.sage.py
124
+
125
+ # Environments
126
+ .env
127
+ .venv
128
+ env/
129
+ venv/
130
+ ENV/
131
+ env.bak/
132
+ venv.bak/
133
+
134
+ # Spyder project settings
135
+ .spyderproject
136
+ .spyproject
137
+
138
+ # Rope project settings
139
+ .ropeproject
140
+
141
+ # mkdocs documentation
142
+ /site
143
+
144
+ # mypy
145
+ .mypy_cache/
146
+ .dmypy.json
147
+ dmypy.json
148
+
149
+ # Pyre type checker
150
+ .pyre/
151
+
152
+ # pytype static type analyzer
153
+ .pytype/
154
+
155
+ # Cython debug symbols
156
+ cython_debug/
157
+
158
+ # PyCharm
159
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
162
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
163
+ #.idea/
164
+
@@ -0,0 +1,10 @@
1
+ # 默认忽略的文件
2
+ /shelf/
3
+ /workspace.xml
4
+ # 已忽略包含查询文件的默认文件夹
5
+ /queries/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
9
+ # 基于编辑器的 HTTP 客户端请求
10
+ /httpRequests/
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Black">
4
+ <option name="sdkName" value="Python 3.14 (tools)" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8" project-jdk-type="Python SDK" />
7
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/tools.iml" filepath="$PROJECT_DIR$/.idea/tools.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
6
+ <excludeFolder url="file://$MODULE_DIR$/.venv" />
7
+ </content>
8
+ <orderEntry type="jdk" jdkName="Python 3.8" jdkType="Python SDK" />
9
+ <orderEntry type="sourceFolder" forTests="false" />
10
+ </component>
11
+ </module>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>