Skip to content

Commit aa656b3

Browse files
committed
Add GitHub project: CI workflow, issue templates, PR template, Discussions
1 parent 3e7736d commit aa656b3

6 files changed

Lines changed: 285 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Biology / GRN Validation
2+
description: Report a new measurement of R on a biological network database
3+
labels: ["biology", "validation"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Help validate whether the numerical overlap R_∞(SU3) ≈ R(E. coli)
9+
is robust across other gene regulatory network (GRN) databases.
10+
11+
- type: input
12+
id: database
13+
attributes:
14+
label: Database / dataset
15+
placeholder: "e.g. YEASTRACT (S. cerevisiae), STRING v12, ARACNE-AP"
16+
validations:
17+
required: true
18+
19+
- type: input
20+
id: R_value
21+
attributes:
22+
label: Measured R (MIXED fraction)
23+
placeholder: "e.g. 0.341 ± 0.012 (n=847 regulators, high-confidence only)"
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: method
29+
attributes:
30+
label: Measurement method
31+
description: How was the sign matrix computed? Which interaction types were included?
32+
placeholder: |
33+
Used activation/repression edges only (no unknown).
34+
BFS shortest-path holonomy with root = node of highest out-degree.
35+
500 bootstrap resamples for error estimate.
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: notes
41+
attributes:
42+
label: Additional notes / attached files
43+
validations:
44+
required: false
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Bug Report — Simulation / Code
2+
description: Something crashes or produces wrong physics output
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Please fill in as much detail as possible.
9+
Attach the full traceback and the JSON output file if available.
10+
11+
- type: input
12+
id: python_version
13+
attributes:
14+
label: Python version
15+
placeholder: "e.g. 3.11.8"
16+
validations:
17+
required: true
18+
19+
- type: input
20+
id: numpy_scipy
21+
attributes:
22+
label: numpy / scipy versions
23+
placeholder: "e.g. numpy 2.4.2 scipy 1.17.1"
24+
validations:
25+
required: true
26+
27+
- type: dropdown
28+
id: module
29+
attributes:
30+
label: Affected module
31+
options:
32+
- su2.py
33+
- su3.py
34+
- u1.py
35+
- lattice.py
36+
- fields.py
37+
- action.py
38+
- observables.py
39+
- updates.py
40+
- simulation.py
41+
- su2_l10_colab.py
42+
- sm_* modules
43+
- Other
44+
validations:
45+
required: true
46+
47+
- type: textarea
48+
id: reproduce
49+
attributes:
50+
label: Minimal reproduction
51+
description: Exact command or code snippet that triggers the bug
52+
placeholder: "python simulation/su2_l10_colab.py — crash at sweep 142"
53+
validations:
54+
required: true
55+
56+
- type: textarea
57+
id: traceback
58+
attributes:
59+
label: Full traceback or wrong output
60+
render: shell
61+
validations:
62+
required: true
63+
64+
- type: textarea
65+
id: expected
66+
attributes:
67+
label: Expected behaviour
68+
validations:
69+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Questions & Discussion
4+
url: https://github.com/boonsup/hgst-e7/discussions
5+
about: General questions about the physics, code, or paper
6+
- name: Zenodo record (data & paper DOI)
7+
url: https://doi.org/10.5281/zenodo.18873889
8+
about: Cite the software or access archived data releases
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Simulation Run Request
2+
description: Propose a new lattice run (new L, gauge group, beta, kappa, or 3D)
3+
labels: ["simulation", "enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Use this template to propose a new production simulation that would
9+
extend the FSS analysis or test a new gauge configuration.
10+
11+
- type: dropdown
12+
id: gauge
13+
attributes:
14+
label: Gauge group
15+
options:
16+
- SU(2)
17+
- SU(3)
18+
- U(1)
19+
- SM (SU3×SU2×U1)
20+
- SU(N) large-N
21+
- Other / new
22+
validations:
23+
required: true
24+
25+
- type: input
26+
id: params
27+
attributes:
28+
label: Proposed parameters
29+
placeholder: "L=12, beta=4.0, kappa=0.3, N_therm=4000, N_meas=500"
30+
validations:
31+
required: true
32+
33+
- type: textarea
34+
id: motivation
35+
attributes:
36+
label: Scientific motivation
37+
description: What physics question does this run answer?
38+
placeholder: |
39+
SU(3) L=10 would reduce sigma_syst on R_inf(SU3) from ±0.0195
40+
to ±0.005, making the SU2/SU3 thermodynamic ordering definitive.
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
id: resources
46+
attributes:
47+
label: Available compute
48+
placeholder: "Colab T4 GPU, ~2 hours; or local 8-core CPU, ~6 hours"
49+
validations:
50+
required: false
51+
52+
- type: checkboxes
53+
id: checklist
54+
attributes:
55+
label: I commit to
56+
options:
57+
- label: Running the simulation and uploading the JSON result file
58+
- label: Opening a follow-up PR with data + updated FSS fit

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Summary
2+
3+
<!-- One sentence: what does this PR add or fix? -->
4+
5+
## Type of change
6+
7+
- [ ] Bug fix (simulation produces wrong result or crashes)
8+
- [ ] New simulation data (new JSON result file + FSS update)
9+
- [ ] New feature (new gauge group, new observable, 3D extension, GPU port)
10+
- [ ] Code quality (refactor, tests, docs)
11+
- [ ] Paper / LaTeX update
12+
13+
## Physics checklist (for simulation changes)
14+
15+
- [ ] Run parameters (L, beta, kappa, seed, N_therm, N_meas) stated in JSON metadata
16+
- [ ] Output JSON file added to `data/`
17+
- [ ] Autocorrelation (τ_int via Madras-Sokal) reported
18+
- [ ] FSS fit updated if a new L point was added
19+
- [ ] No hard-coded absolute paths
20+
21+
## Code checklist
22+
23+
- [ ] `pip install -r requirements.txt && python simulation/su2_l10_colab.py` still runs
24+
- [ ] New functions have a docstring stating the physics formula implemented
25+
- [ ] No secrets or `.env` values committed
26+
27+
## Related issues
28+
29+
Closes #

.github/workflows/ci.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
smoke-test:
11+
name: Python ${{ matrix.python-version }} smoke test
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["3.10", "3.12"]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: pip install -r requirements.txt
27+
28+
- name: Syntax check — all simulation modules
29+
run: |
30+
python -m py_compile simulation/su2.py
31+
python -m py_compile simulation/su3.py
32+
python -m py_compile simulation/u1.py
33+
python -m py_compile simulation/lattice.py
34+
python -m py_compile simulation/fields.py
35+
python -m py_compile simulation/action.py
36+
python -m py_compile simulation/observables.py
37+
python -m py_compile simulation/updates.py
38+
python -m py_compile simulation/simulation.py
39+
python -m py_compile simulation/su2_l10_colab.py
40+
41+
- name: Smoke test — su2_l10_colab.py (L=4, 2 sweeps)
42+
run: |
43+
python - << 'EOF'
44+
import ast, sys
45+
with open("simulation/su2_l10_colab.py", encoding="utf-8") as f:
46+
src = f.read()
47+
ast.parse(src)
48+
49+
# Patch to tiny run
50+
src = src.replace("L = 10", "L = 4")
51+
src = src.replace("N_THERM = 4000", "N_THERM = 2")
52+
src = src.replace("N_MEAS = 500", "N_MEAS = 2")
53+
src = src.replace("N_SKIP = 5", "N_SKIP = 1")
54+
exec(src, {"__name__": "__main__"})
55+
56+
import json
57+
with open("su2_l10_summary.json") as f:
58+
r = json.load(f)
59+
assert r["stub_mode"] == False, "stub_mode must be False"
60+
assert 0.0 < r["R_mean"] < 1.0, f"R_mean out of range: {r['R_mean']}"
61+
print(f"PASS R_mean={r['R_mean']:.4f} tau_int={r['tau_int']}")
62+
EOF
63+
64+
- name: Verify data files are valid JSON
65+
run: |
66+
python -c "
67+
import json, pathlib, sys
68+
errors = []
69+
for f in pathlib.Path('data').glob('*.json'):
70+
try:
71+
json.loads(f.read_text(encoding='utf-8'))
72+
except Exception as e:
73+
errors.append(f'{f}: {e}')
74+
if errors:
75+
print('\\n'.join(errors)); sys.exit(1)
76+
print(f'All {len(list(pathlib.Path(\"data\").glob(\"*.json\")))} JSON files valid')
77+
"

0 commit comments

Comments
 (0)