crace 1.0.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 (169) hide show
  1. crace-1.0.0/.github/workflows/docs.yml +102 -0
  2. crace-1.0.0/.github/workflows/test.yml +79 -0
  3. crace-1.0.0/.github/workflows/wheels.yml +81 -0
  4. crace-1.0.0/LICENSE +674 -0
  5. crace-1.0.0/MANIFEST.in +4 -0
  6. crace-1.0.0/Makefile +3 -0
  7. crace-1.0.0/PKG-INFO +541 -0
  8. crace-1.0.0/README.md +515 -0
  9. crace-1.0.0/crace/__init__.py +36 -0
  10. crace-1.0.0/crace/_version.py +24 -0
  11. crace-1.0.0/crace/configurator/__init__.py +0 -0
  12. crace-1.0.0/crace/configurator/configurator.py +26 -0
  13. crace-1.0.0/crace/configurator/crace.py +105 -0
  14. crace-1.0.0/crace/configurator/irace.py +21 -0
  15. crace-1.0.0/crace/configurator/tester.py +206 -0
  16. crace-1.0.0/crace/containers/__init__.py +29 -0
  17. crace-1.0.0/crace/containers/configurations.py +720 -0
  18. crace-1.0.0/crace/containers/crace_option.py +943 -0
  19. crace-1.0.0/crace/containers/crace_options.py +795 -0
  20. crace-1.0.0/crace/containers/crace_results.py +430 -0
  21. crace-1.0.0/crace/containers/experiments.py +1536 -0
  22. crace-1.0.0/crace/containers/forbidden_expressions.py +41 -0
  23. crace-1.0.0/crace/containers/instances.py +563 -0
  24. crace-1.0.0/crace/containers/parameters.py +1237 -0
  25. crace-1.0.0/crace/containers/scenario.py +266 -0
  26. crace-1.0.0/crace/containers/toolbox.py +25 -0
  27. crace-1.0.0/crace/elimination_tests/__init__.py +2 -0
  28. crace-1.0.0/crace/elimination_tests/eliminator.py +158 -0
  29. crace-1.0.0/crace/elimination_tests/tests.py +1112 -0
  30. crace-1.0.0/crace/errors/__init__.py +56 -0
  31. crace-1.0.0/crace/execution/__init__.py +101 -0
  32. crace-1.0.0/crace/execution/execution_base.py +213 -0
  33. crace-1.0.0/crace/execution/execution_pool.py +332 -0
  34. crace-1.0.0/crace/execution/local_concurrent.py +295 -0
  35. crace-1.0.0/crace/execution/mpi.py +661 -0
  36. crace-1.0.0/crace/execution/target_evaluator.py +88 -0
  37. crace-1.0.0/crace/execution/target_runner.py +218 -0
  38. crace-1.0.0/crace/inst/bin/profile_main.py +99 -0
  39. crace-1.0.0/crace/inst/bin/profile_mpi.py +86 -0
  40. crace-1.0.0/crace/inst/bin/slurm_mpi +146 -0
  41. crace-1.0.0/crace/inst/bin/slurm_mpi_bind_cores +189 -0
  42. crace-1.0.0/crace/inst/examples/README.md +22 -0
  43. crace-1.0.0/crace/inst/examples/Spear/README +29 -0
  44. crace-1.0.0/crace/inst/examples/Spear/parameters-cat.txt +27 -0
  45. crace-1.0.0/crace/inst/examples/Spear/parameters-mixed.txt +27 -0
  46. crace-1.0.0/crace/inst/examples/Spear/scenario.txt +40 -0
  47. crace-1.0.0/crace/inst/examples/Spear/target-runner +80 -0
  48. crace-1.0.0/crace/inst/examples/acotsp/Instances/2000-1.tsp +2006 -0
  49. crace-1.0.0/crace/inst/examples/acotsp/Instances/2000-2.tsp +2006 -0
  50. crace-1.0.0/crace/inst/examples/acotsp/Instances/2000-3.tsp +2006 -0
  51. crace-1.0.0/crace/inst/examples/acotsp/Instances/2000-4.tsp +2006 -0
  52. crace-1.0.0/crace/inst/examples/acotsp/Instances/2000-5.tsp +2006 -0
  53. crace-1.0.0/crace/inst/examples/acotsp/default.txt +15 -0
  54. crace-1.0.0/crace/inst/examples/acotsp/forbidden.txt +12 -0
  55. crace-1.0.0/crace/inst/examples/acotsp/instance-list.txt +5 -0
  56. crace-1.0.0/crace/inst/examples/acotsp/parameters.txt +16 -0
  57. crace-1.0.0/crace/inst/examples/acotsp/scenario.txt +28 -0
  58. crace-1.0.0/crace/inst/examples/acotsp/target-runner +73 -0
  59. crace-1.0.0/crace/inst/examples/batchmode-cluster/README +2 -0
  60. crace-1.0.0/crace/inst/examples/batchmode-cluster/irace-sge-cluster +16 -0
  61. crace-1.0.0/crace/inst/examples/batchmode-cluster/target-evaluator +66 -0
  62. crace-1.0.0/crace/inst/examples/batchmode-cluster/target-runner-htcondor +69 -0
  63. crace-1.0.0/crace/inst/examples/batchmode-cluster/target-runner-pbs +59 -0
  64. crace-1.0.0/crace/inst/examples/batchmode-cluster/target-runner-sge +75 -0
  65. crace-1.0.0/crace/inst/examples/batchmode-cluster/target-runner-slurm +77 -0
  66. crace-1.0.0/crace/inst/examples/hypervolume/README +14 -0
  67. crace-1.0.0/crace/inst/examples/hypervolume/target-evaluator +105 -0
  68. crace-1.0.0/crace/inst/examples/hypervolume/target-runner +48 -0
  69. crace-1.0.0/crace/inst/examples/matlab/Main.m +19 -0
  70. crace-1.0.0/crace/inst/examples/matlab/instances.txt +10 -0
  71. crace-1.0.0/crace/inst/examples/matlab/parameters.txt +2 -0
  72. crace-1.0.0/crace/inst/examples/matlab/scenario.txt +80 -0
  73. crace-1.0.0/crace/inst/examples/mik/Instances/mik.250-1-50.1.mps +8713 -0
  74. crace-1.0.0/crace/inst/examples/mik/Instances/mik.250-1-50.2.mps +8713 -0
  75. crace-1.0.0/crace/inst/examples/mik/Instances/mik.250-1-50.3.mps +8713 -0
  76. crace-1.0.0/crace/inst/examples/mik/Instances/mik.250-5-50.1.mps +8929 -0
  77. crace-1.0.0/crace/inst/examples/mik/Instances/mik.250-5-50.2.mps +8929 -0
  78. crace-1.0.0/crace/inst/examples/mik/Instances/mik.250-5-50.3.mps +8929 -0
  79. crace-1.0.0/crace/inst/examples/mik/aclib/executable/cplex12.6_wrapper.rb +92 -0
  80. crace-1.0.0/crace/inst/examples/mik/aclib/executable/cplex12.6_wrapper_aclib.rb +223 -0
  81. crace-1.0.0/crace/inst/examples/mik/aclib/executable/run_cplex12.6.rb +81 -0
  82. crace-1.0.0/crace/inst/examples/mik/default.txt +16 -0
  83. crace-1.0.0/crace/inst/examples/mik/instance-list.txt +6 -0
  84. crace-1.0.0/crace/inst/examples/mik/parameters.txt +227 -0
  85. crace-1.0.0/crace/inst/examples/mik/scenario.txt +32 -0
  86. crace-1.0.0/crace/inst/examples/mik/target-runner +114 -0
  87. crace-1.0.0/crace/inst/examples/moaco/README +29 -0
  88. crace-1.0.0/crace/inst/examples/moaco/parameters.txt +41 -0
  89. crace-1.0.0/crace/inst/examples/moaco/scenario.txt +13 -0
  90. crace-1.0.0/crace/inst/examples/moaco/target-evaluator +107 -0
  91. crace-1.0.0/crace/inst/examples/moaco/target-runner +62 -0
  92. crace-1.0.0/crace/inst/examples/slurm/job.sh +43 -0
  93. crace-1.0.0/crace/inst/examples/slurm/run_irace.R +42 -0
  94. crace-1.0.0/crace/inst/examples/target-runner-c/instances.txt +4 -0
  95. crace-1.0.0/crace/inst/examples/target-runner-c/parameters.txt +5 -0
  96. crace-1.0.0/crace/inst/examples/target-runner-c/scenario.txt +2 -0
  97. crace-1.0.0/crace/inst/examples/target-runner-c/target-runner.c +128 -0
  98. crace-1.0.0/crace/inst/examples/target-runner-python/target-runner-acotsp.py +99 -0
  99. crace-1.0.0/crace/inst/examples/target-runner-python/target-runner-advanced.py +433 -0
  100. crace-1.0.0/crace/inst/examples/target-runner-python/target-runner-python-win.bat +28 -0
  101. crace-1.0.0/crace/inst/examples/target-runner-python/trivial/instances.txt +2 -0
  102. crace-1.0.0/crace/inst/examples/target-runner-python/trivial/parameters.txt +4 -0
  103. crace-1.0.0/crace/inst/examples/target-runner-python/trivial/scenario.txt +4 -0
  104. crace-1.0.0/crace/inst/examples/target-runner-python/trivial/target-runner.py +80 -0
  105. crace-1.0.0/crace/inst/examples/win/instances.txt +9 -0
  106. crace-1.0.0/crace/inst/examples/win/parameters.txt +2 -0
  107. crace-1.0.0/crace/inst/examples/win/runner.exe +0 -0
  108. crace-1.0.0/crace/inst/examples/win/scenario.txt +8 -0
  109. crace-1.0.0/crace/inst/examples/win/src/CMakeLists.txt +4 -0
  110. crace-1.0.0/crace/inst/examples/win/src/runner.cpp +44 -0
  111. crace-1.0.0/crace/inst/examples/win/target-runner.bat +37 -0
  112. crace-1.0.0/crace/inst/output_sed.sh +46 -0
  113. crace-1.0.0/crace/inst/templates/configurations.txt +15 -0
  114. crace-1.0.0/crace/inst/templates/forbidden.txt +10 -0
  115. crace-1.0.0/crace/inst/templates/ins/2000-1.tsp +2006 -0
  116. crace-1.0.0/crace/inst/templates/ins/2000-2.tsp +2006 -0
  117. crace-1.0.0/crace/inst/templates/ins/2000-3.tsp +2006 -0
  118. crace-1.0.0/crace/inst/templates/ins/2000-4.tsp +2006 -0
  119. crace-1.0.0/crace/inst/templates/ins/2000-5.tsp +2006 -0
  120. crace-1.0.0/crace/inst/templates/instances-list.txt +12 -0
  121. crace-1.0.0/crace/inst/templates/parameters.txt +36 -0
  122. crace-1.0.0/crace/inst/templates/scenario.txt +212 -0
  123. crace-1.0.0/crace/inst/templates/target-runner +80 -0
  124. crace-1.0.0/crace/inst/templates/windows/target-runner.bat +66 -0
  125. crace-1.0.0/crace/models/__init__.py +0 -0
  126. crace-1.0.0/crace/models/model.py +1290 -0
  127. crace-1.0.0/crace/race/__init__.py +0 -0
  128. crace-1.0.0/crace/race/race.py +2368 -0
  129. crace-1.0.0/crace/race/race_log.py +660 -0
  130. crace-1.0.0/crace/scripts/__init__.py +71 -0
  131. crace-1.0.0/crace/scripts/crace-guide +12 -0
  132. crace-1.0.0/crace/scripts/crace-main +3 -0
  133. crace-1.0.0/crace/scripts/crace-mpi +3 -0
  134. crace-1.0.0/crace/scripts/crace-parallel +89 -0
  135. crace-1.0.0/crace/scripts/main.py +156 -0
  136. crace-1.0.0/crace/scripts/mpi.py +99 -0
  137. crace-1.0.0/crace/scripts/parallel.py +107 -0
  138. crace-1.0.0/crace/scripts/utils.py +216 -0
  139. crace-1.0.0/crace/settings/__init__.py +0 -0
  140. crace-1.0.0/crace/settings/crace_options.json +1048 -0
  141. crace-1.0.0/crace/settings/description.py +67 -0
  142. crace-1.0.0/crace/threads/__init__.py +120 -0
  143. crace-1.0.0/crace/utils/__init__.py +157 -0
  144. crace-1.0.0/crace/utils/const.py +6 -0
  145. crace-1.0.0/crace/utils/format.py +159 -0
  146. crace-1.0.0/crace/utils/logger.py +113 -0
  147. crace-1.0.0/crace/utils/reader.py +102 -0
  148. crace-1.0.0/crace/vignettes/crace-package.pdf +0 -0
  149. crace-1.0.0/crace.egg-info/PKG-INFO +541 -0
  150. crace-1.0.0/crace.egg-info/SOURCES.txt +167 -0
  151. crace-1.0.0/crace.egg-info/dependency_links.txt +1 -0
  152. crace-1.0.0/crace.egg-info/entry_points.txt +2 -0
  153. crace-1.0.0/crace.egg-info/requires.txt +9 -0
  154. crace-1.0.0/crace.egg-info/top_level.txt +3 -0
  155. crace-1.0.0/docs/_config.yml +48 -0
  156. crace-1.0.0/docs/_static/css/custom.css +168 -0
  157. crace-1.0.0/docs/_static/js/navbar.js +40 -0
  158. crace-1.0.0/docs/_toc.yml +4 -0
  159. crace-1.0.0/docs/index.md +4 -0
  160. crace-1.0.0/docs/references/404.md +3 -0
  161. crace-1.0.0/docs/references/CITIATION.bib +31 -0
  162. crace-1.0.0/docs/references/LICENSE.md +157 -0
  163. crace-1.0.0/docs/references/authors.md +57 -0
  164. crace-1.0.0/docs/references/index.md +43 -0
  165. crace-1.0.0/docs/requirements.txt +4 -0
  166. crace-1.0.0/generate_pyproject.py +131 -0
  167. crace-1.0.0/pyproject.toml +54 -0
  168. crace-1.0.0/setup.cfg +4 -0
  169. crace-1.0.0/setup.py +96 -0
@@ -0,0 +1,102 @@
1
+ # ============================================================
2
+ # GitHub Actions Workflow: Deploy documentation
3
+ #
4
+ # This workflow builds the project documentation using
5
+ # Jupyter Book and deploys the generated HTML pages to
6
+ # GitHub Pages.
7
+ #
8
+ # Trigger:
9
+ # - Runs automatically when files under docs/** are pushed
10
+ # to the main branch.
11
+ #
12
+ # Workflow steps:
13
+ # 1. Checkout repository source code.
14
+ # 2. Set up Python environment.
15
+ # 3. Install documentation dependencies.
16
+ # 4. Synchronize required static files.
17
+ # 5. Build documentation with Jupyter Book.
18
+ # 6. Upload generated HTML as a GitHub Pages artifact.
19
+ # 7. Deploy the artifact to GitHub Pages.
20
+ #
21
+ # The deployed documentation will be available at:
22
+ # https://race-autoconfig.github.io/crace/
23
+ #
24
+ # ============================================================
25
+
26
+ name: Deploy documentation
27
+
28
+ on:
29
+ push:
30
+ branches: [main]
31
+ paths:
32
+ - "docs/**"
33
+
34
+ permissions:
35
+ contents: read
36
+ pages: write
37
+ id-token: write
38
+
39
+ concurrency:
40
+ group: "pages"
41
+ cancel-in-progress: false
42
+
43
+ jobs:
44
+ deploy:
45
+ environment:
46
+ name: github-pages
47
+ url: ${{ steps.deployment.outputs.page_url }}
48
+ runs-on: ubuntu-latest
49
+
50
+ steps:
51
+ - name: Checkout
52
+ uses: actions/checkout@v4
53
+
54
+ - name: Check docs changes
55
+ id: changes
56
+ run: |
57
+ if [ -z "${{ github.event.before }}" ]; then
58
+ echo "changed=true" >> $GITHUB_OUTPUT
59
+ exit 0
60
+ fi
61
+
62
+ CHANGED=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep "^docs/" || true)
63
+
64
+ if [ -n "$CHANGED" ]; then
65
+ echo "changed=true" >> $GITHUB_OUTPUT
66
+ else
67
+ echo "changed=false" >> $GITHUB_OUTPUT
68
+ fi
69
+
70
+ - name: Skip if no changes
71
+ if: steps.changes.outputs.changed == 'false'
72
+ run: |
73
+ echo "No changes in docs/, skipping deployment."
74
+ exit 0
75
+
76
+ - name: Setup Python
77
+ if: steps.changes.outputs.changed == 'true'
78
+ uses: actions/setup-python@v5
79
+ with:
80
+ python-version: "3.10"
81
+
82
+ - name: Install dependencies
83
+ if: steps.changes.outputs.changed == 'true'
84
+ run: |
85
+ pip install --upgrade pip
86
+ pip install -r docs/requirements.txt
87
+
88
+ - name: Build docs
89
+ if: steps.changes.outputs.changed == 'true'
90
+ run: |
91
+ jupyter-book build docs
92
+
93
+ - name: Upload artifact
94
+ if: steps.changes.outputs.changed == 'true'
95
+ uses: actions/upload-pages-artifact@v3
96
+ with:
97
+ path: docs/_build/html
98
+
99
+ - name: Deploy to GitHub Pages
100
+ if: steps.changes.outputs.changed == 'true'
101
+ id: deployment
102
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,79 @@
1
+ # ============================================================
2
+ # GitHub Actions Workflow: Build and publish package to TestPyPI
3
+ #
4
+ # This workflow builds the source distribution (sdist) and
5
+ # wheel for the project and publishes them to TestPyPI using
6
+ # Trusted Publishing.
7
+ #
8
+ # Trigger:
9
+ # - Runs automatically when a GitHub release is published.
10
+ #
11
+ # Steps:
12
+ # 1. Checkout repository
13
+ # 2. Set up Python environment
14
+ # 3. Install build dependencies
15
+ # 4. Build sdist and wheel
16
+ # 5. Upload package to TestPyPI
17
+ # ============================================================
18
+ name: Publish to TestPyPI
19
+
20
+ on:
21
+ workflow_dispatch:
22
+
23
+ permissions:
24
+ contents: read
25
+ id-token: write
26
+
27
+ jobs:
28
+ build-and-publish-test:
29
+ runs-on: ubuntu-latest
30
+ environment: publish-testpypi
31
+
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+
35
+ - uses: actions/setup-python@v5
36
+ with:
37
+ python-version: "3.x"
38
+
39
+ - name: Install dependencies
40
+ run: |
41
+ python -m pip install --upgrade pip
42
+ pip install build twine setuptools wheel
43
+
44
+ - name: Build package
45
+ run: python -m build
46
+
47
+ - name: Check distribution
48
+ run: twine check dist/*
49
+
50
+ - name: Get version
51
+ id: version
52
+ run: echo "VERSION=$(python -c 'from description import version; print(version)')" >> $GITHUB_OUTPUT
53
+
54
+ - name: Publish to TestPyPI
55
+ uses: pypa/gh-action-pypi-publish@release/v1
56
+ with:
57
+ repository-url: https://test.pypi.org/legacy/
58
+
59
+ - name: Wait for availability
60
+ run: sleep 10
61
+
62
+ - name: Test install from TestPyPI
63
+ run: |
64
+ pip install --no-cache-dir \
65
+ -i https://test.pypi.org/simple/ \
66
+ --extra-index-url https://pypi.org/simple \
67
+ crace==${{ steps.version.outputs.VERSION }}
68
+
69
+ - name: Verify version
70
+ run: |
71
+ VERSION=$(python -c "from description import version; print(version)")
72
+ INSTALLED=$(python -c "import crace; print(crace.__version__)")
73
+ if [ "$VERSION" != "$INSTALLED" ]; then
74
+ echo "Version mismatch: $VERSION vs $INSTALLED"
75
+ exit 1
76
+ fi
77
+
78
+ - name: Test CLI
79
+ run: crace --help
@@ -0,0 +1,81 @@
1
+ # ============================================================
2
+ # GitHub Actions Workflow: Build and publish package to PyPI
3
+ #
4
+ # This workflow builds the source distribution (sdist) and
5
+ # wheel for the project and publishes them to PyPI using
6
+ # Trusted Publishing.
7
+ #
8
+ # Trigger:
9
+ # - Runs automatically when a GitHub release is published.
10
+ #
11
+ # Steps:
12
+ # 1. Checkout repository
13
+ # 2. Set up Python environment
14
+ # 3. Install build dependencies
15
+ # 4. Build sdist and wheel
16
+ # 5. Upload package to PyPI
17
+ # ============================================================
18
+
19
+ name: Wheel builder
20
+
21
+ on:
22
+ release:
23
+ types: [published]
24
+
25
+ permissions:
26
+ contents: read
27
+ id-token: write
28
+
29
+ jobs:
30
+ build-and-publish:
31
+ runs-on: ubuntu-latest
32
+ environment: publish-pypi
33
+
34
+ steps:
35
+ - name: Checkout repository
36
+ uses: actions/checkout@v4
37
+ with:
38
+ fetch-depth: 0
39
+
40
+ - name: Set up Python
41
+ uses: actions/setup-python@v5
42
+ with:
43
+ python-version: "3.x"
44
+
45
+ - name: Install build dependencies
46
+ run: |
47
+ python -m pip install --upgrade pip
48
+ pip install build twine
49
+
50
+ - name: Check tag format
51
+ run: |
52
+ TAG=${GITHUB_REF#refs/tags/}
53
+ echo "Tag: $TAG"
54
+
55
+ if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([a-z0-9\.]*)?$ ]]; then
56
+ echo "❌ Invalid tag format: $TAG"
57
+ exit 1
58
+ fi
59
+
60
+ if [[ "$TAG" == *".dev"* ]]; then
61
+ echo "❌ Refusing to publish dev version"
62
+ exit 1
63
+ fi
64
+
65
+ - name: Build package
66
+ run: python -m build
67
+
68
+ - name: Show built files
69
+ run: ls -lh dist
70
+
71
+ - name: Check distribution
72
+ run: twine check dist/*
73
+
74
+ - name: Upload artifact
75
+ uses: actions/upload-artifact@v4
76
+ with:
77
+ name: dist
78
+ path: dist/
79
+
80
+ - name: Publish to PyPI
81
+ uses: pypa/gh-action-pypi-publish@release/v1