retrocast 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 (231) hide show
  1. retrocast-0/.github/release-drafter.yml +70 -0
  2. retrocast-0/.github/workflows/publish-pypi.yml +33 -0
  3. retrocast-0/.github/workflows/publish-release.yml +29 -0
  4. retrocast-0/.github/workflows/release-drafter.yml +55 -0
  5. retrocast-0/.github/workflows/tests.yml +98 -0
  6. retrocast-0/.github/workflows/typing.yml +52 -0
  7. retrocast-0/.github/workflows/update-major-minor-tags.yml +17 -0
  8. retrocast-0/.gitignore +91 -0
  9. retrocast-0/.pre-commit-config.yaml +20 -0
  10. retrocast-0/.python-version +1 -0
  11. retrocast-0/LICENSE +21 -0
  12. retrocast-0/PKG-INFO +221 -0
  13. retrocast-0/README.md +179 -0
  14. retrocast-0/data/0-assets/model-configs/aizynthfinder/config-mcts-high.yaml +15 -0
  15. retrocast-0/data/0-assets/model-configs/aizynthfinder/config-mcts.yaml +15 -0
  16. retrocast-0/data/0-assets/model-configs/aizynthfinder/config-retrostar-high.yaml +24 -0
  17. retrocast-0/data/0-assets/model-configs/aizynthfinder/config-retrostar.yaml +24 -0
  18. retrocast-0/data/0-assets/model-configs/dms/dms_dictionary.yaml +111 -0
  19. retrocast-0/data/0-assets/model-configs/synplanner/search-config-high.yaml +21 -0
  20. retrocast-0/data/0-assets/model-configs/synplanner/search-config.yaml +21 -0
  21. retrocast-0/data/0-assets/model-configs/synplanner/search-eval-config-high.yaml +21 -0
  22. retrocast-0/data/0-assets/model-configs/synplanner/search-eval-config.yaml +21 -0
  23. retrocast-0/data/1-benchmarks/definitions/mkt-cnv-160.manifest.json +32 -0
  24. retrocast-0/data/1-benchmarks/definitions/mkt-lin-500.manifest.json +32 -0
  25. retrocast-0/data/1-benchmarks/definitions/paroutes-n1-full-buyables-pruned.manifest.json +33 -0
  26. retrocast-0/data/1-benchmarks/definitions/paroutes-n1-full-pruned.manifest.json +32 -0
  27. retrocast-0/data/1-benchmarks/definitions/paroutes-n5-full-buyables-pruned.manifest.json +33 -0
  28. retrocast-0/data/1-benchmarks/definitions/paroutes-n5-full-pruned.manifest.json +32 -0
  29. retrocast-0/data/1-benchmarks/definitions/random-n5-100.manifest.json +32 -0
  30. retrocast-0/data/1-benchmarks/definitions/random-n5-1000.manifest.json +32 -0
  31. retrocast-0/data/1-benchmarks/definitions/random-n5-2000.manifest.json +32 -0
  32. retrocast-0/data/1-benchmarks/definitions/random-n5-250.manifest.json +32 -0
  33. retrocast-0/data/1-benchmarks/definitions/random-n5-50.manifest.json +32 -0
  34. retrocast-0/data/1-benchmarks/definitions/random-n5-500.manifest.json +32 -0
  35. retrocast-0/data/1-benchmarks/definitions/ref-cnv-400.manifest.json +32 -0
  36. retrocast-0/data/1-benchmarks/definitions/ref-lin-600.manifest.json +32 -0
  37. retrocast-0/data/1-benchmarks/definitions/ref-lng-84.manifest.json +37 -0
  38. retrocast-0/data/1-benchmarks/definitions/uspto-190.manifest.json +28 -0
  39. retrocast-0/data/1-benchmarks/definitions/uspto-83.manifest.json +28 -0
  40. retrocast-0/data/1-benchmarks/stocks/buyables-stock.manifest.json +38 -0
  41. retrocast-0/data/1-benchmarks/stocks/n1-n5-stock.manifest.json +38 -0
  42. retrocast-0/data/1-benchmarks/stocks/n1-stock.manifest.json +38 -0
  43. retrocast-0/data/1-benchmarks/stocks/n5-stock.manifest.json +38 -0
  44. retrocast-0/docs/adapters.md +193 -0
  45. retrocast-0/docs/benchmarks.md +66 -0
  46. retrocast-0/docs/cli.md +124 -0
  47. retrocast-0/docs/concepts.md +133 -0
  48. retrocast-0/docs/library.md +131 -0
  49. retrocast-0/docs/log.md +148 -0
  50. retrocast-0/docs/quickstart.md +99 -0
  51. retrocast-0/docs/workflows.md +117 -0
  52. retrocast-0/pyproject.toml +156 -0
  53. retrocast-0/retrocast-config.yaml +54 -0
  54. retrocast-0/scripts/01-canonicalize-stock.py +196 -0
  55. retrocast-0/scripts/02-compare.py +93 -0
  56. retrocast-0/scripts/03-compare-paired.py +112 -0
  57. retrocast-0/scripts/04-rank.py +98 -0
  58. retrocast-0/scripts/05-tournament.py +91 -0
  59. retrocast-0/scripts/06-check-seed-stability.py +130 -0
  60. retrocast-0/scripts/07-create-model-profile.py +152 -0
  61. retrocast-0/scripts/aizynthfinder/1-download-assets.py +108 -0
  62. retrocast-0/scripts/aizynthfinder/2-prepare-stock.py +133 -0
  63. retrocast-0/scripts/aizynthfinder/3-run-aizyn-mcts.py +135 -0
  64. retrocast-0/scripts/aizynthfinder/4-run-aizyn-retro-star.py +112 -0
  65. retrocast-0/scripts/askcos/0-prep.sh +24 -0
  66. retrocast-0/scripts/askcos/1-gather-askcos-results.py +32 -0
  67. retrocast-0/scripts/askcos/1-run-askcos.py +170 -0
  68. retrocast-0/scripts/batch-run.sh +132 -0
  69. retrocast-0/scripts/curation/uspto-190/check-reaction-direction.py +81 -0
  70. retrocast-0/scripts/curation/uspto-190/create-benchmark-from-pickle.py +202 -0
  71. retrocast-0/scripts/dev/canonicalize-stock.py +57 -0
  72. retrocast-0/scripts/dev/check-stock-overlap.py +31 -0
  73. retrocast-0/scripts/dev/create-tarball.sh +320 -0
  74. retrocast-0/scripts/directmultistep/1-download-assets.sh +51 -0
  75. retrocast-0/scripts/directmultistep/2-run-dms.py +188 -0
  76. retrocast-0/scripts/directmultistep/3-combine-results.py +119 -0
  77. retrocast-0/scripts/directmultistep/ingest-dms-legacy.py +106 -0
  78. retrocast-0/scripts/directmultistep/run-ingest.sh +49 -0
  79. retrocast-0/scripts/dreamretroer/1-create-time-summary.py +35 -0
  80. retrocast-0/scripts/migrations/01-reexport-benchmarks-with-hashes.py +101 -0
  81. retrocast-0/scripts/multistepttl/1-serialize-pickles.py +71 -0
  82. retrocast-0/scripts/paroutes/01-cast-paroutes.py +171 -0
  83. retrocast-0/scripts/paroutes/02-create-subsets.py +201 -0
  84. retrocast-0/scripts/paroutes/03-visualize-routes.py +51 -0
  85. retrocast-0/scripts/retrochimera/1-gather-chimera-results.py +32 -0
  86. retrocast-0/scripts/retrostar/1-download-assets.sh +20 -0
  87. retrocast-0/scripts/retrostar/2-run-og-retro-star.py +140 -0
  88. retrocast-0/scripts/sync-cluster.sh +42 -0
  89. retrocast-0/scripts/synllama/1-convert-to-json.py +95 -0
  90. retrocast-0/scripts/synplanner/1-download-assets.py +12 -0
  91. retrocast-0/scripts/synplanner/2-run-synp-eval.py +163 -0
  92. retrocast-0/scripts/synplanner/3-run-synp-rollout.py +163 -0
  93. retrocast-0/scripts/syntheseus/1-run-synth-bfs-local-retro.py +150 -0
  94. retrocast-0/scripts/syntheseus/2-run-synth-retro0-local-retro.py +162 -0
  95. retrocast-0/scripts/verify-hash.py +180 -0
  96. retrocast-0/setup.cfg +4 -0
  97. retrocast-0/src/retrocast/__init__.py +56 -0
  98. retrocast-0/src/retrocast/adapters/__init__.py +169 -0
  99. retrocast-0/src/retrocast/adapters/aizynth_adapter.py +88 -0
  100. retrocast-0/src/retrocast/adapters/askcos_adapter.py +256 -0
  101. retrocast-0/src/retrocast/adapters/base_adapter.py +43 -0
  102. retrocast-0/src/retrocast/adapters/common.py +193 -0
  103. retrocast-0/src/retrocast/adapters/dms_adapter.py +144 -0
  104. retrocast-0/src/retrocast/adapters/dreamretro_adapter.py +112 -0
  105. retrocast-0/src/retrocast/adapters/factory.py +37 -0
  106. retrocast-0/src/retrocast/adapters/multistepttl_adapter.py +125 -0
  107. retrocast-0/src/retrocast/adapters/paroutes_adapter.py +263 -0
  108. retrocast-0/src/retrocast/adapters/retrochimera_adapter.py +186 -0
  109. retrocast-0/src/retrocast/adapters/retrostar_adapter.py +115 -0
  110. retrocast-0/src/retrocast/adapters/synllama_adapter.py +163 -0
  111. retrocast-0/src/retrocast/adapters/synplanner_adapter.py +148 -0
  112. retrocast-0/src/retrocast/adapters/syntheseus_adapter.py +89 -0
  113. retrocast-0/src/retrocast/api.py +79 -0
  114. retrocast-0/src/retrocast/chem.py +196 -0
  115. retrocast-0/src/retrocast/cli/__init__.py +0 -0
  116. retrocast-0/src/retrocast/cli/adhoc.py +338 -0
  117. retrocast-0/src/retrocast/cli/handlers.py +462 -0
  118. retrocast-0/src/retrocast/cli/main.py +189 -0
  119. retrocast-0/src/retrocast/curation/__init__.py +15 -0
  120. retrocast-0/src/retrocast/curation/filtering.py +205 -0
  121. retrocast-0/src/retrocast/curation/generators.py +296 -0
  122. retrocast-0/src/retrocast/curation/sampling.py +142 -0
  123. retrocast-0/src/retrocast/exceptions.py +52 -0
  124. retrocast-0/src/retrocast/io/__init__.py +39 -0
  125. retrocast-0/src/retrocast/io/blob.py +43 -0
  126. retrocast-0/src/retrocast/io/data.py +312 -0
  127. retrocast-0/src/retrocast/io/provenance.py +233 -0
  128. retrocast-0/src/retrocast/metrics/__init__.py +0 -0
  129. retrocast-0/src/retrocast/metrics/bootstrap.py +200 -0
  130. retrocast-0/src/retrocast/metrics/diversity.py +0 -0
  131. retrocast-0/src/retrocast/metrics/ranking.py +109 -0
  132. retrocast-0/src/retrocast/metrics/similarity.py +28 -0
  133. retrocast-0/src/retrocast/metrics/solvability.py +24 -0
  134. retrocast-0/src/retrocast/models/__init__.py +0 -0
  135. retrocast-0/src/retrocast/models/benchmark.py +274 -0
  136. retrocast-0/src/retrocast/models/chem.py +372 -0
  137. retrocast-0/src/retrocast/models/evaluation.py +54 -0
  138. retrocast-0/src/retrocast/models/provenance.py +69 -0
  139. retrocast-0/src/retrocast/models/stats.py +59 -0
  140. retrocast-0/src/retrocast/resources/__init__.py +0 -0
  141. retrocast-0/src/retrocast/resources/default_config.yaml +54 -0
  142. retrocast-0/src/retrocast/typing.py +11 -0
  143. retrocast-0/src/retrocast/utils/__init__.py +0 -0
  144. retrocast-0/src/retrocast/utils/logging.py +35 -0
  145. retrocast-0/src/retrocast/utils/serializers.py +211 -0
  146. retrocast-0/src/retrocast/visualization/adapters.py +289 -0
  147. retrocast-0/src/retrocast/visualization/model_performance.py +464 -0
  148. retrocast-0/src/retrocast/visualization/plots.py +386 -0
  149. retrocast-0/src/retrocast/visualization/report.py +258 -0
  150. retrocast-0/src/retrocast/visualization/routes.py +244 -0
  151. retrocast-0/src/retrocast/visualization/theme.py +127 -0
  152. retrocast-0/src/retrocast/workflow/__init__.py +0 -0
  153. retrocast-0/src/retrocast/workflow/analyze.py +58 -0
  154. retrocast-0/src/retrocast/workflow/ingest.py +122 -0
  155. retrocast-0/src/retrocast/workflow/score.py +107 -0
  156. retrocast-0/src/retrocast/workflow/verify.py +192 -0
  157. retrocast-0/src/retrocast.egg-info/PKG-INFO +221 -0
  158. retrocast-0/src/retrocast.egg-info/SOURCES.txt +229 -0
  159. retrocast-0/src/retrocast.egg-info/dependency_links.txt +1 -0
  160. retrocast-0/src/retrocast.egg-info/entry_points.txt +2 -0
  161. retrocast-0/src/retrocast.egg-info/requires.txt +36 -0
  162. retrocast-0/src/retrocast.egg-info/top_level.txt +1 -0
  163. retrocast-0/tests/__init__.py +0 -0
  164. retrocast-0/tests/adapters/conftest.py +102 -0
  165. retrocast-0/tests/adapters/test_aizynth_adapter.py +196 -0
  166. retrocast-0/tests/adapters/test_askcos_adapter.py +252 -0
  167. retrocast-0/tests/adapters/test_base_adapter.py +94 -0
  168. retrocast-0/tests/adapters/test_common.py +110 -0
  169. retrocast-0/tests/adapters/test_dms_adapter.py +231 -0
  170. retrocast-0/tests/adapters/test_dreamretro_adapter.py +227 -0
  171. retrocast-0/tests/adapters/test_factory.py +39 -0
  172. retrocast-0/tests/adapters/test_multistepttl_adapter.py +205 -0
  173. retrocast-0/tests/adapters/test_paroutes_adapter.py +509 -0
  174. retrocast-0/tests/adapters/test_retrochimera_adapter.py +180 -0
  175. retrocast-0/tests/adapters/test_retrostar_adapter.py +260 -0
  176. retrocast-0/tests/adapters/test_synllama_adapter.py +223 -0
  177. retrocast-0/tests/adapters/test_synplanner_adapter.py +271 -0
  178. retrocast-0/tests/adapters/test_syntheseus_adapter.py +157 -0
  179. retrocast-0/tests/cli/__init__.py +0 -0
  180. retrocast-0/tests/cli/test_adhoc.py +384 -0
  181. retrocast-0/tests/cli/test_cli.py +210 -0
  182. retrocast-0/tests/cli/test_handlers.py +456 -0
  183. retrocast-0/tests/conftest.py +280 -0
  184. retrocast-0/tests/curation/__init__.py +1 -0
  185. retrocast-0/tests/curation/test_filtering.py +451 -0
  186. retrocast-0/tests/curation/test_generators.py +720 -0
  187. retrocast-0/tests/curation/test_sampling.py +417 -0
  188. retrocast-0/tests/helpers.py +55 -0
  189. retrocast-0/tests/io/__init__.py +0 -0
  190. retrocast-0/tests/io/test_roundtrip.py +887 -0
  191. retrocast-0/tests/metrics/__init__.py +0 -0
  192. retrocast-0/tests/metrics/test_bootstrap.py +577 -0
  193. retrocast-0/tests/metrics/test_ranking.py +462 -0
  194. retrocast-0/tests/models/__init__.py +1 -0
  195. retrocast-0/tests/models/test_molecule.py +236 -0
  196. retrocast-0/tests/models/test_pharma_routes.py +138 -0
  197. retrocast-0/tests/models/test_reaction_step.py +175 -0
  198. retrocast-0/tests/models/test_route.py +484 -0
  199. retrocast-0/tests/models/test_route_hashing.py +136 -0
  200. retrocast-0/tests/models/test_route_properties.py +378 -0
  201. retrocast-0/tests/models/test_route_signatures.py +285 -0
  202. retrocast-0/tests/smoke_test.py +170 -0
  203. retrocast-0/tests/smoke_test_library.py +213 -0
  204. retrocast-0/tests/test_chem.py +297 -0
  205. retrocast-0/tests/testing_data/model-predictions/aizynthfinder-mcts/results.json.gz +0 -0
  206. retrocast-0/tests/testing_data/model-predictions/aizynthfinder-mcts/summary.json +1 -0
  207. retrocast-0/tests/testing_data/model-predictions/aizynthfinder-retro-star/results.json.gz +0 -0
  208. retrocast-0/tests/testing_data/model-predictions/aizynthfinder-retro-star/summary.json +1 -0
  209. retrocast-0/tests/testing_data/model-predictions/askcos/results.json.gz +0 -0
  210. retrocast-0/tests/testing_data/model-predictions/dms-flash-fp16/summary.json +5 -0
  211. retrocast-0/tests/testing_data/model-predictions/dms-flash-fp16/ursa_bb_results.json.gz +0 -0
  212. retrocast-0/tests/testing_data/model-predictions/dreamretro/results.json.gz +0 -0
  213. retrocast-0/tests/testing_data/model-predictions/multistepttl/ibuprofen_multistepttl/2025_10_13__132140__prediction.pkl +0 -0
  214. retrocast-0/tests/testing_data/model-predictions/multistepttl/ibuprofen_multistepttl/2025_10_13__132140__tree.pkl +0 -0
  215. retrocast-0/tests/testing_data/model-predictions/multistepttl/paracetamol_multistepttl/2025_10_13__133407__prediction.pkl +0 -0
  216. retrocast-0/tests/testing_data/model-predictions/multistepttl/paracetamol_multistepttl/2025_10_13__133407__tree.pkl +0 -0
  217. retrocast-0/tests/testing_data/model-predictions/retro-star/results.json.gz +0 -0
  218. retrocast-0/tests/testing_data/model-predictions/retro-star/summary.json +1 -0
  219. retrocast-0/tests/testing_data/model-predictions/retrochimera/results.json.gz +0 -0
  220. retrocast-0/tests/testing_data/model-predictions/synllama/results.json.gz +0 -0
  221. retrocast-0/tests/testing_data/model-predictions/synplanner-mcts/results.json.gz +0 -0
  222. retrocast-0/tests/testing_data/model-predictions/synplanner-mcts/summary.json +1 -0
  223. retrocast-0/tests/testing_data/model-predictions/syntheseus-retro0-local-retro/results.json.gz +0 -0
  224. retrocast-0/tests/testing_data/model-predictions/syntheseus-retro0-local-retro/summary.json +1 -0
  225. retrocast-0/tests/testing_data/paroutes.json.gz +0 -0
  226. retrocast-0/tests/testing_data/pharma_routes.json.gz +0 -0
  227. retrocast-0/tests/utils/test_serializers.py +220 -0
  228. retrocast-0/tests/workflow/__init__.py +1 -0
  229. retrocast-0/tests/workflow/test_pipeline.py +651 -0
  230. retrocast-0/tests/workflow/test_verify.py +718 -0
  231. retrocast-0/uv.lock +7224 -0
@@ -0,0 +1,70 @@
1
+ # .github/release-drafter.yml
2
+
3
+ name-template: "v$RESOLVED_VERSION"
4
+ tag-template: "v$RESOLVED_VERSION"
5
+ include-pre-releases: true
6
+ prerelease: true
7
+
8
+ # automatically add a 'dependencies' label for your robot friends
9
+ autolabeler:
10
+ - label: "dependencies"
11
+ branch:
12
+ - '/^dependabot\//'
13
+ - '/^renovate\//'
14
+ title:
15
+ - '/^build\(deps\)/' # for dependabot group updates
16
+
17
+ categories:
18
+ - title: "🚨 BREAKING CHANGES"
19
+ labels:
20
+ - "breaking-change"
21
+ - title: "🛡️ Security Fixes"
22
+ labels:
23
+ - "type/security"
24
+ - title: "✨ New Features"
25
+ labels:
26
+ - "type/feature"
27
+ - title: "🐛 Bug Fixes"
28
+ labels:
29
+ - "type/bug"
30
+ - title: "🚀 Performance Improvements"
31
+ labels:
32
+ - "scope/performance"
33
+ - title: "📚 Documentation"
34
+ labels:
35
+ - "type/docs"
36
+ - title: "🛠️ Maintenance & Internal Improvements"
37
+ labels:
38
+ - "type/refactor"
39
+ - "type/chore"
40
+ - "scope/ci-cd"
41
+ - "scope/testing"
42
+ - title: "⬆️ Dependency Updates"
43
+ labels:
44
+ - "dependencies"
45
+
46
+ change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
47
+ change-title-escapes: '\<*_&'
48
+
49
+ version-resolver:
50
+ major:
51
+ labels:
52
+ - "breaking-change"
53
+ minor:
54
+ labels:
55
+ - "type/feature"
56
+ patch:
57
+ labels:
58
+ - "type/bug"
59
+ - "type/docs"
60
+ - "type/refactor"
61
+ - "type/chore"
62
+ - "type/security"
63
+ - "scope/performance"
64
+ - "dependencies"
65
+ default: patch
66
+
67
+ template: |
68
+ ## Changes
69
+
70
+ $CHANGES
@@ -0,0 +1,33 @@
1
+ name: "Publish to PyPi"
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ run:
9
+ runs-on: ubuntu-latest
10
+ environment:
11
+ name: pypi
12
+ permissions:
13
+ id-token: write
14
+ contents: read
15
+ steps:
16
+ - name: Checkout
17
+ uses: actions/checkout@v5
18
+ with:
19
+ ref: master
20
+ fetch-depth: 0 # Full history needed for setuptools-scm to read git tags
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@v6
23
+ - name: Install Python 3.13
24
+ run: uv python install 3.13
25
+ - name: Build
26
+ run: uv build
27
+ # Check that basic features work and we didn't miss to include crucial files
28
+ - name: Smoke test (wheel)
29
+ run: uv run --isolated --no-project --with dist/*.whl --with pytest tests/smoke_test.py
30
+ - name: Smoke test (source distribution)
31
+ run: uv run --isolated --no-project --with dist/*.tar.gz --with pytest tests/smoke_test.py
32
+ - name: Publish
33
+ run: uv publish
@@ -0,0 +1,29 @@
1
+ name: Publish Release
2
+ on:
3
+ release:
4
+ types: [published] # Runs when a draft is published
5
+
6
+ permissions:
7
+ contents: write
8
+
9
+ jobs:
10
+ create_python_package:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Install uv
15
+ uses: astral-sh/setup-uv@v3
16
+ with:
17
+ enable-cache: true
18
+ cache-dependency-glob: uv.lock
19
+
20
+ - name: Set up Python
21
+ run: uv python install 3.13
22
+
23
+ - name: Build
24
+ run: uv build
25
+
26
+ - name: Upload artifacts to release
27
+ uses: softprops/action-gh-release@v1
28
+ with:
29
+ files: dist/*
@@ -0,0 +1,55 @@
1
+ name: Label PR & Draft Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+ pull_request:
9
+ types: [opened, reopened, synchronize]
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+ pull-requests: write
15
+
16
+ jobs:
17
+ process_pr:
18
+ permissions:
19
+ contents: write
20
+ pull-requests: write
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - name: Assign labels from commits
24
+ if: github.event_name == 'pull_request'
25
+ id: assign-labels
26
+ uses: mauroalderete/action-assign-labels@v1
27
+ with:
28
+ pull-request-number: ${{ github.event.pull_request.number }}
29
+ github-token: ${{ secrets.GITHUB_TOKEN }}
30
+ conventional-commits: |
31
+ conventional-commits:
32
+ - type: 'feat'
33
+ nouns: ['FEATURE', 'Feature', 'feature', 'FEAT', 'Feat', 'feat']
34
+ labels: ['type/feature']
35
+ - type: 'fix'
36
+ nouns: ['FIX', 'Fix', 'fix', 'FIXED', 'Fixed', 'fixed']
37
+ labels: ['type/bug']
38
+ - type: 'refactor'
39
+ nouns: ['REFACTOR', 'Refactor', 'refactor', 'ref', 'REF']
40
+ labels: ['type/refactor']
41
+ - type: 'perf'
42
+ nouns: ['PERF', 'Perf', 'perf', 'PERFORMANCE', 'Performance', 'performance']
43
+ labels: ['scope/performance']
44
+ - type: 'docs'
45
+ nouns: ['DOCS', 'Docs', 'docs', 'DOC', 'Doc', 'doc']
46
+ labels: ['type/docs']
47
+ - type: 'tests'
48
+ nouns: ['TESTS', 'Tests', 'tests']
49
+ labels: ['scope/testing']
50
+ maintain-labels-not-matched: false
51
+ apply-changes: true
52
+
53
+ - uses: release-drafter/release-drafter@v6.0.0
54
+ env:
55
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,98 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+ pull_request:
9
+ branches:
10
+ - main
11
+ - master
12
+
13
+ jobs:
14
+ test:
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ contents: read
18
+ pull-requests: write
19
+
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v4
23
+
24
+ - name: Set up Python 3.13
25
+ uses: actions/setup-python@v4
26
+ with:
27
+ python-version: "3.13"
28
+
29
+ - name: Install uv
30
+ run: |
31
+ curl -LsSf https://astral.sh/uv/install.sh | sh
32
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
33
+
34
+ - name: Cache dependencies
35
+ uses: actions/cache@v4
36
+ with:
37
+ path: |
38
+ ~/.cache/uv
39
+ ~/.uv
40
+ .venv
41
+ key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }}
42
+ restore-keys: |
43
+ ${{ runner.os }}-uv-
44
+
45
+ - name: Create and activate virtual environment
46
+ run: |
47
+ uv venv
48
+ echo "$PWD/.venv/bin" >> $GITHUB_PATH
49
+
50
+ - name: Install dependencies
51
+ run: uv sync
52
+
53
+ - name: Run tests
54
+ run: uv run pytest -v
55
+
56
+ - name: generate coverage report
57
+ id: coverage
58
+ run: |
59
+ set +e # disable exit on error temporarily
60
+ report=$(uv run pytest --cov=retrocast --cov-report=term-missing)
61
+ exit_code=$?
62
+ set -e # re-enable exit on error
63
+
64
+ # this is some bash magic to make the multiline report available to next steps
65
+ echo "report<<EOF" >> $GITHUB_OUTPUT
66
+ echo "$report" >> $GITHUB_OUTPUT
67
+ echo "EOF" >> $GITHUB_OUTPUT
68
+
69
+ exit $exit_code # fail the step if tests failed
70
+
71
+ - name: find changed files in src
72
+ id: changed-src-files
73
+ if: github.event_name == 'pull_request'
74
+ uses: tj-actions/changed-files@v46 # check for the latest version, they update a lot
75
+ with:
76
+ files: src/** # or whatever your source directory is
77
+
78
+ - name: print coverage report to logs
79
+ run: |
80
+ echo "${{ steps.coverage.outputs.report }}"
81
+
82
+ - name: add coverage report as a pr comment
83
+ if: github.event_name == 'pull_request' && steps.changed-src-files.outputs.any_changed == 'true'
84
+ uses: actions/github-script@v7
85
+ with:
86
+ script: |
87
+ const output = `### Pytest Coverage Report 🧪
88
+ \`\`\`
89
+ ${{ steps.coverage.outputs.report }}
90
+ \`\`\`
91
+ `;
92
+
93
+ github.rest.issues.createComment({
94
+ owner: context.repo.owner,
95
+ repo: context.repo.repo,
96
+ issue_number: context.issue.number,
97
+ body: output
98
+ });
@@ -0,0 +1,52 @@
1
+ name: Linting & Type Checking
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+ pull_request:
9
+ branches:
10
+ - main
11
+ - master
12
+
13
+ jobs:
14
+ type-check:
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Set up Python 3.11
22
+ uses: actions/setup-python@v4
23
+ with:
24
+ python-version: "3.11"
25
+
26
+ - name: Install uv
27
+ run: |
28
+ curl -LsSf https://astral.sh/uv/install.sh | sh
29
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
30
+
31
+ # this is the same caching logic from your tests workflow. big speed up.
32
+ - name: Cache dependencies
33
+ uses: actions/cache@v4
34
+ with:
35
+ path: |
36
+ ~/.cache/uv
37
+ .venv
38
+ key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }}
39
+ restore-keys: |
40
+ ${{ runner.os }}-uv-
41
+
42
+ - name: Install dependencies
43
+ run: uv sync --extra viz
44
+
45
+ - name: Run ruff (linter)
46
+ run: uv run ruff check
47
+
48
+ - name: Run ruff (formatter)
49
+ run: uv run ruff format --check
50
+
51
+ - name: Run ty
52
+ run: uv run ty check .
@@ -0,0 +1,17 @@
1
+ name: Update Major Minor Tags
2
+ on:
3
+ push:
4
+ tags:
5
+ - "v[0-9]+.[0-9]+.[0-9]+" # Only run on semantic version tags
6
+
7
+ permissions:
8
+ contents: write
9
+
10
+ jobs:
11
+ update_major_minor_tags:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0 # Fetch all history for all tags
17
+ - uses: haya14busa/action-update-semver@v1.2.1
retrocast-0/.gitignore ADDED
@@ -0,0 +1,91 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+ .mypy_cache/
9
+ .ruff_cache/
10
+ .pytest_cache/
11
+
12
+ # Other junk
13
+ .DS_Store
14
+
15
+ # Virtual environments
16
+ .venv
17
+
18
+ # Jupyter Trash
19
+ *.ipynb
20
+
21
+ # Data
22
+ data/transfers/
23
+ data/**/*.json.gz
24
+ data/**/*.csv
25
+ data/**/*.txt
26
+ data/0-assets/*.pkl
27
+ data/0-assets/model-configs/**/*.pickle
28
+ data/0-assets/model-configs/**/*.pkl
29
+ data/0-assets/model-configs/**/*.onnx
30
+ data/0-assets/model-configs/**/*.csv*
31
+ data/0-assets/model-configs/**/*.ckpt*
32
+ data/0-assets/model-configs/**/*.pt*
33
+ data/0-assets/model-configs/**/*.smi*
34
+ data/0-assets/model-configs/**/*.sdf*
35
+ data/0-assets/model-configs/**/*.zip*
36
+ data/0-assets/model-configs/**/*.hdf5*
37
+ data/0-assets/model-configs/**/*.txt*
38
+ data/0-assets/model-configs/**/*.dat*
39
+ data/0-assets/model-configs/**/.*
40
+ data/0-assets/model-configs/**/*.md
41
+ data/analysis/**/*.html
42
+ data/analysis/**/*.json
43
+ data/analysis/**/*.txt
44
+ data/analysis/**/*.png
45
+
46
+ data/evaluations/**/*.pkl
47
+ data/evaluations/**/*.json.gz
48
+ data/evaluations/**/results.json
49
+ data/processed/**/*.json.gz
50
+ data/scored/
51
+
52
+
53
+ _backups/
54
+ # AI
55
+ _prompts/
56
+
57
+ clone.sh
58
+
59
+ # internal code
60
+ scripts/dms/private/
61
+
62
+ # Testing
63
+ .coverage*
64
+ archive
65
+ archive-v2
66
+ collectors/
67
+
68
+ tests/testing_data/**/results.json
69
+ docs/coding-style.md
70
+
71
+ data/statistics
72
+ data/seed-stability-archive
73
+
74
+ !data/1-benchmarks/definitions/*.json.gz
75
+ data/1-benchmarks/definitions/re-export
76
+ data/1-benchmarks/**/*.gz
77
+ data/1-benchmarks/**/*.hdf5
78
+ data/2-raw
79
+ data/3-processed/
80
+ data/4-scored/
81
+ data/5-results/
82
+ data/5-results/**/*.html
83
+ data/5-results/**/*.jpg
84
+ data/6-comparisons
85
+ data/7-meta-analysis
86
+
87
+ docs/testing-framework.md
88
+ .ignore
89
+
90
+ .hypothesis
91
+ AGENTS.md
@@ -0,0 +1,20 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ # Ruff version.
4
+ rev: v0.14.1
5
+ hooks:
6
+ # Run the linter.
7
+ - id: ruff-check
8
+ name: ruff (linter)
9
+ args: [--fix]
10
+ # Run the formatter.
11
+ - id: ruff-format
12
+ name: ruff (formatter)
13
+
14
+ - repo: local
15
+ hooks:
16
+ - id: ty
17
+ name: ty check
18
+ entry: uv run ty check .
19
+ language: system
20
+ pass_filenames: false
@@ -0,0 +1 @@
1
+ 3.11
retrocast-0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 isChemist Group (Anton Morgunov)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.