khoca 0.0.post1.dev1__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.
- khoca-0.0.post1.dev1/.github/workflows/build_wheels.yml +41 -0
- khoca-0.0.post1.dev1/.github/workflows/build_wheels_linux.yml +21 -0
- khoca-0.0.post1.dev1/.github/workflows/build_wheels_macos.yml +39 -0
- khoca-0.0.post1.dev1/.github/workflows/build_wheels_windows.yml +70 -0
- khoca-0.0.post1.dev1/.github/workflows/publish_pypi.yml +25 -0
- khoca-0.0.post1.dev1/.github/workflows/publish_source_pypi.yml +25 -0
- khoca-0.0.post1.dev1/.github/workflows/push_docker.yml +20 -0
- khoca-0.0.post1.dev1/.github/workflows/run_tests.yml +37 -0
- khoca-0.0.post1.dev1/.gitignore +11 -0
- khoca-0.0.post1.dev1/COPYING +674 -0
- khoca-0.0.post1.dev1/Dockerfile +29 -0
- khoca-0.0.post1.dev1/INSTALL +36 -0
- khoca-0.0.post1.dev1/MANIFEST.in +1 -0
- khoca-0.0.post1.dev1/Makefile +83 -0
- khoca-0.0.post1.dev1/PKG-INFO +218 -0
- khoca-0.0.post1.dev1/README.md +191 -0
- khoca-0.0.post1.dev1/__init__.py +317 -0
- khoca-0.0.post1.dev1/before-all.sh +30 -0
- khoca-0.0.post1.dev1/before-build.sh +28 -0
- khoca-0.0.post1.dev1/bin/BraidToMyPD.py +51 -0
- khoca-0.0.post1.dev1/bin/KrasnerGaussToMyPD.py +43 -0
- khoca-0.0.post1.dev1/bin/KrasnerGaussToMyPDLib.py +122 -0
- khoca-0.0.post1.dev1/bin/pseudoBraidToKrasnerGauss.py +41 -0
- khoca-0.0.post1.dev1/bin/pseudoBraidToKrasnerGaussLib.py +46 -0
- khoca-0.0.post1.dev1/converters/binToHuman.py +116 -0
- khoca-0.0.post1.dev1/converters/humanToBin.py +131 -0
- khoca-0.0.post1.dev1/converters/montesinos.py +143 -0
- khoca-0.0.post1.dev1/data/KhovanovMinus +11 -0
- khoca-0.0.post1.dev1/data/KhovanovMinus.bin +0 -0
- khoca-0.0.post1.dev1/data/KhovanovPlus +11 -0
- khoca-0.0.post1.dev1/data/KhovanovPlus.bin +0 -0
- khoca-0.0.post1.dev1/data/KrasnerMinus +20 -0
- khoca-0.0.post1.dev1/data/KrasnerMinus.bin +0 -0
- khoca-0.0.post1.dev1/data/KrasnerPlus +20 -0
- khoca-0.0.post1.dev1/data/KrasnerPlus.bin +0 -0
- khoca-0.0.post1.dev1/docker/entrypoint.sh +4 -0
- khoca-0.0.post1.dev1/install-pari-msys2.sh +142 -0
- khoca-0.0.post1.dev1/install-pari.sh +21 -0
- khoca-0.0.post1.dev1/khoca.egg-info/PKG-INFO +218 -0
- khoca-0.0.post1.dev1/khoca.egg-info/SOURCES.txt +79 -0
- khoca-0.0.post1.dev1/khoca.egg-info/dependency_links.txt +1 -0
- khoca-0.0.post1.dev1/khoca.egg-info/not-zip-safe +1 -0
- khoca-0.0.post1.dev1/khoca.egg-info/top_level.txt +5 -0
- khoca-0.0.post1.dev1/khoca.py +446 -0
- khoca-0.0.post1.dev1/pyproject.toml +21 -0
- khoca-0.0.post1.dev1/pytest.ini +4 -0
- khoca-0.0.post1.dev1/setup.cfg +7 -0
- khoca-0.0.post1.dev1/setup.py +166 -0
- khoca-0.0.post1.dev1/src/compilerFlagsInfo.cpp +1 -0
- khoca-0.0.post1.dev1/src/krasner/krasner.cpp +821 -0
- khoca-0.0.post1.dev1/src/krasner/krasner.h +494 -0
- khoca-0.0.post1.dev1/src/krasner/krasnerExplicitTemplates.cpp +72 -0
- khoca-0.0.post1.dev1/src/planar_algebra/coefficient_rings.cpp +457 -0
- khoca-0.0.post1.dev1/src/planar_algebra/coefficient_rings.h +303 -0
- khoca-0.0.post1.dev1/src/planar_algebra/coefficient_rings_explicitTemplates.cpp +38 -0
- khoca-0.0.post1.dev1/src/planar_algebra/explicitTemplates.cpp +87 -0
- khoca-0.0.post1.dev1/src/planar_algebra/planar_algebra.cpp +1159 -0
- khoca-0.0.post1.dev1/src/planar_algebra/planar_algebra.h +729 -0
- khoca-0.0.post1.dev1/src/planar_algebra/smith.cpp +217 -0
- khoca-0.0.post1.dev1/src/planar_algebra/smith.h +22 -0
- khoca-0.0.post1.dev1/src/planar_algebra/sparsemat.cpp +715 -0
- khoca-0.0.post1.dev1/src/planar_algebra/sparsemat.h +288 -0
- khoca-0.0.post1.dev1/src/planar_algebra/sparsematExplicitTemplates.cpp +125 -0
- khoca-0.0.post1.dev1/src/python_interface/pui.cpp +18863 -0
- khoca-0.0.post1.dev1/src/python_interface/pui.pyx +288 -0
- khoca-0.0.post1.dev1/src/python_interface/pythonInterface.cpp +476 -0
- khoca-0.0.post1.dev1/src/python_interface/pythonInterface.h +71 -0
- khoca-0.0.post1.dev1/src/shared.cpp +71 -0
- khoca-0.0.post1.dev1/src/shared.h +104 -0
- khoca-0.0.post1.dev1/test-command.sh +24 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Reusable workflow for cibuildwheel
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
operating-systems:
|
|
7
|
+
default: >-
|
|
8
|
+
["ubuntu-latest"]
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
jobs:
|
|
12
|
+
build_wheels:
|
|
13
|
+
name: Build wheels on ${{ matrix.os }}
|
|
14
|
+
runs-on: ${{ matrix.os }}
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
os: ${{ fromJson(inputs.operating-systems) }}
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
# Used to host cibuildwheel
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
|
+
|
|
25
|
+
- name: Install cibuildwheel
|
|
26
|
+
run: python -m pip install cibuildwheel==2.22.0
|
|
27
|
+
|
|
28
|
+
- name: Build wheels
|
|
29
|
+
run: python -m cibuildwheel --output-dir wheelhouse
|
|
30
|
+
|
|
31
|
+
- name: Analyse
|
|
32
|
+
if: always()
|
|
33
|
+
run: |
|
|
34
|
+
echo "Analyse on $(pwd)"
|
|
35
|
+
echo "PUI $(find . -name '*pui*')"
|
|
36
|
+
echo "PyInit_pui $(grep -r PyInit_pui .)"
|
|
37
|
+
|
|
38
|
+
- uses: actions/upload-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
|
41
|
+
path: ./wheelhouse/*.whl
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Build wheels Linux
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "*" # Push events of new tags
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
# Allow to run manually
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build_wheels:
|
|
12
|
+
uses: ./.github/workflows/build_wheels.yml
|
|
13
|
+
with:
|
|
14
|
+
operating-systems: >-
|
|
15
|
+
["ubuntu-latest"]
|
|
16
|
+
|
|
17
|
+
pypi-publish:
|
|
18
|
+
name: Upload wheels to PyPI
|
|
19
|
+
needs: build_wheels
|
|
20
|
+
uses: ./.github/workflows/publish_pypi.yml
|
|
21
|
+
secrets: inherit
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Build wheels MacOS
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "*" # Push events of new tags
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
# Allow to run manually
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build_wheels:
|
|
12
|
+
uses: ./.github/workflows/build_wheels.yml
|
|
13
|
+
with:
|
|
14
|
+
operating-systems: >-
|
|
15
|
+
["macos-13", "macos-14"]
|
|
16
|
+
|
|
17
|
+
pypi-publish:
|
|
18
|
+
# https://github.com/pypa/gh-action-pypi-publish
|
|
19
|
+
name: Upload wheels to PyPI
|
|
20
|
+
needs: build_wheels
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
env:
|
|
23
|
+
CAN_DEPLOY: ${{ secrets.PYPI_TOCKEN_KHOCA != '' }}
|
|
24
|
+
steps:
|
|
25
|
+
|
|
26
|
+
- uses: actions/download-artifact@v4
|
|
27
|
+
with:
|
|
28
|
+
pattern: cibw-wheels*
|
|
29
|
+
path: wheelhouse
|
|
30
|
+
merge-multiple: true
|
|
31
|
+
|
|
32
|
+
- name: Publish package distributions to PyPI
|
|
33
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
34
|
+
with:
|
|
35
|
+
user: __token__
|
|
36
|
+
password: ${{ secrets.PYPI_TOKEN_KHOCA }}
|
|
37
|
+
packages_dir: wheelhouse/
|
|
38
|
+
skip_existing: true
|
|
39
|
+
verbose: true
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: Build wheels Windows
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "*" # Push events of new tags
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
# Allow to run manually
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build_wheels:
|
|
12
|
+
name: Build Windows wheels for 64 bit Python
|
|
13
|
+
runs-on: windows-latest
|
|
14
|
+
defaults:
|
|
15
|
+
run:
|
|
16
|
+
shell: msys2 {0}
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-python@v5
|
|
22
|
+
name: Install a Python to use for building
|
|
23
|
+
with:
|
|
24
|
+
python-version: '3.12'
|
|
25
|
+
|
|
26
|
+
- uses: msys2/setup-msys2@v2
|
|
27
|
+
name: Setup an msys2 environment
|
|
28
|
+
with:
|
|
29
|
+
msystem: UCRT64
|
|
30
|
+
release: false
|
|
31
|
+
install: >-
|
|
32
|
+
base-devel
|
|
33
|
+
m4
|
|
34
|
+
bison
|
|
35
|
+
make
|
|
36
|
+
patch
|
|
37
|
+
sed
|
|
38
|
+
pacboy: gcc:p
|
|
39
|
+
path-type: inherit
|
|
40
|
+
|
|
41
|
+
- name: Expand the path for Visual Studio 2019
|
|
42
|
+
run: |
|
|
43
|
+
echo "/c/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64" >> $GITHUB_PATH
|
|
44
|
+
echo "/c/msys64/ucrt64/bin" >> $GITHUB_PATH
|
|
45
|
+
|
|
46
|
+
- name: Install cibuildwheel
|
|
47
|
+
run: |
|
|
48
|
+
python -m pip install cibuildwheel==2.20.0
|
|
49
|
+
|
|
50
|
+
- name: Build many wheels
|
|
51
|
+
run: |
|
|
52
|
+
python -m cibuildwheel --output-dir wheelhouse
|
|
53
|
+
|
|
54
|
+
- name: Analyse
|
|
55
|
+
if: always()
|
|
56
|
+
run: |
|
|
57
|
+
echo "Analyse on $(pwd)"
|
|
58
|
+
echo "PUI $(find . -name '*pui*')"
|
|
59
|
+
echo "libparicrt64 $(find /d/a/ -name 'libparicrt64*')"
|
|
60
|
+
echo "PyInit_pui $(grep -r PyInit_pui .)"
|
|
61
|
+
echo "__gmpz_fdiv_q_ui $(grep -r __gmpz_fdiv_q_ui .)"
|
|
62
|
+
echo "__gmpz_fdiv_q_ui $(grep -r __gmpz_fdiv_q_ui /c/msys64/ucrt64/)"
|
|
63
|
+
echo "pari_err_last $(grep -r pari_err_last .)"
|
|
64
|
+
echo "win32ctrlc $(grep -r win32ctrlc .)"
|
|
65
|
+
echo "__int64 $(grep -r __int64 .)"
|
|
66
|
+
|
|
67
|
+
- uses: actions/upload-artifact@v4
|
|
68
|
+
name: Save the wheels as artifacts
|
|
69
|
+
with:
|
|
70
|
+
path: ./wheelhouse/*.whl
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Reusable workflow to publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
pypi-publish:
|
|
8
|
+
# https://github.com/pypa/gh-action-pypi-publish
|
|
9
|
+
name: Upload wheels to PyPI
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/download-artifact@v4
|
|
13
|
+
with:
|
|
14
|
+
pattern: cibw-wheels*
|
|
15
|
+
path: wheelhouse
|
|
16
|
+
merge-multiple: true
|
|
17
|
+
|
|
18
|
+
- name: Publish package distributions to PyPI
|
|
19
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
20
|
+
with:
|
|
21
|
+
user: __token__
|
|
22
|
+
password: ${{ secrets.PYPI_TOKEN_KHOCA }}
|
|
23
|
+
packages_dir: wheelhouse/
|
|
24
|
+
skip_existing: true
|
|
25
|
+
verbose: true
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Publish sources to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
publish-sources:
|
|
8
|
+
name: Upload source distro to PyPI
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v2
|
|
12
|
+
- uses: actions/setup-python@v5
|
|
13
|
+
- name: Prepare
|
|
14
|
+
run: |
|
|
15
|
+
python -m pip install --upgrade pip
|
|
16
|
+
pip install cython setuptools
|
|
17
|
+
- name: Create distribution
|
|
18
|
+
run: python3 setup.py sdist
|
|
19
|
+
- name: Publish distro to PyPI
|
|
20
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
21
|
+
with:
|
|
22
|
+
user: __token__
|
|
23
|
+
password: ${{ secrets.PYPI_TOKEN_KHOCA }}
|
|
24
|
+
packages_dir: dist/
|
|
25
|
+
verbose: true
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Publish Docker
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
create:
|
|
5
|
+
tag:
|
|
6
|
+
- '*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@master
|
|
14
|
+
- name: Publish to Registry
|
|
15
|
+
uses: elgohr/Publish-Docker-Github-Action@master
|
|
16
|
+
with:
|
|
17
|
+
name: soehms/khoca
|
|
18
|
+
username: ${{ secrets.DOCKER_USER }}
|
|
19
|
+
password: ${{ secrets.DOCKER_API_TOKEN }}
|
|
20
|
+
tag_names: true
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This workflow runs tests to build Khoca on verois systems
|
|
2
|
+
|
|
3
|
+
name: Run Tests
|
|
4
|
+
|
|
5
|
+
# Triggers the workflow on push or pull request events and manually
|
|
6
|
+
on: [push, pull_request, workflow_dispatch]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
# This workflow contains one job called build
|
|
10
|
+
build:
|
|
11
|
+
name: Build Khoca
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
# Checks-out the repository under $GITHUB_WORKSPACE, so our job can access it
|
|
16
|
+
- name: Checkout code
|
|
17
|
+
id: checkout_code
|
|
18
|
+
uses: actions/checkout@v2
|
|
19
|
+
|
|
20
|
+
# Installs dependencies
|
|
21
|
+
- name: Install Dependencies
|
|
22
|
+
id: dependencies
|
|
23
|
+
run: |
|
|
24
|
+
sudo apt-get update -y
|
|
25
|
+
sudo apt-get install -y make g++ python3 python3-pip libgmp-dev pari-gp2c
|
|
26
|
+
pip3 install cython
|
|
27
|
+
|
|
28
|
+
# Building Khoca
|
|
29
|
+
- name: Make
|
|
30
|
+
id: make
|
|
31
|
+
run: make
|
|
32
|
+
|
|
33
|
+
# Run a Test (should result to 1)
|
|
34
|
+
- name: Run Test
|
|
35
|
+
id: run_test
|
|
36
|
+
run: |
|
|
37
|
+
./khoca.py 0 0.0 0 braidaBaB calc0 | grep -c "t^-2q^4 + t^-1q^2 + t^0q^0 + t^1q^-2 + t^2q^-4"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
bin/__pycache__/
|
|
2
|
+
bin/pui.so
|
|
3
|
+
src/krasner/krasner.o
|
|
4
|
+
src/planar_algebra/coefficient_rings.o
|
|
5
|
+
src/planar_algebra/planar_algebra.o
|
|
6
|
+
src/planar_algebra/smith.o
|
|
7
|
+
src/planar_algebra/sparsemat.o
|
|
8
|
+
src/python_interface/pui.cpp
|
|
9
|
+
src/python_interface/pui.o
|
|
10
|
+
src/python_interface/pythonInterface.o
|
|
11
|
+
src/shared.o
|