Files
brunoandClaude Sonnet 4.5 80856ad45f feat: implement Week 1 CI/CD quality gates for all components
Add comprehensive quality checks to CI pipeline to ensure code quality,
test coverage, and security compliance across ljwx-boot (Java),
ljwx-admin (TypeScript), and ljwx-bigscreen (Python).

Changes:
- ljwx-boot: JaCoCo coverage, Checkstyle linting, Surefire tests
- ljwx-admin: Vitest framework, ESLint, TypeScript checks
- ljwx-bigscreen: pytest-cov, ruff linter, black formatter, safety scan
- CI pipeline: 4 parallel quality jobs (test-build-boot, test-admin,
  test-bigscreen, security-scan)
- Security: Trivy vulnerability scanning for all components
- Artifacts: Coverage reports (7-day retention), security reports (30-day)

Benefits:
- Automated quality enforcement on every commit
- Early bug detection with unit tests
- Code coverage visibility (60-70% thresholds)
- Security compliance with CVE scanning
- Fast feedback with parallel execution (~8-12 min total)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-02 15:54:20 +08:00

143 lines
3.2 KiB
TOML

[build-system]
requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "ljwx-bigscreen"
version = "1.0.0"
description = "LJWX Health Monitoring Dashboard"
requires-python = ">=3.8"
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
"--cov=bigScreen",
"--cov-report=html",
"--cov-report=xml",
"--cov-report=term-missing:skip-covered",
"--cov-branch",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
[tool.coverage.run]
source = ["bigScreen"]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/venv/*",
"*/migrations/*",
]
branch = true
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.coverage.html]
directory = "htmlcov"
[tool.ruff]
target-version = "py38"
line-length = 120
exclude = [
".git",
".venv",
"__pycache__",
"build",
"dist",
"migrations",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C90", # mccabe complexity
"UP", # pyupgrade
"N", # pep8-naming
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PL", # pylint
"TRY", # tryceratops
"RUF", # ruff-specific
]
ignore = [
"E501", # line too long (handled by formatter)
"COM812", # missing trailing comma (handled by formatter)
"ISC001", # implicit string concatenation (conflicts with formatter)
"TRY003", # long messages in exceptions
"PLR0913", # too many arguments
"ARG002", # unused method argument
"N802", # function name should be lowercase (for Flask routes)
"N803", # argument name should be lowercase
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "PLR2004", "ARG001"]
"__init__.py" = ["F401"]
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.isort]
known-first-party = ["bigScreen"]
combine-as-imports = true
[tool.black]
line-length = 120
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.venv
| __pycache__
| build
| dist
| migrations
)/
'''