pyproject.toml•7.89 kB
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "mockloop-mcp"
version = "2.2.9"
description = "MCP server to generate and run mock APIs from specifications."
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT License" }
authors = [
{ name = "Jascha Wanger / Tarnover, LLC", email = "jascha@tarnover.com" },
]
keywords = ["mcp", "api", "mock", "fastapi", "openapi", "swagger", "generator"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: FastAPI",
"Environment :: Console",
"Topic :: Software Development :: Testing :: Mocking",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"fastapi>=0.104.0",
"uvicorn[standard]>=0.24.0",
"Jinja2>=3.1.0",
"PyYAML>=6.0",
"requests>=2.31.0",
"aiohttp>=3.9.0",
"mcp[cli]>=1.0.0",
"schemapin>=1.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-asyncio>=0.21.0",
"black>=23.0.0",
"ruff>=0.1.0", # Replaces flake8, isort
"isort>=5.12.0",
"mypy>=1.0.0",
"bandit[toml]>=1.7.0",
"safety>=2.3.0",
"pre-commit>=3.0.0",
"pip-audit>=2.6.0",
"semgrep>=1.45.0",
"types-PyYAML>=6.0.0",
"types-requests>=2.31.0",
]
[project.urls]
Homepage = "https://github.com/mockloop/mockloop-mcp"
Repository = "https://github.com/mockloop/mockloop-mcp"
# Documentation = "https://yourusername.github.io/mockloop-mcp/" # If you add docs
[project.scripts]
mockloop-mcp = "mockloop_mcp.main:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.black]
line-length = 88
target-version = ['py310', 'py311', 'py312']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
| src/mockloop_mcp/templates
)/
'''
[tool.isort]
profile = "black"
line_length = 88
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
src_paths = ["src", "tests"]
skip_glob = ["src/mockloop_mcp/templates/*"]
[tool.ruff]
line-length = 88
# CRITICAL: target-version must be Python version specifier (py310, py311, py312), NOT package version
target-version = "py312"
src = ["src", "tests"]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"src/mockloop_mcp/templates",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"A", # flake8-builtins
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"T20", # flake8-print
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PL", # pylint
"TRY", # tryceratops
"FLY", # flynt
"PERF", # perflint
]
ignore = [
"E402", # module level import not at top of file
"E501", # line too long, handled by black
"E701", # multiple statements on one line (colon)
"E702", # multiple statements on one line (semicolon)
"E722", # do not use bare except
"F401", # imported but unused
"I001", # import block is un-sorted or un-formatted
"S101", # use of assert detected
"S110", # try-except-pass detected, consider logging the exception
"S113", # probable use of requests call without timeout
"S603", # subprocess call: check for execution of untrusted input
"S607", # starting a process with a partial executable path
"T201", # print found
"ARG001", # unused function argument
"PLR0911", # too many return statements
"PLR0912", # too many branches
"PLR0913", # too many arguments to function call
"PLR0915", # too many statements
"PLR2004", # magic value used in comparison
"PTH123", # open() should be replaced by Path.open()
"TRY003", # avoid specifying long messages outside the exception class
"TRY203", # remove exception handler; error is immediately re-raised
"TRY300", # consider moving this statement to an else block
"TRY301", # abstract raise to an inner function
"ERA001", # found commented-out code
"PERF203", # try-except within a loop incurs performance overhead
"PERF401", # use a list comprehension to create a transformed list
"SIM103", # return the negated condition directly
"SIM117", # use a single with statement with multiple contexts
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "ARG001", "ARG002", "PLR2004"]
"src/mockloop_mcp/templates/*" = ["ALL"]
[tool.ruff.lint.isort]
known-first-party = ["mockloop_mcp"]
force-sort-within-sections = true
[tool.mypy]
# CRITICAL: python_version must be semantic version (3.10, 3.11, 3.12), NOT package version
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
extra_checks = true
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_optional = true
no_implicit_reexport = true
strict_optional = true
exclude = [
'src/mockloop_mcp/templates/',
'build/',
'dist/',
'.venv/',
'venv/',
]
[[tool.mypy.overrides]]
module = [
"uvicorn.*",
"fastapi.*",
"jinja2.*",
"yaml.*",
"aiohttp.*",
]
ignore_missing_imports = true
[tool.bandit]
exclude_dirs = ["tests", "src/mockloop_mcp/templates"]
skips = ["B101", "B601"] # Skip assert_used and shell_injection for templates
[tool.bandit.assert_used]
skips = ["*_test.py", "test_*.py"]
[tool.pytest.ini_options]
# CRITICAL: minversion must be pytest version (7.0), NOT package version
minversion = "7.0"
addopts = [
"--strict-markers",
"--strict-config",
"--verbose",
"--tb=short",
"--cov-config=.coveragerc",
]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Slow running tests",
"network: Tests requiring network access",
]
asyncio_mode = "auto"
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.coverage.run]
source = ["src/mockloop_mcp"]
omit = [
"*/tests/*",
"*/test_*",
"*/__pycache__/*",
"*/venv/*",
"*/.venv/*",
"*/build/*",
"*/dist/*",
"*/templates/*",
"*/scripts/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
show_missing = true
skip_covered = false
precision = 2
fail_under = 80
[tool.coverage.html]
directory = "htmlcov"
[tool.coverage.xml]
output = "coverage.xml"
[dependency-groups]
dev = [
"ruff>=0.11.11",
]