interview / pyproject.toml
Lee93whut
chore: initial project scaffold
141a818
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "maze-env"
version = "0.4.0"
description = "Production-grade 2-D maze RL environment (Gymnasium)"
requires-python = ">=3.10"
dependencies = [
"gymnasium>=0.29",
"numpy>=1.24",
"pyyaml>=6.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-html>=4.0",
"pytest-cov>=5.0",
]
[tool.setuptools.packages.find]
where = ["."]
include = ["maze_env*", "src*"]
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# pytest ๅ…จๅฑ€้…็ฝฎ
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions= ["test_*"]
# ๆฏๆฌก่ฟ่กŒ่‡ชๅŠจ็”Ÿๆˆๅธฆๆ—ถ้—ดๆˆณ็š„ HTML ๆŠฅๅ‘Š + JUnit XML
addopts = """
-v
--tb=short
--strict-markers
--cov=maze_env
--cov=src
--cov-report=term-missing
--cov-report=html:reports/coverage
--cov-report=xml:coverage.xml
--cov-fail-under=90
"""
# ่‡ชๅฎšไน‰ markers๏ผˆ้˜ฒๆญข PytestUnknownMarkWarning๏ผ‰
markers = [
"unit: pure unit tests with no I/O",
"integration: tests that read files or call reset/step chains",
"slow: tests that loop many episodes",
]
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# coverage ้…็ฝฎ
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
[tool.coverage.run]
source = ["maze_env", "src"]
omit = ["src/report.py", "src/plot_curves.py"]
branch = true # ๅˆ†ๆ”ฏ่ฆ†็›–๏ผˆๆฏ”่กŒ่ฆ†็›–ๆ›ดไธฅๆ ผ๏ผ‰
[tool.coverage.report]
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"def __repr__",
"raise NotImplementedError",
]