-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpyproject.toml
More file actions
107 lines (93 loc) · 3.4 KB
/
Copy pathpyproject.toml
File metadata and controls
107 lines (93 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
[build-system]
requires = ["scikit-build-core>=0.9", "pybind11"]
build-backend = "scikit_build_core.build"
[project]
name = "midigpt"
version = "0.3.2"
description = "GPT-2 transformer for symbolic music generation"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.10"
dependencies = ["symusic>=0.4", "numpy>=1.24"]
authors = [{ name = "Metacreation Lab" }]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
]
[project.urls]
Homepage = "https://github.com/Metacreation-Lab/MIDI-GPT"
Paper = "https://arxiv.org/abs/2501.17011"
[project.optional-dependencies]
inference = ["torch>=2.0", "numpy>=1.24", "tqdm>=4.65", "huggingface_hub>=0.22", "safetensors>=0.4"]
train = ["midigpt[inference]", "lightning>=2.2",
"datasets>=2.18", "pyarrow>=15.0", "python-dotenv>=1.0",
"wandb>=0.12.10"]
dev = ["pytest>=8.0", "ruff>=0.4", "mypy>=1.9"]
docs = ["mkdocs-material>=9.5", "mkdocstrings[python]>=0.24"]
realtime = ["midigpt[inference]", "python-osc>=1.8", "flask>=3.0", "flask-socketio>=5.3"]
http = ["midigpt[inference]", "fastapi>=0.111", "uvicorn[standard]>=0.29"]
all = ["midigpt[realtime,train]"]
[project.scripts]
midigpt-server = "midigpt.osc.server:main"
midigpt-listen = "midigpt.osc.listen:main"
midigpt-http = "midigpt.http.server:main"
[tool.pytest.ini_options]
markers = [
"slow: requires real model bundles on disk",
"inference: requires torch and a real model",
]
[tool.scikit-build]
cmake.build-type = "Release"
cmake.args = ["-DCMAKE_POLICY_VERSION_MINIMUM=3.5"]
wheel.packages = ["src/python/midigpt"]
wheel.exclude = ["midigpt/osc/studio*"]
[tool.cibuildwheel]
build = "cp310-* cp311-* cp312-*"
skip = "*-musllinux_* *-win32 *-manylinux_i686"
build-verbosity = 1
test-extras = ["inference", "http"]
test-requires = "pytest"
test-command = 'pytest {project}/tests/python -m "not slow and not inference"'
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
environment = { MACOSX_DEPLOYMENT_TARGET = "10.15" }
[tool.cibuildwheel.linux]
archs = ["x86_64"]
manylinux-x86_64-image = "manylinux_2_28"
[tool.cibuildwheel.windows]
archs = ["AMD64"]
[tool.ruff]
line-length = 100
target-version = "py310"
src = ["src/python"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"RUF", # ruff-specific rules
"N", # pep8-naming
]
ignore = [
"E501", # line too long — formatter enforces line-length
"N806", # uppercase vars are common in ML/music code (N, T, etc.)
"N818", # private exceptions don't need Error suffix
"B023", # function-in-loop variable binding — deferred
"BLE001", # blind exception catching — deferred
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["F401", "F811", "S101", "N802", "N814", "B017"]
"src/python/midigpt/training/**/*.py" = ["N812"]
"src/python/midigpt/inference/model/**/*.py" = ["N812"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"