pyproject.toml
1 # Copyright 2025 Alibaba Group Holding Ltd. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 [build-system] 16 requires = ["hatchling", "hatch-vcs"] 17 build-backend = "hatchling.build" 18 19 [project] 20 name = "opensandbox" 21 dynamic = ["version"] 22 description = "OpenSandbox Python SDK - Secure, isolated execution environments" 23 authors = [ 24 { name = "OpenSandbox Team", email = "ninan.nn@alibaba-inc.com" } 25 ] 26 license = { file = "LICENSE" } 27 readme = "README.md" 28 requires-python = ">=3.10" 29 keywords = ["sandbox", "code-execution", "docker", "security", "sdk", "opensandbox"] 30 classifiers = [ 31 "Development Status :: 3 - Alpha", 32 "Intended Audience :: Developers", 33 "License :: OSI Approved :: Apache Software License", 34 "Operating System :: OS Independent", 35 "Programming Language :: Python :: 3", 36 "Programming Language :: Python :: 3 :: Only", 37 "Programming Language :: Python :: 3.10", 38 "Programming Language :: Python :: 3.11", 39 "Programming Language :: Python :: 3.12", 40 "Programming Language :: Python :: 3.13", 41 "Topic :: Software Development :: Libraries", 42 "Typing :: Typed", 43 ] 44 dependencies = [ 45 "pydantic>=2.4.2,<3.0", 46 "python-dateutil>=2.8.2,<3.0", 47 "attrs>=21.3.0", 48 "httpx>=0.27.0,<1.0", 49 ] 50 51 [project.urls] 52 Homepage = "https://open-sandbox.ai" 53 Repository = "https://github.com/alibaba/OpenSandbox" 54 Documentation = "https://open-sandbox.ai" 55 Issues = "https://github.com/alibaba/OpenSandbox/issues" 56 57 [tool.hatch.version] 58 source = "vcs" 59 60 [tool.hatch.version.raw-options] 61 # This package is in a subdirectory; explicitly point setuptools-scm at the git root. 62 root = "../../.." 63 tag_regex = "^python/sandbox/v(?P<version>\\d+\\.\\d+\\.\\d+(?:[\\.\\w\\+\\-]*)?)$" 64 git_describe_command = 'git describe --dirty --tags --long --match "python/sandbox/v*"' 65 fallback_version = "0.1.8" 66 67 [tool.hatch.build] 68 include = [ 69 "LICENSE", 70 "src/**/py.typed", 71 "src/opensandbox" 72 ] 73 74 [tool.hatch.build.targets.wheel] 75 packages = ["src/opensandbox"] 76 77 [tool.ruff] 78 target-version = "py310" 79 line-length = 88 80 exclude = [ 81 "src/opensandbox/api/**", 82 ] 83 84 [tool.ruff.lint] 85 select = [ 86 "E", # pycodestyle errors 87 "W", # pycodestyle warnings 88 "F", # pyflakes 89 "I", # isort 90 "B", # flake8-bugbear 91 "C4", # flake8-comprehensions 92 "UP", # pyupgrade 93 ] 94 ignore = [ 95 "E501", # line too long, handled by formatter 96 "B008", # do not perform function calls in argument defaults 97 "C901", # too complex 98 ] 99 100 [tool.ruff.lint.per-file-ignores] 101 "__init__.py" = ["F401"] 102 103 [tool.pyright] 104 typeCheckingMode = "standard" 105 pythonVersion = "3.10" 106 pythonPlatform = "All" 107 108 include = ["src"] 109 110 exclude = [ 111 "**/node_modules", 112 "**/__pycache__", 113 "src/opensandbox/api/**", 114 ] 115 116 venvPath = "." 117 venv = ".venv" 118 119 reportMissingImports = true 120 reportMissingTypeStubs = false 121 122 [tool.pytest.ini_options] 123 minversion = "6.0" 124 addopts = "-ra -q --strict-markers --strict-config" 125 testpaths = [ 126 "tests", 127 ] 128 python_files = [ 129 "test_*.py", 130 "*_test.py", 131 ] 132 asyncio_mode = "auto" 133 134 [tool.coverage.run] 135 source = ["src"] 136 branch = true 137 138 [dependency-groups] 139 dev = [ 140 "pytest>=7.0.0", 141 "pytest-asyncio>=0.21.0", 142 "pytest-cov>=4.0.0", 143 "ruff>=0.14.8", 144 "pyright>=1.1.0", 145 "openapi-python-client>=0.28.0", 146 ]