| 1 | [build-system]
|
| 2 | requires = ["setuptools"]
|
| 3 | build-backend = "setuptools.build_meta"
|
| 4 |
|
| 5 |
|
| 6 | [project]
|
| 7 | name = "mini-swe-agent"
|
| 8 | dynamic = ["version"]
|
| 9 | description = "Nano SWE Agent - A simple AI software engineering agent"
|
| 10 | readme = "README.md"
|
| 11 | requires-python = ">=3.10"
|
| 12 | license = {file = "LICENSE.md"}
|
| 13 | keywords = ["nlp", "agents", "code"]
|
| 14 | authors = [
|
| 15 | {name = "Kilian Lieret", email = "kilian.lieret@posteo.de" },
|
| 16 | {name = "Carlos E. Jimenez", email = "carlosej@princeton.edu" },
|
| 17 | ]
|
| 18 |
|
| 19 | # Classifiers help users find your project by categorizing it.
|
| 20 | classifiers = [
|
| 21 | # How mature is this project? Common values are
|
| 22 | # 3 - Alpha, 4 - Beta, 5 - Production/Stable
|
| 23 | "Development Status :: 3 - Alpha",
|
| 24 | "Operating System :: OS Independent",
|
| 25 | # Indicate who your project is intended for
|
| 26 | "Intended Audience :: Developers",
|
| 27 | # Pick your license as you wish
|
| 28 | "License :: OSI Approved :: MIT License",
|
| 29 | "Programming Language :: Python :: 3.10",
|
| 30 | "Programming Language :: Python :: 3 :: Only",
|
| 31 | ]
|
| 32 |
|
| 33 | dependencies = [
|
| 34 | "pyyaml",
|
| 35 | "requests",
|
| 36 | "jinja2",
|
| 37 | "pydantic >= 2.0", # v2 required for safe mutable default arguments
|
| 38 | "litellm >= 1.75.5", # want to have gpt-5 support
|
| 39 | "tenacity",
|
| 40 | "rich",
|
| 41 | "python-dotenv",
|
| 42 | "typer",
|
| 43 | "platformdirs",
|
| 44 | "textual",
|
| 45 | "prompt_toolkit",
|
| 46 | "datasets",
|
| 47 | "openai != 1.100.0,!=1.100.1", # https://github.com/SWE-agent/mini-swe-agent/issues/446
|
| 48 | ]
|
| 49 |
|
| 50 | [project.optional-dependencies]
|
| 51 | full = [
|
| 52 | "mini-swe-agent[dev]",
|
| 53 | "swe-rex>=1.4.0",
|
| 54 | "mini-swe-agent[modal]",
|
| 55 | ]
|
| 56 |
|
| 57 | modal = [
|
| 58 | "modal",
|
| 59 | "boto3",
|
| 60 | ]
|
| 61 |
|
| 62 | dev = [
|
| 63 | "pytest",
|
| 64 | "pytest-cov",
|
| 65 | "pytest-asyncio",
|
| 66 | "pytest-xdist",
|
| 67 | "pre-commit",
|
| 68 | "ruff",
|
| 69 | "mkdocs-include-markdown-plugin",
|
| 70 | "mkdocstrings[python]>=0.18",
|
| 71 | "mike",
|
| 72 | "mkdocs-material",
|
| 73 | "mkdocs-glightbox",
|
| 74 | "mkdocs-redirects",
|
| 75 | "portkey-ai",
|
| 76 | "swe-rex",
|
| 77 | ]
|
| 78 |
|
| 79 | [project.urls]
|
| 80 | Documentation = "https://mini-swe-agent.com/latest/"
|
| 81 | Repository = "https://github.com/SWE-agent/mini-SWE-agent"
|
| 82 | "Bug Tracker" = "https://github.com/SWE-agent/mini-SWE-agent/issues"
|
| 83 |
|
| 84 | [project.scripts]
|
| 85 | mini = "minisweagent.run.mini:app"
|
| 86 | mini-swe-agent = "minisweagent.run.mini:app"
|
| 87 | mini-extra = "minisweagent.run.utilities.mini_extra:main"
|
| 88 | mini-e= "minisweagent.run.utilities.mini_extra:main"
|
| 89 |
|
| 90 | [tool.setuptools]
|
| 91 | include-package-data = true
|
| 92 |
|
| 93 | [tool.setuptools.dynamic]
|
| 94 | version = {attr = "minisweagent.__version__"}
|
| 95 |
|
| 96 | [tool.setuptools.packages.find]
|
| 97 | where = ["src"]
|
| 98 | include = ["minisweagent*"]
|
| 99 |
|
| 100 | [tool.setuptools.package-data]
|
| 101 | minisweagent = ["config/**/*"]
|
| 102 |
|
| 103 | [tool.ruff]
|
| 104 | # Exclude a variety of commonly ignored directories.
|
| 105 | exclude = [
|
| 106 | ".bzr",
|
| 107 | ".direnv",
|
| 108 | ".eggs",
|
| 109 | ".git",
|
| 110 | ".git-rewrite",
|
| 111 | ".hg",
|
| 112 | ".ipynb_checkpoints",
|
| 113 | ".mypy_cache",
|
| 114 | ".nox",
|
| 115 | ".pants.d",
|
| 116 | ".pyenv",
|
| 117 | ".pytest_cache",
|
| 118 | ".pytype",
|
| 119 | ".ruff_cache",
|
| 120 | ".svn",
|
| 121 | ".tox",
|
| 122 | ".venv",
|
| 123 | ".vscode",
|
| 124 | "__pypackages__",
|
| 125 | "_build",
|
| 126 | "buck-out",
|
| 127 | "build",
|
| 128 | "dist",
|
| 129 | "node_modules",
|
| 130 | "site-packages",
|
| 131 | "venv",
|
| 132 | # ---- project specific ----
|
| 133 | "tests/test_data",
|
| 134 | # Exclude commands so they don't get the __future__ imports
|
| 135 | "config/commands",
|
| 136 | ]
|
| 137 |
|
| 138 | line-length = 120
|
| 139 | indent-width = 4
|
| 140 |
|
| 141 | target-version = "py310"
|
| 142 |
|
| 143 | [tool.ruff.lint]
|
| 144 | # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
| 145 | # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
|
| 146 | # McCabe complexity (`C901`) by default.
|
| 147 | # I001: Isort, I002: required import
|
| 148 | select = [
|
| 149 | # Error (E)
|
| 150 | "E",
|
| 151 | # Error (PLE)
|
| 152 | "PLE",
|
| 153 | # pycodestyle
|
| 154 | "E713", # not in
|
| 155 | "E714", # is not
|
| 156 | "E711", # comparison with None
|
| 157 | # pyflakes
|
| 158 | "F821",
|
| 159 | "F822",
|
| 160 | "F401", # unused-import
|
| 161 | "F841", # unused var
|
| 162 | "F541", # f-string without args
|
| 163 | "F901", # raise NotImplemented should be raise NotImplementedError
|
| 164 | # isort
|
| 165 | "I001", # isort
|
| 166 | "I002", # required import
|
| 167 | # pyupgrade and related
|
| 168 | "UP", # pyupgrade
|
| 169 | "C401", # flake8-comprehensions: unnecessary-generator-set
|
| 170 | "C402", # flake8-comprehensions: unnecessary-generator-dict
|
| 171 | "C403", # flake8-comprehensions: unnecessary-list-comprehension-set
|
| 172 | "C404", # flake8-comprehensions: unnecessary-list-comprehension-dict
|
| 173 | "C405", # flake8-comprehensions: unnecessary-literal-set
|
| 174 | "F632", # pyflakes: is-literal
|
| 175 | "W605", # pycodestyle: invalid-escape-sequence
|
| 176 | # bugbear
|
| 177 | "B006", # mutable default
|
| 178 | "B007", # unused loop var
|
| 179 | "B009", # getattr with constant
|
| 180 | # flake8-errmsg
|
| 181 | "EM",
|
| 182 | # flake8-return
|
| 183 | "RET",
|
| 184 | # RUF
|
| 185 | "RUF019", # unneded key in dict check
|
| 186 | # pytest
|
| 187 | "PT",
|
| 188 | # flake8-simplify (SIM)
|
| 189 | "SIM201",
|
| 190 | # flake8-use-pathlib
|
| 191 | "PTH100",
|
| 192 | "PTH110",
|
| 193 | "PTH111",
|
| 194 | "PTH112",
|
| 195 | "PTH113",
|
| 196 | "PTH114",
|
| 197 | "PTH117",
|
| 198 | "PTH118",
|
| 199 | "PTH119",
|
| 200 | "PTH120",
|
| 201 | "PTH121",
|
| 202 | "PTH122",
|
| 203 | "PTH202",
|
| 204 | "PTH203",
|
| 205 | "PTH204",
|
| 206 | "PTH205",
|
| 207 | ]
|
| 208 | ignore = [
|
| 209 | # flake8-return
|
| 210 | "RET505", # can't autofix
|
| 211 | "RET506", # can't autofix
|
| 212 | "RET507", # can't autofix
|
| 213 | # error (E)
|
| 214 | "E501", # line too long
|
| 215 | "E402", # import not on top of file
|
| 216 | "E722", # bare except
|
| 217 | "E741", # ambiguous symbol
|
| 218 | # pytest
|
| 219 | "PT011",
|
| 220 | "PT018",
|
| 221 | # flake8-errmsg
|
| 222 | "EM101", # exception must not use a string literal
|
| 223 | "EM102", # exception must not use an f-string literal
|
| 224 | "EM103", # exception must not use a .format(...) string directly
|
| 225 | ]
|
| 226 |
|
| 227 | # Allow fix for all enabled rules (when `--fix`) is provided.
|
| 228 | fixable = ["ALL"]
|
| 229 | unfixable = []
|
| 230 |
|
| 231 | # Allow unused variables when underscore-prefixed.
|
| 232 | dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
| 233 |
|
| 234 | [tool.ruff.format]
|
| 235 | # Like Black, use double quotes for strings.
|
| 236 | quote-style = "double"
|
| 237 |
|
| 238 | # Like Black, indent with spaces, rather than tabs.
|
| 239 | indent-style = "space"
|
| 240 |
|
| 241 | # Like Black, respect magic trailing commas.
|
| 242 | skip-magic-trailing-comma = false
|
| 243 |
|
| 244 | # Like Black, automatically detect the appropriate line ending.
|
| 245 | line-ending = "auto"
|
| 246 |
|
| 247 | [tool.typos.default.extend-identifiers]
|
| 248 | # *sigh* this just isn't worth the cost of fixing
|
| 249 | ACI = "ACI"
|
| 250 |
|
| 251 | [tool.typos.default.extend-words]
|
| 252 | # Don't correct the surname "Teh"
|
| 253 | aci = "aci"
|
| 254 | ba = "ba"
|
| 255 |
|
| 256 | [tool.pylint.messages_control]
|
| 257 | disable = [
|
| 258 | "line-too-long", # C0301 - disable line length checks
|
| 259 | "missing-docstring", # C0111 - disable docstring requirements
|
| 260 | "missing-class-docstring", # C0115 - disable class docstring requirements
|
| 261 | "missing-function-docstring", # C0116 - disable function docstring requirements
|
| 262 | "missing-module-docstring", # C0114 - disable module docstring requirements
|
| 263 | "unspecified-encoding", # W1514 - disable unspecified encoding warnings
|
| 264 | "duplicate-code", # R0801 - disable code duplication checks
|
| 265 | "too-few-public-methods", # R0903 - disable too few public methods warnings
|
| 266 | ]
|
| 267 |
|
| 268 | [tool.pytest.ini_options]
|
| 269 | asyncio_mode = "auto"
|
| 270 | asyncio_default_fixture_loop_scope = "function"
|
| 271 | markers = [
|
| 272 | "slow: marks tests as slow (deselect with '-k \"not slow\"')",
|
| 273 | ]
|
| 274 |
|
| 275 | [dependency-groups]
|
| 276 | dev = [
|
| 277 | "datasets>=4.5.0",
|
| 278 | "pytest>=9.0.2",
|
| 279 | "pytest-asyncio>=1.3.0",
|
| 280 | "pytest-cov>=7.0.0",
|
| 281 | ]
|
| 282 |
|