onnx-cse 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.
@@ -0,0 +1,23 @@
1
+ # This file is managed by Copier; DO NOT EDIT OR REMOVE.
2
+ _commit: v0.16.1
3
+ _src_path: git@github.com:Quantco/copier-template-python.git
4
+ add_windows_tests_to_ci: true
5
+ application: false
6
+ build_conda_package: false
7
+ build_docs: true
8
+ github_url: https://github.com/cbourjau/onnx-cse
9
+ github_user: cbourjau
10
+ lint_sql_dialect: none
11
+ minimal_python_version: py310
12
+ pixi_build: false
13
+ project_short_description: Common subexpression elimination for ONNX graphs
14
+ project_slug: onnx-cse
15
+ run_daily_tests: false
16
+ strip_jupyter_notebook_output: true
17
+ test_against_nightlies: false
18
+ use_committed: false
19
+ use_conda_comply: false
20
+ use_conventional_commits: false
21
+ use_devcontainer: false
22
+ use_mkdocs: true
23
+ use_zizmor: false
onnx_cse-0.1.0/.envrc ADDED
@@ -0,0 +1,4 @@
1
+ watch_file pixi.toml pixi.lock
2
+ eval "$(pixi shell-hook)"
3
+
4
+ dotenv_if_exists .env
@@ -0,0 +1,8 @@
1
+ * text=auto
2
+
3
+ *.{diff,patch} binary
4
+
5
+ *.{py,yaml,yml,sh} text eol=lf
6
+ *.bat text eol=crlf
7
+
8
+ pixi.lock merge=binary linguist-language=YAML linguist-generated=true
@@ -0,0 +1 @@
1
+ * @cbourjau
@@ -0,0 +1,20 @@
1
+ version: 2
2
+ registries:
3
+ github:
4
+ type: git
5
+ url: https://github.com
6
+ username: x-access-token
7
+ password: ${{ secrets.DEPENDABOT_CONTENT_PAT }}
8
+ updates:
9
+ - package-ecosystem: github-actions
10
+ directory: /
11
+ schedule:
12
+ interval: monthly
13
+ registries:
14
+ - github
15
+ groups:
16
+ gh-actions:
17
+ patterns:
18
+ - "*"
19
+ cooldown:
20
+ default-days: 7
@@ -0,0 +1,55 @@
1
+ name: CI
2
+ on: [push]
3
+
4
+ # Automatically stop old builds on the same branch/PR
5
+ concurrency:
6
+ group: ${{ github.workflow }}-${{ github.ref }}
7
+ cancel-in-progress: true
8
+
9
+ jobs:
10
+ lint:
11
+ name: Pre-commit Checks
12
+ timeout-minutes: 30
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ id-token: write
16
+ contents: read
17
+ steps:
18
+ - name: Check out branch
19
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20
+ with:
21
+ # needed for 'pre-commit-mirrors-insert-license'
22
+ fetch-depth: 0
23
+ - name: Set up pixi
24
+ uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
25
+ with:
26
+ environments: default lint
27
+ - name: pre-commit
28
+ run: pixi run pre-commit-run --color=always --show-diff-on-failure
29
+
30
+ unit-tests:
31
+ name: pytest
32
+ timeout-minutes: 30
33
+ runs-on: ${{ matrix.os }}
34
+ permissions:
35
+ id-token: write
36
+ contents: read
37
+ strategy:
38
+ fail-fast: false
39
+ matrix:
40
+ environment:
41
+ - py310
42
+ - default
43
+ os:
44
+ - ubuntu-latest
45
+ steps:
46
+ - name: Check out branch
47
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
48
+ - name: Set up pixi
49
+ uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
50
+ with:
51
+ environments: ${{ matrix.environment }}
52
+ - name: Install repository
53
+ run: pixi run -e ${{ matrix.environment }} postinstall
54
+ - name: Run pytest
55
+ run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes
@@ -0,0 +1,75 @@
1
+ name: Package
2
+ on: [push]
3
+
4
+ concurrency:
5
+ group: ${{ github.workflow }}-${{ github.ref }}
6
+ cancel-in-progress: true
7
+
8
+ permissions:
9
+ id-token: write
10
+ contents: read
11
+
12
+ jobs:
13
+ build:
14
+ name: Build Package
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Check out branch
18
+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
19
+ with:
20
+ fetch-depth: 0
21
+ - name: Set up pixi
22
+ uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
23
+ with:
24
+ environments: build
25
+ - name: Derive version
26
+ id: version
27
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
28
+ run: echo "version=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_OUTPUT
29
+ - name: Replace version
30
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
31
+ run: |
32
+ sed -i 's/0.0.0/${{ steps.version.outputs.version }}/g' pyproject.toml
33
+ - name: Build wheel
34
+ run: pixi run -e build build-wheel
35
+ - name: Upload package
36
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
37
+ with:
38
+ name: artifact
39
+ path: dist/*
40
+
41
+ # Calling the publish-action twice in the same job is not supported:
42
+ # https://github.com/pypa/gh-action-pypi-publish/issues/352
43
+ release-TestPyPi:
44
+ name: Publish package
45
+ if: startsWith(github.ref, 'refs/tags/')
46
+ needs: [build]
47
+ runs-on: ubuntu-latest
48
+ permissions:
49
+ id-token: write
50
+ environment: testpypi
51
+ steps:
52
+ - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
53
+ with:
54
+ name: artifact
55
+ path: dist
56
+ - name: Publish package on TestPyPi
57
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
58
+ with:
59
+ repository-url: https://test.pypi.org/legacy/
60
+
61
+ release-PyPi:
62
+ name: Publish package
63
+ if: startsWith(github.ref, 'refs/tags/')
64
+ needs: [build]
65
+ runs-on: ubuntu-latest
66
+ permissions:
67
+ id-token: write
68
+ environment: pypi
69
+ steps:
70
+ - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
71
+ with:
72
+ name: artifact
73
+ path: dist
74
+ - name: Publish package on PyPi
75
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
@@ -0,0 +1,32 @@
1
+ name: uv-based tests
2
+ on: [push]
3
+
4
+ # Automatically stop old builds on the same branch/PR
5
+ concurrency:
6
+ group: ${{ github.workflow }}-${{ github.ref }}
7
+ cancel-in-progress: true
8
+
9
+ jobs:
10
+ uv-tests:
11
+ name: python
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v6
16
+
17
+ - name: "Set up Python"
18
+ uses: actions/setup-python@v6
19
+ with:
20
+ python-version-file: "pyproject.toml"
21
+
22
+ - name: "Install uv"
23
+ uses: astral-sh/setup-uv@v7
24
+ with:
25
+ enable-cache: true
26
+
27
+ - name: "Install the project"
28
+ run: uv sync --all-extras --dev
29
+
30
+ - name: "Run tests"
31
+ # For example, using `pytest`
32
+ run: uv run pytest tests
@@ -0,0 +1,395 @@
1
+ # Explicitly unignore hidden files for ripgrep. Individual folders can still
2
+ # be ignored in the blocks below.
3
+ !.*
4
+
5
+ # NOTE: The block below is NOT copied sic from https://www.toptal.com/developers/gitignore.
6
+ # Instead, it contains some customizations that should be taken into account when adjusting the
7
+ # block.
8
+
9
+ # Created by https://www.toptal.com/developers/gitignore/api/vim,linux,macos,python,windows,pycharm+all,visualstudiocode
10
+ # Edit at https://www.toptal.com/developers/gitignore?templates=vim,linux,macos,python,windows,pycharm+all,visualstudiocode
11
+
12
+ ### Linux ###
13
+ *~
14
+
15
+ # temporary files which can be created if a process still has a handle open of a deleted file
16
+ .fuse_hidden*
17
+
18
+ # KDE directory preferences
19
+ .directory
20
+
21
+ # Linux trash folder which might appear on any partition or disk
22
+ .Trash-*
23
+
24
+ # .nfs files are created when an open file is removed but is still being accessed
25
+ .nfs*
26
+
27
+ ### macOS ###
28
+ # General
29
+ .DS_Store
30
+ .AppleDouble
31
+ .LSOverride
32
+
33
+ # Icon must end with two \r
34
+ Icon
35
+
36
+
37
+ # Thumbnails
38
+ ._*
39
+
40
+ # Files that might appear in the root of a volume
41
+ .DocumentRevisions-V100
42
+ .fseventsd
43
+ .Spotlight-V100
44
+ .TemporaryItems
45
+ .Trashes
46
+ .VolumeIcon.icns
47
+ .com.apple.timemachine.donotpresent
48
+
49
+ # Directories potentially created on remote AFP share
50
+ .AppleDB
51
+ .AppleDesktop
52
+ Network Trash Folder
53
+ Temporary Items
54
+ .apdisk
55
+
56
+ ### macOS Patch ###
57
+ # iCloud generated files
58
+ *.icloud
59
+
60
+ ### PyCharm+all ###
61
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
62
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
63
+
64
+ # User-specific stuff
65
+ .idea/**/workspace.xml
66
+ .idea/**/tasks.xml
67
+ .idea/**/usage.statistics.xml
68
+ .idea/**/dictionaries
69
+ .idea/**/shelf
70
+
71
+ # AWS User-specific
72
+ .idea/**/aws.xml
73
+
74
+ # Generated files
75
+ .idea/**/contentModel.xml
76
+
77
+ # Sensitive or high-churn files
78
+ .idea/**/dataSources/
79
+ .idea/**/dataSources.ids
80
+ .idea/**/dataSources.local.xml
81
+ .idea/**/sqlDataSources.xml
82
+ .idea/**/dynamic.xml
83
+ .idea/**/uiDesigner.xml
84
+ .idea/**/dbnavigator.xml
85
+
86
+ # Gradle
87
+ .idea/**/gradle.xml
88
+ .idea/**/libraries
89
+
90
+ # Gradle and Maven with auto-import
91
+ # When using Gradle or Maven with auto-import, you should exclude module files,
92
+ # since they will be recreated, and may cause churn. Uncomment if using
93
+ # auto-import.
94
+ # .idea/artifacts
95
+ # .idea/compiler.xml
96
+ # .idea/jarRepositories.xml
97
+ # .idea/modules.xml
98
+ # .idea/*.iml
99
+ # .idea/modules
100
+ # *.iml
101
+ # *.ipr
102
+
103
+ # CMake
104
+ cmake-build-*/
105
+
106
+ # Mongo Explorer plugin
107
+ .idea/**/mongoSettings.xml
108
+
109
+ # File-based project format
110
+ *.iws
111
+
112
+ # IntelliJ
113
+ out/
114
+
115
+ # mpeltonen/sbt-idea plugin
116
+ .idea_modules/
117
+
118
+ # JIRA plugin
119
+ atlassian-ide-plugin.xml
120
+
121
+ # Cursive Clojure plugin
122
+ .idea/replstate.xml
123
+
124
+ # SonarLint plugin
125
+ .idea/sonarlint/
126
+
127
+ # Crashlytics plugin (for Android Studio and IntelliJ)
128
+ com_crashlytics_export_strings.xml
129
+ crashlytics.properties
130
+ crashlytics-build.properties
131
+ fabric.properties
132
+
133
+ # Editor-based Rest Client
134
+ .idea/httpRequests
135
+
136
+ # Android studio 3.1+ serialized cache file
137
+ .idea/caches/build_file_checksums.ser
138
+
139
+ ### PyCharm+all Patch ###
140
+ # Ignore everything but code style settings and run configurations
141
+ # that are supposed to be shared within teams.
142
+
143
+ .idea/*
144
+
145
+ !.idea/codeStyles
146
+ !.idea/runConfigurations
147
+
148
+ ### Python ###
149
+ # Byte-compiled / optimized / DLL files
150
+ __pycache__/
151
+ *.py[cod]
152
+ *$py.class
153
+
154
+ # C extensions
155
+ *.so
156
+
157
+ # Distribution / packaging
158
+ .Python
159
+ build/
160
+ develop-eggs/
161
+ dist/
162
+ downloads/
163
+ eggs/
164
+ .eggs/
165
+ lib/
166
+ lib64/
167
+ parts/
168
+ sdist/
169
+ var/
170
+ wheels/
171
+ share/python-wheels/
172
+ *.egg-info/
173
+ .installed.cfg
174
+ *.egg
175
+ MANIFEST
176
+
177
+ # PyInstaller
178
+ # Usually these files are written by a python script from a template
179
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
180
+ *.manifest
181
+ *.spec
182
+
183
+ # Installer logs
184
+ pip-log.txt
185
+ pip-delete-this-directory.txt
186
+
187
+ # Unit test / coverage reports
188
+ htmlcov/
189
+ .tox/
190
+ .nox/
191
+ .coverage
192
+ .coverage.*
193
+ .cache
194
+ nosetests.xml
195
+ coverage.xml
196
+ *.cover
197
+ *.py,cover
198
+ .hypothesis/
199
+ .pytest_cache/
200
+ cover/
201
+
202
+ # Translations
203
+ *.mo
204
+ *.pot
205
+
206
+ # Django stuff:
207
+ *.log
208
+ local_settings.py
209
+ db.sqlite3
210
+ db.sqlite3-journal
211
+
212
+ # Flask stuff:
213
+ instance/
214
+ .webassets-cache
215
+
216
+ # Scrapy stuff:
217
+ .scrapy
218
+
219
+ # Sphinx documentation
220
+ docs/_build/
221
+
222
+ # PyBuilder
223
+ .pybuilder/
224
+ target/
225
+
226
+ # Jupyter Notebook
227
+ .ipynb_checkpoints
228
+
229
+ # IPython
230
+ profile_default/
231
+ ipython_config.py
232
+
233
+ # pyenv
234
+ # For a library or package, you might want to ignore these files since the code is
235
+ # intended to run in multiple environments; otherwise, check them in:
236
+ # .python-version
237
+
238
+ # pipenv
239
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
240
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
241
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
242
+ # install all needed dependencies.
243
+ #Pipfile.lock
244
+
245
+ # poetry
246
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
247
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
248
+ # commonly ignored for libraries.
249
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
250
+ #poetry.lock
251
+
252
+ # pixi
253
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
254
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
255
+ # commonly ignored for libraries.
256
+ .pixi
257
+ #pixi.lock
258
+
259
+ # pdm
260
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
261
+ #pdm.lock
262
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
263
+ # in version control.
264
+ # https://pdm.fming.dev/#use-with-ide
265
+ .pdm.toml
266
+
267
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
268
+ __pypackages__/
269
+
270
+ # Celery stuff
271
+ celerybeat-schedule
272
+ celerybeat.pid
273
+
274
+ # SageMath parsed files
275
+ *.sage.py
276
+
277
+ # Environments
278
+ .env
279
+ .venv
280
+ env/
281
+ venv/
282
+ ENV/
283
+ env.bak/
284
+ venv.bak/
285
+
286
+ # Spyder project settings
287
+ .spyderproject
288
+ .spyproject
289
+
290
+ # Rope project settings
291
+ .ropeproject
292
+
293
+ # mkdocs documentation
294
+ /site
295
+
296
+ # mypy
297
+ .mypy_cache/
298
+ .dmypy.json
299
+ dmypy.json
300
+
301
+ # Pyre type checker
302
+ .pyre/
303
+
304
+ # pytype static type analyzer
305
+ .pytype/
306
+
307
+ # Cython debug symbols
308
+ cython_debug/
309
+
310
+ # PyCharm
311
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
312
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
313
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
314
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
315
+ .idea/
316
+
317
+ ### Python Patch ###
318
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
319
+ poetry.toml
320
+
321
+ # ruff
322
+ .ruff_cache/
323
+
324
+ # LSP config files
325
+ pyrightconfig.json
326
+
327
+ ### Vim ###
328
+ # Swap
329
+ [._]*.s[a-v][a-z]
330
+ !*.svg # comment out if you don't need vector files
331
+ [._]*.sw[a-p]
332
+ [._]s[a-rt-v][a-z]
333
+ [._]ss[a-gi-z]
334
+ [._]sw[a-p]
335
+
336
+ # Session
337
+ Session.vim
338
+ Sessionx.vim
339
+
340
+ # Temporary
341
+ .netrwhist
342
+ # Auto-generated tag files
343
+ # tags # Removed as being too broad, see https://github.com/Quantco/copier-template-python/pull/161
344
+ # Persistent undo
345
+ [._]*.un~
346
+
347
+ ### VisualStudioCode ###
348
+ .vscode/
349
+ #!.vscode/settings.json
350
+ #!.vscode/tasks.json
351
+ #!.vscode/launch.json
352
+ #!.vscode/extensions.json
353
+ #!.vscode/*.code-snippets
354
+
355
+ # Local History for Visual Studio Code
356
+ .history/
357
+
358
+ # Built Visual Studio Code Extensions
359
+ *.vsix
360
+
361
+ ### VisualStudioCode Patch ###
362
+ # Ignore all local history of files
363
+ .history
364
+ .ionide
365
+
366
+ ### Windows ###
367
+ # Windows thumbnail cache files
368
+ Thumbs.db
369
+ Thumbs.db:encryptable
370
+ ehthumbs.db
371
+ ehthumbs_vista.db
372
+
373
+ # Dump file
374
+ *.stackdump
375
+
376
+ # Folder config file
377
+ [Dd]esktop.ini
378
+
379
+ # Recycle Bin used on file shares
380
+ $RECYCLE.BIN/
381
+
382
+ # Windows Installer files
383
+ *.cab
384
+ *.msi
385
+ *.msix
386
+ *.msm
387
+ *.msp
388
+
389
+ # Windows shortcuts
390
+ *.lnk
391
+
392
+ # End of https://www.toptal.com/developers/gitignore/api/vim,linux,macos,python,windows,pycharm+all,visualstudiocode
393
+
394
+ # rattler-build
395
+ output/
@@ -0,0 +1,81 @@
1
+ exclude: ^\.copier-answers\.yml$
2
+ repos:
3
+ - repo: local
4
+ hooks:
5
+ # ensure pixi environments are up to date
6
+ # workaround for https://github.com/prefix-dev/pixi/issues/1482
7
+ - id: pixi-install
8
+ name: pixi-install
9
+ entry: pixi install -e default -e lint
10
+ language: system
11
+ always_run: true
12
+ require_serial: true
13
+ pass_filenames: false
14
+ # docformatter
15
+ - id: docformatter
16
+ name: docformatter
17
+ entry: pixi run -e lint docformatter -i
18
+ language: system
19
+ types: [python]
20
+ # ruff
21
+ - id: ruff
22
+ name: ruff
23
+ entry: pixi run -e lint ruff check --fix --exit-non-zero-on-fix --force-exclude
24
+ language: system
25
+ types_or: [python, pyi]
26
+ require_serial: true
27
+ - id: ruff-format
28
+ name: ruff-format
29
+ entry: pixi run -e lint ruff format --force-exclude
30
+ language: system
31
+ types_or: [python, pyi]
32
+ require_serial: true
33
+ # mypy
34
+ - id: mypy
35
+ name: mypy
36
+ entry: pixi run -e default mypy
37
+ language: system
38
+ types_or: [python, pyi]
39
+ require_serial: true
40
+ # prettier
41
+ - id: prettier
42
+ name: prettier
43
+ entry: pixi run -e lint prettier --write --list-different --ignore-unknown
44
+ language: system
45
+ types: [text]
46
+ files: \.(md|yml|yaml)$
47
+ # nbstripout
48
+ - id: nbstripout
49
+ name: nbstripout
50
+ entry: pixi run -e lint nbstripout
51
+ language: system
52
+ types: [jupyter]
53
+ # taplo
54
+ - id: taplo
55
+ name: taplo
56
+ entry: pixi run -e lint taplo format
57
+ language: system
58
+ types: [toml]
59
+ # pre-commit-hooks
60
+ - id: trailing-whitespace-fixer
61
+ name: trailing-whitespace-fixer
62
+ entry: pixi run -e lint trailing-whitespace-fixer
63
+ language: system
64
+ types: [text]
65
+ - id: end-of-file-fixer
66
+ name: end-of-file-fixer
67
+ entry: pixi run -e lint end-of-file-fixer
68
+ language: system
69
+ types: [text]
70
+ - id: check-merge-conflict
71
+ name: check-merge-conflict
72
+ entry: pixi run -e lint check-merge-conflict --assume-in-merge
73
+ language: system
74
+ types: [text]
75
+ # typos
76
+ - id: typos
77
+ name: typos
78
+ entry: pixi run -e lint typos --force-exclude
79
+ language: system
80
+ types: [text]
81
+ require_serial: true
@@ -0,0 +1,6 @@
1
+ build
2
+ conda.recipe
3
+ .copier-answers.yml
4
+
5
+ *.html
6
+ *.properties