fuzzycocopython 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 (142) hide show
  1. fuzzycocopython-0.1.0/.github/workflows/build.yml +67 -0
  2. fuzzycocopython-0.1.0/.github/workflows/docs.yml +58 -0
  3. fuzzycocopython-0.1.0/.github/workflows/publish.yml +93 -0
  4. fuzzycocopython-0.1.0/.github/workflows/tests.yml +105 -0
  5. fuzzycocopython-0.1.0/.gitignore +112 -0
  6. fuzzycocopython-0.1.0/.gitmodules +4 -0
  7. fuzzycocopython-0.1.0/.pre-commit-config.yaml +25 -0
  8. fuzzycocopython-0.1.0/CMakeLists.txt +29 -0
  9. fuzzycocopython-0.1.0/LICENSE +661 -0
  10. fuzzycocopython-0.1.0/PKG-INFO +172 -0
  11. fuzzycocopython-0.1.0/README.md +133 -0
  12. fuzzycocopython-0.1.0/badges/coverage.svg +21 -0
  13. fuzzycocopython-0.1.0/bindings/CMakeLists.txt +30 -0
  14. fuzzycocopython-0.1.0/bindings/bindings.cpp +341 -0
  15. fuzzycocopython-0.1.0/demo.ipynb +1833 -0
  16. fuzzycocopython-0.1.0/docs/_static/.gitkeep +0 -0
  17. fuzzycocopython-0.1.0/docs/_templates/.gitkeep +0 -0
  18. fuzzycocopython-0.1.0/docs/api/index.rst +60 -0
  19. fuzzycocopython-0.1.0/docs/conf.py +71 -0
  20. fuzzycocopython-0.1.0/docs/index.md +23 -0
  21. fuzzycocopython-0.1.0/docs/parameters.rst +110 -0
  22. fuzzycocopython-0.1.0/docs/quickstart.rst +29 -0
  23. fuzzycocopython-0.1.0/docs/requirements.txt +3 -0
  24. fuzzycocopython-0.1.0/fuzzycoco/CHANGELOG.md +13 -0
  25. fuzzycocopython-0.1.0/fuzzycoco/CMakeLists.txt +19 -0
  26. fuzzycocopython-0.1.0/fuzzycoco/DEV.md +30 -0
  27. fuzzycocopython-0.1.0/fuzzycoco/INSTALL.md +46 -0
  28. fuzzycocopython-0.1.0/fuzzycoco/LICENSE +661 -0
  29. fuzzycocopython-0.1.0/fuzzycoco/PARAMS.md +302 -0
  30. fuzzycocopython-0.1.0/fuzzycoco/README.md +56 -0
  31. fuzzycocopython-0.1.0/fuzzycoco/Release/CMakeLists.txt +15 -0
  32. fuzzycocopython-0.1.0/fuzzycoco/TODO.md +10 -0
  33. fuzzycocopython-0.1.0/fuzzycoco/USAGE.md +145 -0
  34. fuzzycocopython-0.1.0/fuzzycoco/codecov.yml +3 -0
  35. fuzzycocopython-0.1.0/fuzzycoco/src/CMakeLists.txt +48 -0
  36. fuzzycocopython-0.1.0/fuzzycoco/src/PR_influence_notes.md +85 -0
  37. fuzzycocopython-0.1.0/fuzzycoco/src/bitarray.cpp +40 -0
  38. fuzzycocopython-0.1.0/fuzzycoco/src/bitarray.h +24 -0
  39. fuzzycocopython-0.1.0/fuzzycoco/src/coevolution_engine.cpp +98 -0
  40. fuzzycocopython-0.1.0/fuzzycoco/src/coevolution_engine.h +73 -0
  41. fuzzycocopython-0.1.0/fuzzycoco/src/coevolution_fitness.cpp +29 -0
  42. fuzzycocopython-0.1.0/fuzzycoco/src/coevolution_fitness.h +60 -0
  43. fuzzycocopython-0.1.0/fuzzycoco/src/crossover_method.cpp +26 -0
  44. fuzzycocopython-0.1.0/fuzzycoco/src/crossover_method.h +22 -0
  45. fuzzycocopython-0.1.0/fuzzycoco/src/dataframe.cpp +243 -0
  46. fuzzycocopython-0.1.0/fuzzycoco/src/dataframe.h +107 -0
  47. fuzzycocopython-0.1.0/fuzzycoco/src/digest.h +167 -0
  48. fuzzycocopython-0.1.0/fuzzycoco/src/discretizer.h +71 -0
  49. fuzzycocopython-0.1.0/fuzzycoco/src/evolution_engine.cpp +113 -0
  50. fuzzycocopython-0.1.0/fuzzycoco/src/evolution_engine.h +102 -0
  51. fuzzycocopython-0.1.0/fuzzycoco/src/evolution_params.h +74 -0
  52. fuzzycocopython-0.1.0/fuzzycoco/src/exec/fuzzy_coco_executable.cpp +239 -0
  53. fuzzycocopython-0.1.0/fuzzycoco/src/file_utils.cpp +102 -0
  54. fuzzycocopython-0.1.0/fuzzycoco/src/file_utils.h +35 -0
  55. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_coco.cpp +297 -0
  56. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_coco.h +104 -0
  57. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_coco_codec.cpp +159 -0
  58. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_coco_codec.h +70 -0
  59. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_coco_engine.cpp +137 -0
  60. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_coco_engine.h +75 -0
  61. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_coco_fitness.cpp +123 -0
  62. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_coco_fitness.h +115 -0
  63. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_coco_params.cpp +251 -0
  64. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_coco_params.h +150 -0
  65. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_default_rule.cpp +70 -0
  66. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_default_rule.h +61 -0
  67. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_operator.h +31 -0
  68. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_rule.cpp +262 -0
  69. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_rule.h +157 -0
  70. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_set.h +61 -0
  71. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_system.cpp +419 -0
  72. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_system.h +172 -0
  73. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_system_fitness.cpp +64 -0
  74. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_system_fitness.h +48 -0
  75. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_system_metrics.cpp +133 -0
  76. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_system_metrics.h +55 -0
  77. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_system_metrics_computer.cpp +135 -0
  78. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_system_metrics_computer.h +127 -0
  79. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_variable.cpp +205 -0
  80. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_variable.h +100 -0
  81. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_variables_db.cpp +198 -0
  82. fuzzycocopython-0.1.0/fuzzycoco/src/fuzzy_variables_db.h +98 -0
  83. fuzzycocopython-0.1.0/fuzzycoco/src/genome.h +10 -0
  84. fuzzycocopython-0.1.0/fuzzycoco/src/genome_codec.cpp +95 -0
  85. fuzzycocopython-0.1.0/fuzzycoco/src/genome_codec.h +315 -0
  86. fuzzycocopython-0.1.0/fuzzycoco/src/logging_logger.h +583 -0
  87. fuzzycocopython-0.1.0/fuzzycoco/src/matrix.h +56 -0
  88. fuzzycocopython-0.1.0/fuzzycoco/src/mutation_method.cpp +30 -0
  89. fuzzycocopython-0.1.0/fuzzycoco/src/mutation_method.h +37 -0
  90. fuzzycocopython-0.1.0/fuzzycoco/src/named_list.cpp +307 -0
  91. fuzzycocopython-0.1.0/fuzzycoco/src/named_list.h +180 -0
  92. fuzzycocopython-0.1.0/fuzzycoco/src/random_generator.h +87 -0
  93. fuzzycocopython-0.1.0/fuzzycoco/src/selection_method.cpp +60 -0
  94. fuzzycocopython-0.1.0/fuzzycoco/src/selection_method.h +46 -0
  95. fuzzycocopython-0.1.0/fuzzycoco/src/string_utils.cpp +44 -0
  96. fuzzycocopython-0.1.0/fuzzycoco/src/string_utils.h +21 -0
  97. fuzzycocopython-0.1.0/fuzzycoco/src/types.h +64 -0
  98. fuzzycocopython-0.1.0/fuzzycoco/tests/e2e/expression/README.md +15 -0
  99. fuzzycocopython-0.1.0/fuzzycoco/tests/e2e/expression/expression.csv +2097 -0
  100. fuzzycocopython-0.1.0/fuzzycoco/tests/e2e/expression/expression_21_reporters.csv +24 -0
  101. fuzzycocopython-0.1.0/fuzzycoco/tests/e2e/iris36/iris36.csv +37 -0
  102. fuzzycocopython-0.1.0/fuzzycoco/tests/e2e/shared.mk +112 -0
  103. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/CMakeLists.txt +81 -0
  104. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/bitarray_test.cpp +56 -0
  105. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/coevolution_engine_test.cpp +122 -0
  106. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/crossover_method_test.cpp +65 -0
  107. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/dataframe_test.cpp +279 -0
  108. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/digest_test.cpp +50 -0
  109. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/discretizer_test.cpp +90 -0
  110. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/evolution_engine_test.cpp +89 -0
  111. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/file_utils_test.cpp +111 -0
  112. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_coco_codec_test.cpp +222 -0
  113. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_coco_engine_test.cpp +149 -0
  114. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_coco_features_weights_test.cpp +676 -0
  115. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_coco_fitness_test.cpp +442 -0
  116. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_coco_params_test.cpp +349 -0
  117. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_coco_test.cpp +271 -0
  118. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_default_rules_test.cpp +86 -0
  119. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_rules_test.cpp +344 -0
  120. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_set_test.cpp +45 -0
  121. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_system_fitness_test.cpp +108 -0
  122. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_system_metrics_test.cpp +225 -0
  123. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_system_test.cpp +520 -0
  124. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/fuzzy_variable_test.cpp +346 -0
  125. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/genome_codec_test.cpp +270 -0
  126. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/logging_logger_test.cpp +83 -0
  127. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/mutation_method_test.cpp +67 -0
  128. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/named_list_test.cpp +690 -0
  129. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/random_generator_test.cpp +138 -0
  130. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/selection_method_test.cpp +78 -0
  131. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/string_utils_test.cpp +49 -0
  132. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/tests.h +63 -0
  133. fuzzycocopython-0.1.0/fuzzycoco/tests/unit/types_test.cpp +15 -0
  134. fuzzycocopython-0.1.0/fuzzycocopython/__init__.py +25 -0
  135. fuzzycocopython-0.1.0/fuzzycocopython/fuzzycoco_base.py +1271 -0
  136. fuzzycocopython-0.1.0/fuzzycocopython/fuzzycoco_plot_mixin.py +296 -0
  137. fuzzycocopython-0.1.0/fuzzycocopython/utils.py +482 -0
  138. fuzzycocopython-0.1.0/pyproject.toml +153 -0
  139. fuzzycocopython-0.1.0/tests/test_fuzzycocopython.py +527 -0
  140. fuzzycocopython-0.1.0/tests/test_params_api.py +211 -0
  141. fuzzycocopython-0.1.0/tests/test_plotting.py +113 -0
  142. fuzzycocopython-0.1.0/tests/test_utils.py +126 -0
@@ -0,0 +1,67 @@
1
+ name: Build
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build:
11
+ name: ${{ matrix.os }} / Python ${{ matrix.python-version }}
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ include:
17
+ - os: ubuntu-latest
18
+ python-version: '3.10'
19
+ - os: ubuntu-latest
20
+ python-version: '3.11'
21
+ - os: ubuntu-latest
22
+ python-version: '3.12'
23
+ - os: ubuntu-latest
24
+ python-version: '3.13'
25
+ - os: ubuntu-latest
26
+ python-version: '3.14'
27
+ - os: macos-latest
28
+ python-version: '3.12'
29
+ - os: windows-latest
30
+ python-version: '3.12'
31
+
32
+ steps:
33
+ - name: Checkout repository
34
+ uses: actions/checkout@v4
35
+ with:
36
+ submodules: recursive
37
+
38
+ - name: Set up uv with Python
39
+ uses: astral-sh/setup-uv@v6
40
+ with:
41
+ python-version: ${{ matrix.python-version }}
42
+ activate-environment: true
43
+
44
+ - name: Install build dependencies
45
+ run: uv pip install build ninja cmake
46
+
47
+ - name: Install from source
48
+ run: uv pip install -e .
49
+
50
+ - name: Smoke test import (source build)
51
+ run: uv run python -c "import fuzzycocopython; print(fuzzycocopython.__version__)"
52
+
53
+ - name: Clean previous wheels
54
+ run: uv run python -c "import shutil; shutil.rmtree('dist', ignore_errors=True)"
55
+
56
+ - name: Build wheel
57
+ run: uv run python -m build --wheel --sdist
58
+
59
+ - name: Install from wheel
60
+ shell: bash
61
+ run: |
62
+ set -euo pipefail
63
+ wheel=$(ls dist/fuzzycocopython-*.whl | head -n 1)
64
+ uv pip install --force-reinstall "$wheel"
65
+
66
+ - name: Smoke test import (wheel)
67
+ run: uv run python -c "import fuzzycocopython; print(fuzzycocopython.__version__)"
@@ -0,0 +1,58 @@
1
+ name: docs
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ build-and-deploy:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write # for gh-pages deploy using GITHUB_TOKEN
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v4
16
+ with:
17
+ submodules: recursive
18
+
19
+ - name: Set up uv with Python
20
+ uses: astral-sh/setup-uv@v6
21
+ with:
22
+ python-version: '3.10'
23
+ activate-environment: true
24
+
25
+ - name: Install build toolchain
26
+ run: uv pip install build ninja cmake
27
+
28
+ - name: Install package and docs deps
29
+ run: uv pip install -e ".[dev,docs]"
30
+
31
+ - name: Run tests with coverage
32
+ run: uv run pytest
33
+
34
+ - name: Generate HTML coverage report
35
+ run: uv run coverage html
36
+
37
+ - name: Verify coverage threshold
38
+ run: uv run coverage report --fail-under=75
39
+
40
+ - name: Build Sphinx HTML
41
+ run: |
42
+ uv run sphinx-build -b html docs docs/_build/html
43
+
44
+ - name: Bundle coverage report into docs
45
+ run: |
46
+ rm -rf docs/_build/html/coverage
47
+ mkdir -p docs/_build/html/coverage
48
+ rsync -a htmlcov/ docs/_build/html/coverage/
49
+ rm -f docs/_build/html/coverage/.gitignore
50
+ ls docs/_build/html/coverage
51
+
52
+ - name: Deploy to GitHub Pages
53
+ uses: peaceiris/actions-gh-pages@v3
54
+ with:
55
+ github_token: ${{ secrets.GITHUB_TOKEN }}
56
+ publish_dir: docs/_build/html
57
+ publish_branch: gh-pages
58
+ force_orphan: true
@@ -0,0 +1,93 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+ inputs:
9
+ version:
10
+ description: "Version being published (for logging only)"
11
+ required: false
12
+
13
+ jobs:
14
+ build-wheels:
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ os: [ubuntu-latest, macos-latest, windows-latest]
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v4
23
+ with:
24
+ submodules: recursive
25
+
26
+ - name: Build wheels
27
+ uses: pypa/cibuildwheel@v3.3.1
28
+ env:
29
+ CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*"
30
+ CIBW_ENABLE: cpython-prerelease
31
+ CIBW_ARCHS_LINUX: x86_64
32
+ CIBW_ARCHS_MACOS: arm64
33
+ CIBW_ARCHS_WINDOWS: AMD64
34
+ CIBW_BEFORE_BUILD: pip install ninja cmake
35
+
36
+ - name: Upload wheel artifact
37
+ uses: actions/upload-artifact@v4
38
+ with:
39
+ name: wheels-${{ matrix.os }}
40
+ path: wheelhouse/*.whl
41
+
42
+ build-sdist:
43
+ runs-on: ubuntu-latest
44
+ steps:
45
+ - name: Checkout
46
+ uses: actions/checkout@v4
47
+ with:
48
+ submodules: recursive
49
+
50
+ - name: Set up uv with Python
51
+ uses: astral-sh/setup-uv@v6
52
+ with:
53
+ python-version: '3.10'
54
+ activate-environment: true
55
+
56
+ - name: Install build dependencies
57
+ run: uv pip install build
58
+
59
+ - name: Build sdist
60
+ run: |
61
+ uv run python -c "import shutil; shutil.rmtree('dist', ignore_errors=True)"
62
+ uv run python -m build --sdist --outdir dist
63
+
64
+ - name: Upload sdist artifact
65
+ uses: actions/upload-artifact@v4
66
+ with:
67
+ name: sdist
68
+ path: dist/*.tar.gz
69
+
70
+ publish:
71
+ runs-on: ubuntu-latest
72
+ needs:
73
+ - build-wheels
74
+ - build-sdist
75
+ permissions:
76
+ contents: read
77
+ steps:
78
+ - name: Download build artifacts
79
+ uses: actions/download-artifact@v4
80
+ with:
81
+ path: dist
82
+ merge-multiple: true
83
+
84
+ - name: List artifacts
85
+ run: ls -R dist
86
+
87
+ - name: Publish to PyPI
88
+ uses: pypa/gh-action-pypi-publish@v1.13.0
89
+ with:
90
+ user: __token__
91
+ password: ${{ secrets.PYPI_API_TOKEN }}
92
+ packages-dir: dist
93
+ verbose: true
@@ -0,0 +1,105 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ quality:
11
+ name: Lint & Type Check
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v4
16
+ with:
17
+ submodules: recursive
18
+
19
+ - name: Set up uv with Python 3.11
20
+ uses: astral-sh/setup-uv@v6
21
+ with:
22
+ python-version: "3.11"
23
+ activate-environment: true
24
+
25
+ - name: Install build toolchain
26
+ run: uv pip install build ninja cmake
27
+
28
+ - name: Install project
29
+ run: uv pip install -e .
30
+
31
+ - name: Install pre-commit
32
+ run: uv pip install pre-commit
33
+
34
+ - name: Run pre-commit hooks (all files)
35
+ run: uv run pre-commit run --all-files
36
+
37
+ tests:
38
+ name: Python ${{ matrix.python-version }}
39
+ runs-on: ubuntu-latest
40
+ needs: quality
41
+ permissions:
42
+ contents: write # <- minimal fix: allow git-auto-commit-action to push
43
+ strategy:
44
+ fail-fast: false
45
+ matrix:
46
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
47
+
48
+ steps:
49
+ - name: Checkout repository
50
+ uses: actions/checkout@v4
51
+ with:
52
+ submodules: recursive
53
+
54
+ - name: Set up uv with Python
55
+ uses: astral-sh/setup-uv@v6
56
+ with:
57
+ python-version: ${{ matrix.python-version }}
58
+ activate-environment: true
59
+
60
+ - name: Install build toolchain
61
+ run: uv pip install build ninja cmake
62
+
63
+ - name: Install project
64
+ run: uv pip install -e .[dev]
65
+
66
+ - name: Install test dependencies
67
+ run: uv pip install pytest pytest-cov
68
+
69
+ - name: Run pytest
70
+ run: uv run pytest
71
+
72
+ - name: Coverage report
73
+ if: matrix.python-version == '3.11'
74
+ run: |
75
+ set -euo pipefail
76
+ uv run coverage report --fail-under=75 | tee coverage-report.txt
77
+ {
78
+ echo "### Coverage summary (Python ${{ matrix.python-version }})"
79
+ echo
80
+ echo '```'
81
+ cat coverage-report.txt
82
+ echo '```'
83
+ } >> "$GITHUB_STEP_SUMMARY"
84
+
85
+ - name: Generate coverage badge
86
+ if: matrix.python-version == '3.11'
87
+ uses: tj-actions/coverage-badge-py@v2
88
+ with:
89
+ input: coverage.xml
90
+ output: badges/coverage.svg
91
+
92
+ - name: Upload coverage
93
+ if: matrix.python-version == '3.11'
94
+ uses: actions/upload-artifact@v4
95
+ with:
96
+ name: coverage-${{ github.sha }}
97
+ path: coverage.xml
98
+ retention-days: 7
99
+
100
+ - name: Commit coverage badge
101
+ if: matrix.python-version == '3.11' && github.ref == 'refs/heads/main' && github.event_name == 'push'
102
+ uses: stefanzweifel/git-auto-commit-action@v5
103
+ with:
104
+ commit_message: "chore: update coverage badge [skip ci]"
105
+ file_pattern: badges/coverage.svg
@@ -0,0 +1,112 @@
1
+ # History / local scratch
2
+ .history/
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+
9
+ # C extensions / compiled artifacts
10
+ *.so
11
+ *.pyd
12
+ *.dll
13
+ *.dylib
14
+ *.a
15
+ *.lib
16
+ *.o
17
+ *.obj
18
+ *.out
19
+ *.pdb
20
+ *.idb
21
+
22
+ # Packaging / distribution
23
+ .Python
24
+ build/
25
+ build/*
26
+ dist/
27
+ *.egg-info/
28
+ .eggs/
29
+ *.egg
30
+ *.whl
31
+ pip-wheel-metadata/
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Dependency / environment management
38
+ .env
39
+ .venv
40
+ uv.lock
41
+ env/
42
+ venv/
43
+ ENV/
44
+ .env.bak/
45
+ venv.bak/
46
+ .python-version
47
+
48
+ # Tool caches
49
+ .pytest_cache/
50
+ .tox/
51
+ .nox/
52
+ .mypy_cache/
53
+ .pyre/
54
+ .pytype/
55
+ ruff_cache/
56
+ .ruff_cache/
57
+ .hypothesis/
58
+
59
+ # Coverage / test reports
60
+ .coverage
61
+ .coverage.*
62
+ *.cover
63
+ *.py,cover
64
+ cover/
65
+ coverage.xml
66
+ htmlcov/
67
+ pytestdebug.log
68
+
69
+ # Profiling / performance
70
+ *.prof
71
+ .prof*
72
+
73
+ # Notebooks
74
+ .ipynb_checkpoints/
75
+ *.nbconvert.ipynb
76
+
77
+ # IDE / editor
78
+ .vscode/
79
+ .idea/
80
+ *.swp
81
+ *.swo
82
+ *.sublime-workspace
83
+ *.code-workspace
84
+ .DS_Store
85
+ .AppleDouble
86
+ .LSOverride
87
+
88
+ # CMake and native build
89
+ CMakeFiles/
90
+ CMakeCache.txt
91
+ cmake_install.cmake
92
+ Makefile
93
+ CTestTestfile.cmake
94
+ Testing/
95
+
96
+ # Submodule native build outputs
97
+ fuzzycoco/build/
98
+ fuzzycoco/bin/
99
+ fuzzycoco/lib/
100
+
101
+ # Logs / temp / misc
102
+ *.log
103
+ *.tmp
104
+ *.bak
105
+ *.old
106
+ *.swp
107
+
108
+ # Generated data / artifacts
109
+ results/
110
+ *.md.generated/
111
+ docs/_build/
112
+ .doctrees/
@@ -0,0 +1,4 @@
1
+ [submodule "fuzzycoco"]
2
+ path = fuzzycoco
3
+ url = https://github.com/arthurbabey/fuzzycoco.git
4
+ branch = main
@@ -0,0 +1,25 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ exclude: ^fuzzycoco/
4
+ repos:
5
+ - repo: https://github.com/pre-commit/pre-commit-hooks
6
+ rev: v4.6.0
7
+ hooks:
8
+ - id: trailing-whitespace
9
+ - id: end-of-file-fixer
10
+ - id: check-yaml
11
+ - id: check-added-large-files
12
+
13
+ - repo: https://github.com/astral-sh/ruff-pre-commit
14
+ rev: v0.6.8
15
+ hooks:
16
+ - id: ruff
17
+ name: ruff (lint)
18
+ args: ["--fix"]
19
+ - id: ruff-format
20
+
21
+ - repo: https://github.com/pre-commit/mirrors-mypy
22
+ rev: v1.11.2
23
+ hooks:
24
+ - id: mypy
25
+ args: ["--config-file", "pyproject.toml"]
@@ -0,0 +1,29 @@
1
+ cmake_minimum_required(VERSION 3.23)
2
+ project(fuzzycocopython LANGUAGES CXX)
3
+
4
+ set(CMAKE_CXX_STANDARD 17)
5
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
6
+
7
+ if(POLICY CMP0148)
8
+ cmake_policy(SET CMP0148 NEW)
9
+ endif()
10
+
11
+ find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
12
+ set(PYBIND11_FINDPYTHON ON)
13
+ find_package(pybind11 CONFIG REQUIRED)
14
+
15
+ # --- turn off tests/bench/examples in the subproject (cover common flags) ---
16
+ set(BUILD_TESTING OFF CACHE BOOL "Disable testing in subprojects" FORCE)
17
+ set(ENABLE_TESTING OFF CACHE BOOL "" FORCE)
18
+ set(FUZZYCOCO_BUILD_TESTS OFF CACHE BOOL "" FORCE)
19
+ set(FUZZYCOCO_ENABLE_TESTS OFF CACHE BOOL "" FORCE)
20
+ set(FUZZYCOCO_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
21
+ set(FUZZYCOCO_BUILD_BENCHMARKS OFF CACHE BOOL "" FORCE)
22
+
23
+ if(NOT MSVC)
24
+ add_compile_options(-Wno-error)
25
+ endif()
26
+
27
+ # bring in fuzzycoco
28
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/fuzzycoco EXCLUDE_FROM_ALL)
29
+ add_subdirectory(bindings)