fc-data 0.2.0__py3-none-any.whl

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 (87) hide show
  1. datasmith/__init__.py +330 -0
  2. datasmith/__init__.pyi +194 -0
  3. datasmith/agents/__init__.py +31 -0
  4. datasmith/agents/classifiers.py +272 -0
  5. datasmith/agents/codex.py +25 -0
  6. datasmith/agents/config.py +108 -0
  7. datasmith/agents/extractors.py +197 -0
  8. datasmith/agents/installed/README.md +52 -0
  9. datasmith/agents/installed/__init__.py +22 -0
  10. datasmith/agents/installed/base.py +240 -0
  11. datasmith/agents/installed/claude.py +134 -0
  12. datasmith/agents/installed/codex.py +91 -0
  13. datasmith/agents/installed/gemini.py +118 -0
  14. datasmith/agents/installed/none.py +27 -0
  15. datasmith/agents/sandbox.py +547 -0
  16. datasmith/agents/synthesizer.py +439 -0
  17. datasmith/agents/templates/AGENTS.md.j2 +150 -0
  18. datasmith/agents/templates/sandbox_verify.py +428 -0
  19. datasmith/docker/__init__.py +31 -0
  20. datasmith/docker/context.py +112 -0
  21. datasmith/docker/images.py +158 -0
  22. datasmith/docker/publish.py +56 -0
  23. datasmith/docker/templates/Dockerfile.base +26 -0
  24. datasmith/docker/templates/Dockerfile.pr +42 -0
  25. datasmith/docker/templates/Dockerfile.repo +11 -0
  26. datasmith/docker/templates/docker_build_base.sh +780 -0
  27. datasmith/docker/templates/docker_build_env.sh +309 -0
  28. datasmith/docker/templates/docker_build_final.sh +106 -0
  29. datasmith/docker/templates/docker_build_pkg.sh +99 -0
  30. datasmith/docker/templates/docker_build_run.sh +124 -0
  31. datasmith/docker/templates/entrypoint.sh +62 -0
  32. datasmith/docker/templates/parser.py +1405 -0
  33. datasmith/docker/templates/profile.sh +199 -0
  34. datasmith/docker/templates/pytest_runner.py +692 -0
  35. datasmith/docker/templates/run-tests.sh +197 -0
  36. datasmith/docker/verifiers.py +131 -0
  37. datasmith/filters.py +154 -0
  38. datasmith/github/__init__.py +22 -0
  39. datasmith/github/client.py +333 -0
  40. datasmith/github/hooks.py +50 -0
  41. datasmith/github/links.py +110 -0
  42. datasmith/github/models.py +206 -0
  43. datasmith/github/render.py +173 -0
  44. datasmith/github/search.py +66 -0
  45. datasmith/github/templates/comment.md.j2 +5 -0
  46. datasmith/github/templates/final.md.j2 +66 -0
  47. datasmith/github/templates/issues.md.j2 +21 -0
  48. datasmith/github/templates/repo.md.j2 +1 -0
  49. datasmith/preflight.py +162 -0
  50. datasmith/publish/__init__.py +13 -0
  51. datasmith/publish/huggingface.py +104 -0
  52. datasmith/publish/pipeline.py +60 -0
  53. datasmith/publish/records.py +91 -0
  54. datasmith/py.typed +1 -0
  55. datasmith/resolution/__init__.py +14 -0
  56. datasmith/resolution/blocklist.py +145 -0
  57. datasmith/resolution/cache.py +120 -0
  58. datasmith/resolution/constants.py +277 -0
  59. datasmith/resolution/dependency_resolver.py +174 -0
  60. datasmith/resolution/git_utils.py +378 -0
  61. datasmith/resolution/import_analyzer.py +66 -0
  62. datasmith/resolution/metadata_parser.py +412 -0
  63. datasmith/resolution/models.py +41 -0
  64. datasmith/resolution/orchestrator.py +522 -0
  65. datasmith/resolution/package_filters.py +312 -0
  66. datasmith/resolution/python_manager.py +110 -0
  67. datasmith/runners/__init__.py +15 -0
  68. datasmith/runners/base.py +112 -0
  69. datasmith/runners/classify_prs.py +48 -0
  70. datasmith/runners/render_problems.py +113 -0
  71. datasmith/runners/resolve_packages.py +66 -0
  72. datasmith/runners/scrape_commits.py +166 -0
  73. datasmith/runners/scrape_repos.py +44 -0
  74. datasmith/runners/synthesize_images.py +310 -0
  75. datasmith/update/__init__.py +5 -0
  76. datasmith/update/cli.py +169 -0
  77. datasmith/update/offline.py +173 -0
  78. datasmith/update/pipeline.py +497 -0
  79. datasmith/utils/__init__.py +18 -0
  80. datasmith/utils/core.py +67 -0
  81. datasmith/utils/db.py +156 -0
  82. datasmith/utils/tokens.py +65 -0
  83. fc_data-0.2.0.dist-info/METADATA +441 -0
  84. fc_data-0.2.0.dist-info/RECORD +87 -0
  85. fc_data-0.2.0.dist-info/WHEEL +4 -0
  86. fc_data-0.2.0.dist-info/entry_points.txt +2 -0
  87. fc_data-0.2.0.dist-info/licenses/LICENSE +28 -0
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/env bash
2
+ # set -euo pipefail
3
+
4
+ : "${COMMIT_SHA:?Need to set COMMIT_SHA}"
5
+ : "${ASV_ARGS:?Need to set ASV_ARGS}"
6
+ : "${ASV_CONF_PATH:?Need to set ASV_CONF_PATH}"
7
+
8
+ # 0) Hook in micromamba and activate `base`
9
+ eval "$(micromamba shell hook --shell=bash)"
10
+
11
+ micromamba activate base
12
+
13
+ # 0.5) Tune the container so all CPUs stay at fixed frequency.
14
+ # This requires root; Docker runs as root by default.
15
+ # python -m pyperf system tune || true
16
+ git checkout --quiet "${COMMIT_SHA}"
17
+
18
+ # 2) cd into the folder containing the asv.conf.json
19
+ cd "$(dirname "$ASV_CONF_PATH")"
20
+
21
+ # asv run "$COMMIT_SHA^!" \
22
+ # --show-stderr \
23
+ # ${BENCH_REGEX:+--bench "$BENCH_REGEX"} \
24
+ # ${INTERLEAVE_ROUNDS:+--interleave-rounds} \
25
+ # ${APPEND_SAMPLES:+--append-samples --record-samples} \
26
+ # -a rounds=$ROUNDS \
27
+ # -a number=$NUMBER \
28
+ # -a repeat=$REPEAT \
29
+ # ${CPU_CORE:+-a cpu_affinity=[$CPU_CORE]} \
30
+ # | tee "$OUTPUT_DIR/benchmark_${COMMIT_SHA}.log"
31
+
32
+ # change the "results_dir" in asv.conf.json to "/output/{COMMIT_SHA}/"
33
+ # using python
34
+ # Read the python versions from the asv.conf.json (without jq)
35
+ python_versions=$(python -c "import asv; pythons = asv.config.Config.load('asv.conf.json').pythons; print(' '.join(pythons))")
36
+ for version in $python_versions; do
37
+ # Create per‑Python env and install ASV
38
+ python -c "import asv, os, pathlib
39
+ path = pathlib.Path('/output/'\"$COMMIT_SHA\"'/''\"$version\"')
40
+ path.mkdir(parents=True, exist_ok=True)
41
+
42
+ config = asv.config.Config.load('$CONF_NAME')
43
+ config.results_dir = str(path / 'results')
44
+ config.html_dir = str(path / 'html')
45
+ config.branches = ['HEAD']
46
+
47
+ asv.util.write_json('$CONF_NAME', config.__dict__, api_version=config.api_version)
48
+ asv.util.write_json(path / '$CONF_NAME', config.__dict__, api_version=config.api_version)
49
+ "
50
+
51
+ micromamba create -y -n "asv_${version}" -c conda-forge python="$version" \
52
+ git \
53
+ pyperf \
54
+ libmambapy \
55
+ mamba \
56
+ conda
57
+ micromamba run -n "asv_${version}" pip install asv
58
+ micromamba run asv machine --yes
59
+ micromamba run asv run --show-stderr "$COMMIT_SHA^!" ${ASV_ARGS}
60
+ done
61
+
62
+ echo "Benchmarks complete."