cppkh-interface 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,76 @@
1
+ Metadata-Version: 2.4
2
+ Name: cppkh-interface
3
+ Version: 0.1.0
4
+ Summary: Python interface for cppkh Khovanov homology computation with runtime C++ compilation.
5
+ License-Expression: MIT
6
+ Author: GGN_2015
7
+ Author-email: neko@jlulug.org
8
+ Requires-Python: >=3.10
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Requires-Dist: cpp-simple-interface (>=0.1.2)
16
+ Requires-Dist: pd-code-de-r1
17
+ Requires-Dist: pd-code-delete-nugatory
18
+ Requires-Dist: pd-code-sanity (>=0.0.1)
19
+ Project-URL: Documentation, https://github.com/GGN-2015/cppkh/blob/main/docs/PYTHON_PACKAGE.md
20
+ Project-URL: Homepage, https://github.com/GGN-2015/cppkh
21
+ Project-URL: Repository, https://github.com/GGN-2015/cppkh
22
+ Description-Content-Type: text/markdown
23
+
24
+ # cppkh-interface
25
+
26
+ `cppkh-interface` is a Python package for computing integer Khovanov homology
27
+ with the C++ `cppkh` implementation.
28
+
29
+ The package is compatible with the main `javakh-interface` function:
30
+
31
+ ```python
32
+ import cppkh_interface
33
+
34
+ pd_code = [[1, 5, 2, 4], [3, 1, 4, 6], [5, 3, 6, 2]]
35
+ print(cppkh_interface.solve_khovanov(pd_code, de_r1=True, de_k8=True))
36
+ ```
37
+
38
+ Unlike wrappers that ship a prebuilt DLL or shared object, this package ships
39
+ the `cppkh` C++ source file and compiles a local executable on first use through
40
+ `cpp-simple-interface`. The compiled executable is cached for later calls.
41
+
42
+ ## Install
43
+
44
+ ```sh
45
+ pip install cppkh-interface
46
+ ```
47
+
48
+ A `g++` compatible compiler must be available at runtime. To select a compiler,
49
+ set `CXX` before importing or calling the package:
50
+
51
+ ```sh
52
+ CXX=clang++ python your_script.py
53
+ ```
54
+
55
+ Windows PowerShell:
56
+
57
+ ```powershell
58
+ $env:CXX = "C:\path\to\g++.exe"
59
+ python your_script.py
60
+ ```
61
+
62
+ ## Build And Publish
63
+
64
+ From this directory:
65
+
66
+ ```sh
67
+ poetry build
68
+ poetry publish
69
+ ```
70
+
71
+ For local testing:
72
+
73
+ ```sh
74
+ poetry run python -m cppkh_interface "[[1,5,2,4], [3,1,4,6], [5,3,6,2]]"
75
+ ```
76
+
@@ -0,0 +1,52 @@
1
+ # cppkh-interface
2
+
3
+ `cppkh-interface` is a Python package for computing integer Khovanov homology
4
+ with the C++ `cppkh` implementation.
5
+
6
+ The package is compatible with the main `javakh-interface` function:
7
+
8
+ ```python
9
+ import cppkh_interface
10
+
11
+ pd_code = [[1, 5, 2, 4], [3, 1, 4, 6], [5, 3, 6, 2]]
12
+ print(cppkh_interface.solve_khovanov(pd_code, de_r1=True, de_k8=True))
13
+ ```
14
+
15
+ Unlike wrappers that ship a prebuilt DLL or shared object, this package ships
16
+ the `cppkh` C++ source file and compiles a local executable on first use through
17
+ `cpp-simple-interface`. The compiled executable is cached for later calls.
18
+
19
+ ## Install
20
+
21
+ ```sh
22
+ pip install cppkh-interface
23
+ ```
24
+
25
+ A `g++` compatible compiler must be available at runtime. To select a compiler,
26
+ set `CXX` before importing or calling the package:
27
+
28
+ ```sh
29
+ CXX=clang++ python your_script.py
30
+ ```
31
+
32
+ Windows PowerShell:
33
+
34
+ ```powershell
35
+ $env:CXX = "C:\path\to\g++.exe"
36
+ python your_script.py
37
+ ```
38
+
39
+ ## Build And Publish
40
+
41
+ From this directory:
42
+
43
+ ```sh
44
+ poetry build
45
+ poetry publish
46
+ ```
47
+
48
+ For local testing:
49
+
50
+ ```sh
51
+ poetry run python -m cppkh_interface "[[1,5,2,4], [3,1,4,6], [5,3,6,2]]"
52
+ ```
@@ -0,0 +1,19 @@
1
+ from .main import (
2
+ CppkhInterfaceError,
3
+ compile_cppkh,
4
+ compute_pd,
5
+ get_cppkh_executable,
6
+ normalize_pd_code,
7
+ simplify_pd,
8
+ solve_khovanov,
9
+ )
10
+
11
+ __all__ = [
12
+ "CppkhInterfaceError",
13
+ "compile_cppkh",
14
+ "compute_pd",
15
+ "get_cppkh_executable",
16
+ "normalize_pd_code",
17
+ "simplify_pd",
18
+ "solve_khovanov",
19
+ ]
@@ -0,0 +1,4 @@
1
+ from .main import main
2
+
3
+ if __name__ == "__main__":
4
+ raise SystemExit(main())