Skip to content

Commit e98f341

Browse files
committed
Add script entrypoint and build backend.
1 parent 5ebc355 commit e98f341

4 files changed

Lines changed: 17 additions & 4 deletions

File tree

‎.gitignore‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
*.csv
33
*.sqlite3
44

5+
# Tools
6+
.ruff_cache/
7+
58
# Python-generated files
69
__pycache__/
7-
*.py[oc]
810
build/
911
dist/
1012
wheels/
11-
*.egg-info
13+
*.egg-info/
14+
*.py[oc]
1215

1316
# Virtual environments
1417
.venv

‎optimize.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def run_study(trial):
199199
return run_trial(frequency_MHz, coreVoltage_mV, trial.number)
200200

201201

202-
if __name__ == "__main__":
202+
def entrypoint():
203203
console.print("[bold green]Starting Bitaxe Optimization...[/bold green]")
204204
study = optuna.create_study(
205205
directions=["maximize", "minimize"],
@@ -231,3 +231,7 @@ def run_study(trial):
231231
final.add_row("objectives", f"{trial.values}")
232232

233233
console.print(final)
234+
235+
236+
if __name__ == "__main__":
237+
entrypoint()

‎pyproject.toml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[build-system]
2+
requires = ["setuptools>=78.1.0"]
3+
14
[project]
25
name = "espminer-optim"
36
version = "0.1.0"
@@ -13,6 +16,9 @@ dependencies = [
1316
"ruff>=0.11.5",
1417
]
1518

19+
[project.scripts]
20+
espminer-optim = "optimize:main"
21+
1622
[tool.ruff]
1723
line-length = 120
1824

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)