File size: 2,088 Bytes
141a818 | 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 | [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",
]
|