-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to Pyproject and hatch (#61)
* add pyproject setup * update actions * fix whitespace * update python version, install scripts * add ray_sync script
- Loading branch information
Showing
5 changed files
with
80 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ core | |
.vscode | ||
.idea | ||
build | ||
dist | ||
src/raythena/_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
[build-system] | ||
requires = ["hatchling", "hatch-vcs"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "raythena" | ||
dynamic = ["version"] | ||
readme = "README.md" | ||
license = {file = "LICENSE"} | ||
authors = [ | ||
{ name = "Julien Esseiva", email = "[email protected]" }, | ||
] | ||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"aiohttp", | ||
"click", | ||
"protobuf", | ||
"psutil", | ||
"ray", | ||
"setproctitle", | ||
"uvloop", | ||
] | ||
|
||
[project.scripts] | ||
raythena = "raythena.scripts.raythena:main" | ||
|
||
[tool.hatch.version] | ||
source = "vcs" | ||
|
||
[tool.hatch.build.hooks.vcs] | ||
version-file = "src/raythena/_version.py" | ||
|
||
[tool.hatch.envs.test] | ||
dependencies = [ | ||
"pytest" | ||
] | ||
|
||
[tool.hatch.build.targets.wheel.shared-scripts] | ||
"bin/ray_start_head" = "ray_start_head" | ||
"bin/ray_start_worker" = "ray_start_worker" | ||
"bin/ray_sync" = "ray_sync" | ||
|
||
[tool.hatch.build.targets.wheel.shared-data] | ||
"conf/cori.yaml" = "conf/cori.yaml" | ||
|
||
[tool.ruff] | ||
|
||
line-length = 80 | ||
indent-width = 4 | ||
|
||
[tool.ruff.lint] | ||
|
||
select = [ | ||
# pycodestyle | ||
"E", | ||
# Pyflakes | ||
"F", | ||
# pyupgrade | ||
"UP", | ||
# flake8-bugbear | ||
"B", | ||
# flake8-simplify | ||
"SIM", | ||
# isort | ||
"I" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
__version__ = "1.0.0" | ||
try: | ||
from . import _version | ||
__version__ = _version.__version__ | ||
except: # noqa: E722 | ||
__version__ = "0.0.0" |