kfnetlist 0.1.2__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.
- kfnetlist-0.1.2/.github/workflows/docs.yml +38 -0
- kfnetlist-0.1.2/.github/workflows/pages.yml +78 -0
- kfnetlist-0.1.2/.github/workflows/pre-commit.yml +16 -0
- kfnetlist-0.1.2/.github/workflows/release.yml +82 -0
- kfnetlist-0.1.2/.github/workflows/test.yml +29 -0
- kfnetlist-0.1.2/.gitignore +35 -0
- kfnetlist-0.1.2/.pre-commit-config.yaml +46 -0
- kfnetlist-0.1.2/Cargo.lock +279 -0
- kfnetlist-0.1.2/Cargo.toml +20 -0
- kfnetlist-0.1.2/Justfile +35 -0
- kfnetlist-0.1.2/LICENSE +201 -0
- kfnetlist-0.1.2/PKG-INFO +27 -0
- kfnetlist-0.1.2/README.md +98 -0
- kfnetlist-0.1.2/docs/overrides/main.html +11 -0
- kfnetlist-0.1.2/docs/scripts/build_docs_source.py +449 -0
- kfnetlist-0.1.2/docs/source/changelog.md +14 -0
- kfnetlist-0.1.2/docs/source/concepts/netlist_model.py +188 -0
- kfnetlist-0.1.2/docs/source/concepts/ports_and_refs.py +136 -0
- kfnetlist-0.1.2/docs/source/concepts/serialization.py +165 -0
- kfnetlist-0.1.2/docs/source/extraction/electrical_l2n.md +54 -0
- kfnetlist-0.1.2/docs/source/extraction/optical_nets.md +58 -0
- kfnetlist-0.1.2/docs/source/extraction/overview.md +84 -0
- kfnetlist-0.1.2/docs/source/extraction/port_checking.py +110 -0
- kfnetlist-0.1.2/docs/source/getting_started/installation.md +53 -0
- kfnetlist-0.1.2/docs/source/getting_started/quickstart.py +143 -0
- kfnetlist-0.1.2/docs/source/guides/equivalent_ports.py +149 -0
- kfnetlist-0.1.2/docs/source/guides/faq.md +78 -0
- kfnetlist-0.1.2/docs/source/guides/instance_flattening.py +101 -0
- kfnetlist-0.1.2/docs/source/index.md +78 -0
- kfnetlist-0.1.2/docs/zensical.yml +84 -0
- kfnetlist-0.1.2/pyproject.toml +82 -0
- kfnetlist-0.1.2/src/instance.rs +230 -0
- kfnetlist-0.1.2/src/kfnetlist/__init__.py +26 -0
- kfnetlist-0.1.2/src/kfnetlist/_native.pyi +155 -0
- kfnetlist-0.1.2/src/kfnetlist/extract/__init__.py +11 -0
- kfnetlist-0.1.2/src/kfnetlist/extract/_algo.py +306 -0
- kfnetlist-0.1.2/src/kfnetlist/extract/_geometry.py +236 -0
- kfnetlist-0.1.2/src/kfnetlist/extract/_l2n.py +99 -0
- kfnetlist-0.1.2/src/kfnetlist/extract/_settings.py +71 -0
- kfnetlist-0.1.2/src/kfnetlist/port_check.py +118 -0
- kfnetlist-0.1.2/src/kfnetlist/py.typed +0 -0
- kfnetlist-0.1.2/src/lib.rs +145 -0
- kfnetlist-0.1.2/src/net.rs +232 -0
- kfnetlist-0.1.2/src/netlist.rs +592 -0
- kfnetlist-0.1.2/src/port.rs +286 -0
- kfnetlist-0.1.2/tests/test_lvs_equivalent.py +132 -0
- kfnetlist-0.1.2/tests/test_netlist_model.py +223 -0
- kfnetlist-0.1.2/tests/test_port_check.py +185 -0
- kfnetlist-0.1.2/tests/test_ports_smoke.py +181 -0
- kfnetlist-0.1.2/uv.lock +1407 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "0 */12 * * *"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test_docs:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
python-version:
|
|
18
|
+
- "3.13"
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v6
|
|
22
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
23
|
+
- uses: astral-sh/setup-uv@v7
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
- uses: extractions/setup-just@v4
|
|
27
|
+
- name: Cache executed notebooks
|
|
28
|
+
uses: actions/cache@v4
|
|
29
|
+
with:
|
|
30
|
+
path: |
|
|
31
|
+
docs/.build-cache
|
|
32
|
+
docs/source-built
|
|
33
|
+
key: docs-source-built-${{ matrix.python-version }}-${{ hashFiles('docs/source/**/*.py', 'docs/source/**/*.md', 'src/kfnetlist/**/*.py', 'docs/scripts/build_docs_source.py') }}
|
|
34
|
+
restore-keys: |
|
|
35
|
+
docs-source-built-${{ matrix.python-version }}-
|
|
36
|
+
|
|
37
|
+
- name: Build docs
|
|
38
|
+
run: just docs
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: docs to gh-pages
|
|
2
|
+
|
|
3
|
+
# Multi-version deployment via mike (zensical fork, pinned in pyproject.toml):
|
|
4
|
+
# push to main → `dev` version (always tracks latest main)
|
|
5
|
+
# push to vX.Y.Z → `<X.Y.Z>` version + `latest` alias (set as default)
|
|
6
|
+
#
|
|
7
|
+
# Requires: GitHub Pages source set to "Deploy from a branch" → gh-pages
|
|
8
|
+
|
|
9
|
+
on:
|
|
10
|
+
push:
|
|
11
|
+
branches:
|
|
12
|
+
- main
|
|
13
|
+
tags:
|
|
14
|
+
- "v[0-9]+.[0-9]+.[0-9]+*"
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: write # mike pushes to gh-pages
|
|
19
|
+
|
|
20
|
+
concurrency:
|
|
21
|
+
group: docs-deploy
|
|
22
|
+
cancel-in-progress: false
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
deploy:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v6
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0 # mike needs full history of gh-pages
|
|
31
|
+
|
|
32
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
33
|
+
- uses: astral-sh/setup-uv@v7
|
|
34
|
+
- uses: extractions/setup-just@v4
|
|
35
|
+
|
|
36
|
+
- name: Cache executed notebooks
|
|
37
|
+
uses: actions/cache@v4
|
|
38
|
+
with:
|
|
39
|
+
path: |
|
|
40
|
+
docs/.build-cache
|
|
41
|
+
docs/source-built
|
|
42
|
+
key: docs-source-built-3.14-${{ hashFiles('docs/source/**/*.py', 'docs/source/**/*.md', 'src/kfnetlist/**/*.py', 'docs/scripts/build_docs_source.py') }}
|
|
43
|
+
restore-keys: |
|
|
44
|
+
docs-source-built-3.14-
|
|
45
|
+
|
|
46
|
+
- name: Pre-build docs source (notebooks → md, API ref stubs)
|
|
47
|
+
run: just docs-build-source
|
|
48
|
+
|
|
49
|
+
- name: Configure git for mike
|
|
50
|
+
run: |
|
|
51
|
+
git config --global user.name "github-actions[bot]"
|
|
52
|
+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
53
|
+
git fetch origin gh-pages --depth=1 || echo "no gh-pages branch yet"
|
|
54
|
+
|
|
55
|
+
- name: Deploy main → dev version
|
|
56
|
+
if: github.ref == 'refs/heads/main'
|
|
57
|
+
run: |
|
|
58
|
+
uv run --with . --extra docs --isolated mike deploy \
|
|
59
|
+
--config-file docs/zensical-built.yml \
|
|
60
|
+
--alias-type=redirect \
|
|
61
|
+
--push \
|
|
62
|
+
--update-aliases \
|
|
63
|
+
dev
|
|
64
|
+
|
|
65
|
+
- name: Deploy tagged release → <version> + latest alias
|
|
66
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
67
|
+
run: |
|
|
68
|
+
VERSION="${GITHUB_REF#refs/tags/v}"
|
|
69
|
+
uv run --with . --extra docs --isolated mike deploy \
|
|
70
|
+
--config-file docs/zensical-built.yml \
|
|
71
|
+
--alias-type=redirect \
|
|
72
|
+
--push \
|
|
73
|
+
--update-aliases \
|
|
74
|
+
"$VERSION" latest
|
|
75
|
+
uv run --with . --extra docs --isolated mike set-default \
|
|
76
|
+
--config-file docs/zensical-built.yml \
|
|
77
|
+
--push \
|
|
78
|
+
latest
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Pre-Commit
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
pre-commit:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v6
|
|
15
|
+
- uses: actions/setup-python@v6
|
|
16
|
+
- uses: pre-commit/action@v3.0.1
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: "v*"
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
# Build wheels for each platform using maturin
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
include:
|
|
18
|
+
- os: ubuntu-latest
|
|
19
|
+
target: x86_64
|
|
20
|
+
- os: ubuntu-latest
|
|
21
|
+
target: aarch64
|
|
22
|
+
- os: macos-latest
|
|
23
|
+
target: x86_64
|
|
24
|
+
- os: macos-latest
|
|
25
|
+
target: aarch64
|
|
26
|
+
- os: windows-latest
|
|
27
|
+
target: x86_64
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v6
|
|
30
|
+
|
|
31
|
+
- uses: actions/setup-python@v6
|
|
32
|
+
with:
|
|
33
|
+
python-version: "3.12"
|
|
34
|
+
|
|
35
|
+
- name: Build wheels
|
|
36
|
+
uses: PyO3/maturin-action@v1
|
|
37
|
+
with:
|
|
38
|
+
target: ${{ matrix.target }}
|
|
39
|
+
args: --release --out dist
|
|
40
|
+
manylinux: auto
|
|
41
|
+
|
|
42
|
+
- name: Upload wheels
|
|
43
|
+
uses: actions/upload-artifact@v4
|
|
44
|
+
with:
|
|
45
|
+
name: wheels-${{ matrix.os }}-${{ matrix.target }}
|
|
46
|
+
path: dist
|
|
47
|
+
|
|
48
|
+
# Build the source distribution
|
|
49
|
+
sdist:
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v6
|
|
53
|
+
|
|
54
|
+
- name: Build sdist
|
|
55
|
+
uses: PyO3/maturin-action@v1
|
|
56
|
+
with:
|
|
57
|
+
command: sdist
|
|
58
|
+
args: --out dist
|
|
59
|
+
|
|
60
|
+
- name: Upload sdist
|
|
61
|
+
uses: actions/upload-artifact@v4
|
|
62
|
+
with:
|
|
63
|
+
name: wheels-sdist
|
|
64
|
+
path: dist
|
|
65
|
+
|
|
66
|
+
# Publish all artifacts to PyPI
|
|
67
|
+
publish:
|
|
68
|
+
needs: [build, sdist]
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
environment: pypi
|
|
71
|
+
permissions:
|
|
72
|
+
id-token: write # trusted publishing
|
|
73
|
+
steps:
|
|
74
|
+
- name: Download all artifacts
|
|
75
|
+
uses: actions/download-artifact@v4
|
|
76
|
+
with:
|
|
77
|
+
pattern: wheels-*
|
|
78
|
+
merge-multiple: true
|
|
79
|
+
path: dist
|
|
80
|
+
|
|
81
|
+
- name: Publish to PyPI
|
|
82
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: pytest
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "0 */12 * * *"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
runs-on: ${{ matrix.os }}
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
python-version:
|
|
19
|
+
- "3.12"
|
|
20
|
+
- "3.13"
|
|
21
|
+
- "3.14"
|
|
22
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v6
|
|
25
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
26
|
+
- uses: astral-sh/setup-uv@v7
|
|
27
|
+
- uses: extractions/setup-just@v4
|
|
28
|
+
- name: Test with pytest
|
|
29
|
+
run: just test ${{ matrix.python-version }}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
|
|
9
|
+
# Virtualenvs
|
|
10
|
+
.venv/
|
|
11
|
+
venv/
|
|
12
|
+
|
|
13
|
+
# Pytest
|
|
14
|
+
.pytest_cache/
|
|
15
|
+
.coverage
|
|
16
|
+
.coverage.*
|
|
17
|
+
htmlcov/
|
|
18
|
+
|
|
19
|
+
# Rust
|
|
20
|
+
target/
|
|
21
|
+
Cargo.lock
|
|
22
|
+
|
|
23
|
+
# Compiled extension modules
|
|
24
|
+
*.abi3.so
|
|
25
|
+
*.so
|
|
26
|
+
*.pyd
|
|
27
|
+
|
|
28
|
+
# Docs build artifacts
|
|
29
|
+
docs/source-built/
|
|
30
|
+
docs/zensical-built.yml
|
|
31
|
+
docs/.build-cache/
|
|
32
|
+
docs/site/
|
|
33
|
+
|
|
34
|
+
# Claude session-local config
|
|
35
|
+
.claude/
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: "v6.0.0"
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-added-large-files
|
|
6
|
+
- id: check-case-conflict
|
|
7
|
+
- id: check-merge-conflict
|
|
8
|
+
- id: check-symlinks
|
|
9
|
+
- id: check-yaml
|
|
10
|
+
args: ["--unsafe"]
|
|
11
|
+
- id: debug-statements
|
|
12
|
+
- id: end-of-file-fixer
|
|
13
|
+
- id: mixed-line-ending
|
|
14
|
+
- id: name-tests-test
|
|
15
|
+
args: ["--pytest-test-first"]
|
|
16
|
+
- id: trailing-whitespace
|
|
17
|
+
args: [--markdown-linebreak-ext=md]
|
|
18
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
19
|
+
rev: v0.15.12
|
|
20
|
+
hooks:
|
|
21
|
+
- id: ruff-check
|
|
22
|
+
args: [--fix]
|
|
23
|
+
- id: ruff-format
|
|
24
|
+
- repo: https://github.com/codespell-project/codespell
|
|
25
|
+
rev: v2.4.2
|
|
26
|
+
hooks:
|
|
27
|
+
- id: codespell
|
|
28
|
+
additional_dependencies:
|
|
29
|
+
- tomli
|
|
30
|
+
- repo: https://github.com/PyCQA/bandit
|
|
31
|
+
rev: 1.9.4
|
|
32
|
+
hooks:
|
|
33
|
+
- id: bandit
|
|
34
|
+
args: [--exit-zero]
|
|
35
|
+
exclude: ^tests/
|
|
36
|
+
- repo: local
|
|
37
|
+
hooks:
|
|
38
|
+
- id: ty
|
|
39
|
+
name: ty check
|
|
40
|
+
entry: uvx --with-editable '.[dev]' ty check .
|
|
41
|
+
language: python
|
|
42
|
+
additional_dependencies:
|
|
43
|
+
- uv
|
|
44
|
+
- "klayout>=0.30.8"
|
|
45
|
+
- pytest
|
|
46
|
+
pass_filenames: false
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "autocfg"
|
|
7
|
+
version = "1.5.0"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "cfg-if"
|
|
13
|
+
version = "1.0.4"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "equivalent"
|
|
19
|
+
version = "1.0.2"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "hashbrown"
|
|
25
|
+
version = "0.17.1"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
|
28
|
+
|
|
29
|
+
[[package]]
|
|
30
|
+
name = "heck"
|
|
31
|
+
version = "0.5.0"
|
|
32
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
34
|
+
|
|
35
|
+
[[package]]
|
|
36
|
+
name = "indexmap"
|
|
37
|
+
version = "2.14.0"
|
|
38
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
+
checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
|
|
40
|
+
dependencies = [
|
|
41
|
+
"equivalent",
|
|
42
|
+
"hashbrown",
|
|
43
|
+
"serde",
|
|
44
|
+
"serde_core",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
[[package]]
|
|
48
|
+
name = "indoc"
|
|
49
|
+
version = "2.0.7"
|
|
50
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
51
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
52
|
+
dependencies = [
|
|
53
|
+
"rustversion",
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[[package]]
|
|
57
|
+
name = "itoa"
|
|
58
|
+
version = "1.0.18"
|
|
59
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
+
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
61
|
+
|
|
62
|
+
[[package]]
|
|
63
|
+
name = "kfnetlist"
|
|
64
|
+
version = "0.1.2"
|
|
65
|
+
dependencies = [
|
|
66
|
+
"indexmap",
|
|
67
|
+
"pyo3",
|
|
68
|
+
"pythonize",
|
|
69
|
+
"serde",
|
|
70
|
+
"serde_json",
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
[[package]]
|
|
74
|
+
name = "libc"
|
|
75
|
+
version = "0.2.186"
|
|
76
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
77
|
+
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
|
78
|
+
|
|
79
|
+
[[package]]
|
|
80
|
+
name = "memchr"
|
|
81
|
+
version = "2.8.0"
|
|
82
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
83
|
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|
84
|
+
|
|
85
|
+
[[package]]
|
|
86
|
+
name = "memoffset"
|
|
87
|
+
version = "0.9.1"
|
|
88
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
89
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
90
|
+
dependencies = [
|
|
91
|
+
"autocfg",
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
[[package]]
|
|
95
|
+
name = "once_cell"
|
|
96
|
+
version = "1.21.4"
|
|
97
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
98
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
99
|
+
|
|
100
|
+
[[package]]
|
|
101
|
+
name = "portable-atomic"
|
|
102
|
+
version = "1.13.1"
|
|
103
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
104
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
105
|
+
|
|
106
|
+
[[package]]
|
|
107
|
+
name = "proc-macro2"
|
|
108
|
+
version = "1.0.106"
|
|
109
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
110
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
111
|
+
dependencies = [
|
|
112
|
+
"unicode-ident",
|
|
113
|
+
]
|
|
114
|
+
|
|
115
|
+
[[package]]
|
|
116
|
+
name = "pyo3"
|
|
117
|
+
version = "0.23.5"
|
|
118
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
119
|
+
checksum = "7778bffd85cf38175ac1f545509665d0b9b92a198ca7941f131f85f7a4f9a872"
|
|
120
|
+
dependencies = [
|
|
121
|
+
"cfg-if",
|
|
122
|
+
"indoc",
|
|
123
|
+
"libc",
|
|
124
|
+
"memoffset",
|
|
125
|
+
"once_cell",
|
|
126
|
+
"portable-atomic",
|
|
127
|
+
"pyo3-build-config",
|
|
128
|
+
"pyo3-ffi",
|
|
129
|
+
"pyo3-macros",
|
|
130
|
+
"unindent",
|
|
131
|
+
]
|
|
132
|
+
|
|
133
|
+
[[package]]
|
|
134
|
+
name = "pyo3-build-config"
|
|
135
|
+
version = "0.23.5"
|
|
136
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
137
|
+
checksum = "94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb"
|
|
138
|
+
dependencies = [
|
|
139
|
+
"once_cell",
|
|
140
|
+
"target-lexicon",
|
|
141
|
+
]
|
|
142
|
+
|
|
143
|
+
[[package]]
|
|
144
|
+
name = "pyo3-ffi"
|
|
145
|
+
version = "0.23.5"
|
|
146
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
147
|
+
checksum = "e9f1b4c431c0bb1c8fb0a338709859eed0d030ff6daa34368d3b152a63dfdd8d"
|
|
148
|
+
dependencies = [
|
|
149
|
+
"libc",
|
|
150
|
+
"pyo3-build-config",
|
|
151
|
+
]
|
|
152
|
+
|
|
153
|
+
[[package]]
|
|
154
|
+
name = "pyo3-macros"
|
|
155
|
+
version = "0.23.5"
|
|
156
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
157
|
+
checksum = "fbc2201328f63c4710f68abdf653c89d8dbc2858b88c5d88b0ff38a75288a9da"
|
|
158
|
+
dependencies = [
|
|
159
|
+
"proc-macro2",
|
|
160
|
+
"pyo3-macros-backend",
|
|
161
|
+
"quote",
|
|
162
|
+
"syn",
|
|
163
|
+
]
|
|
164
|
+
|
|
165
|
+
[[package]]
|
|
166
|
+
name = "pyo3-macros-backend"
|
|
167
|
+
version = "0.23.5"
|
|
168
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
169
|
+
checksum = "fca6726ad0f3da9c9de093d6f116a93c1a38e417ed73bf138472cf4064f72028"
|
|
170
|
+
dependencies = [
|
|
171
|
+
"heck",
|
|
172
|
+
"proc-macro2",
|
|
173
|
+
"pyo3-build-config",
|
|
174
|
+
"quote",
|
|
175
|
+
"syn",
|
|
176
|
+
]
|
|
177
|
+
|
|
178
|
+
[[package]]
|
|
179
|
+
name = "pythonize"
|
|
180
|
+
version = "0.23.0"
|
|
181
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
182
|
+
checksum = "91a6ee7a084f913f98d70cdc3ebec07e852b735ae3059a1500db2661265da9ff"
|
|
183
|
+
dependencies = [
|
|
184
|
+
"pyo3",
|
|
185
|
+
"serde",
|
|
186
|
+
]
|
|
187
|
+
|
|
188
|
+
[[package]]
|
|
189
|
+
name = "quote"
|
|
190
|
+
version = "1.0.45"
|
|
191
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
192
|
+
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
193
|
+
dependencies = [
|
|
194
|
+
"proc-macro2",
|
|
195
|
+
]
|
|
196
|
+
|
|
197
|
+
[[package]]
|
|
198
|
+
name = "rustversion"
|
|
199
|
+
version = "1.0.22"
|
|
200
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
201
|
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
202
|
+
|
|
203
|
+
[[package]]
|
|
204
|
+
name = "serde"
|
|
205
|
+
version = "1.0.228"
|
|
206
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
207
|
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
208
|
+
dependencies = [
|
|
209
|
+
"serde_core",
|
|
210
|
+
"serde_derive",
|
|
211
|
+
]
|
|
212
|
+
|
|
213
|
+
[[package]]
|
|
214
|
+
name = "serde_core"
|
|
215
|
+
version = "1.0.228"
|
|
216
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
217
|
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
218
|
+
dependencies = [
|
|
219
|
+
"serde_derive",
|
|
220
|
+
]
|
|
221
|
+
|
|
222
|
+
[[package]]
|
|
223
|
+
name = "serde_derive"
|
|
224
|
+
version = "1.0.228"
|
|
225
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
226
|
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
227
|
+
dependencies = [
|
|
228
|
+
"proc-macro2",
|
|
229
|
+
"quote",
|
|
230
|
+
"syn",
|
|
231
|
+
]
|
|
232
|
+
|
|
233
|
+
[[package]]
|
|
234
|
+
name = "serde_json"
|
|
235
|
+
version = "1.0.149"
|
|
236
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
237
|
+
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
|
238
|
+
dependencies = [
|
|
239
|
+
"itoa",
|
|
240
|
+
"memchr",
|
|
241
|
+
"serde",
|
|
242
|
+
"serde_core",
|
|
243
|
+
"zmij",
|
|
244
|
+
]
|
|
245
|
+
|
|
246
|
+
[[package]]
|
|
247
|
+
name = "syn"
|
|
248
|
+
version = "2.0.117"
|
|
249
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
250
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
251
|
+
dependencies = [
|
|
252
|
+
"proc-macro2",
|
|
253
|
+
"quote",
|
|
254
|
+
"unicode-ident",
|
|
255
|
+
]
|
|
256
|
+
|
|
257
|
+
[[package]]
|
|
258
|
+
name = "target-lexicon"
|
|
259
|
+
version = "0.12.16"
|
|
260
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
261
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
262
|
+
|
|
263
|
+
[[package]]
|
|
264
|
+
name = "unicode-ident"
|
|
265
|
+
version = "1.0.24"
|
|
266
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
267
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
268
|
+
|
|
269
|
+
[[package]]
|
|
270
|
+
name = "unindent"
|
|
271
|
+
version = "0.2.4"
|
|
272
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
273
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
274
|
+
|
|
275
|
+
[[package]]
|
|
276
|
+
name = "zmij"
|
|
277
|
+
version = "1.0.21"
|
|
278
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
279
|
+
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "kfnetlist"
|
|
3
|
+
version = "0.1.2"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
|
|
7
|
+
[lib]
|
|
8
|
+
name = "_native"
|
|
9
|
+
crate-type = ["cdylib"]
|
|
10
|
+
|
|
11
|
+
[dependencies]
|
|
12
|
+
pyo3 = { version = "0.23", features = ["extension-module", "abi3-py312"] }
|
|
13
|
+
pythonize = "0.23"
|
|
14
|
+
serde = { version = "1", features = ["derive"] }
|
|
15
|
+
serde_json = "1"
|
|
16
|
+
indexmap = { version = "2", features = ["serde"] }
|
|
17
|
+
|
|
18
|
+
[profile.release]
|
|
19
|
+
lto = "thin"
|
|
20
|
+
codegen-units = 1
|
kfnetlist-0.1.2/Justfile
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Development setup
|
|
2
|
+
dev:
|
|
3
|
+
uv sync --all-extras
|
|
4
|
+
maturin develop --release
|
|
5
|
+
uv run pre-commit install
|
|
6
|
+
|
|
7
|
+
# Run tests
|
|
8
|
+
test python_version="3.14":
|
|
9
|
+
uv run -p {{python_version}} --with . --extra dev --isolated pytest -s
|
|
10
|
+
|
|
11
|
+
# Run linting
|
|
12
|
+
lint:
|
|
13
|
+
uv run ruff check .
|
|
14
|
+
|
|
15
|
+
# Run formatting
|
|
16
|
+
format:
|
|
17
|
+
uv run ruff format .
|
|
18
|
+
|
|
19
|
+
# Clean documentation build
|
|
20
|
+
docs-clean:
|
|
21
|
+
rm -rf docs/site
|
|
22
|
+
|
|
23
|
+
# Pre-build docs source: convert jupytext .py to .md+.ipynb (with download
|
|
24
|
+
# button), generate mkdocstrings API reference stubs into docs/source-built/.
|
|
25
|
+
# Cached: re-runs only re-execute notebooks whose source hash changed.
|
|
26
|
+
docs-build-source python_version="3.14":
|
|
27
|
+
uv run -p {{python_version}} --extra docs --with 'mike @ git+https://github.com/squidfunk/mike.git' --with . python docs/scripts/build_docs_source.py
|
|
28
|
+
|
|
29
|
+
# Build documentation (zensical) from the pre-built source
|
|
30
|
+
docs python_version="3.14": docs-build-source
|
|
31
|
+
uv run -p {{python_version}} --with . --extra docs --with 'mike @ git+https://github.com/squidfunk/mike.git' --isolated zensical build -f docs/zensical-built.yml
|
|
32
|
+
|
|
33
|
+
# Serve documentation locally (zensical) from the pre-built source
|
|
34
|
+
docs-serve python_version="3.14": docs-build-source
|
|
35
|
+
uv run -p {{python_version}} --with . --extra docs --with 'mike @ git+https://github.com/squidfunk/mike.git' --isolated zensical serve -f docs/zensical-built.yml --watch src/kfnetlist
|