-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
executable file
·1122 lines (1024 loc) · 52.8 KB
/
pyproject.toml
File metadata and controls
executable file
·1122 lines (1024 loc) · 52.8 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# ============================================================================
# [LEAF] PlantGuard - AI Plant Disease Detection System
# ============================================================================
# This file configures the entire PlantGuard project
#
# [LAUNCH] QUICK START:
# make setup - Install everything
# make run - Launch the app
# make dev - Development workflow
# make help - See all commands
#
# [WRITE] SECTIONS:
# 1. Build System - How Python packages the project
# 2. Project Info - Name, version, description
# 3. Dependencies - What libraries we need
# 4. Code Quality - Formatting and linting rules
# 5. Testing - How tests are run
# 6. Type Checking - Static type analysis
# ============================================================================
# ============================================================================
# 1️⃣ BUILD SYSTEM - How Python packages this project
# ============================================================================
[build-system]
requires = ["hatchling>=1.18.0"]
build-backend = "hatchling.build"
# ============================================================================
# 2️⃣ PROJECT INFORMATION - Basic project details
# ============================================================================
[project]
name = "plantguard"
version = "0.2.0"
description = "[LEAF] AI-powered plant disease detection with Vision Transformer, MobileNet, and ResNet50 models"
authors = [{ name = "PlantGuard Team", email = "umit.arslan@outlook.com" }]
license = "MIT"
readme = "README.md"
requires-python = ">=3.10"
# [TAG] Keywords for package discovery
keywords = [
"plant-disease",
"computer-vision",
"machine-learning",
"agriculture",
"ai",
"pytorch",
"streamlit",
"multimodal",
]
# [DETAILS] Package classifiers (for PyPI)
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Processing",
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: OS Independent",
"Environment :: Web Environment",
]
# ============================================================================
# 3️⃣ DEPENDENCIES - What libraries PlantGuard needs to work
# ============================================================================
# [TIP] TIP: All versions are in requirements.txt - this is just the minimum needed
dependencies = [
# [BRAIN] AI/ML Core - The brain of PlantGuard
"torch>=2.8.0", # PyTorch - main ML framework
"torchvision>=0.23.0", # Computer vision models
"torchaudio>=2.8.0", # Audio processing
"torchmetrics>=1.8.1", # ML metrics and evaluation
# [SUMMARY] Data Processing - Handle numbers and data
"numpy>=2.2.6", # Fast arrays and math
"pandas>=2.3.1", # Data tables and analysis
"scikit-learn>=1.7.1", # Traditional ML algorithms
"PyYAML>=6.0.2", # YAML configuration files
# [VISION] Computer Vision - See and understand images
"opencv-python-headless>=4.12.0.88", # Image processing (no GUI)
"Pillow>=11.3.0", # Image loading and basic editing
# [HUG] Hugging Face - Pre-trained AI models
"transformers>=4.55.0", # Vision Transformer, BERT, etc.
"accelerate>=1.10.0", # Fast model loading
"datasets>=4.0.0", # Dataset handling
"huggingface-hub>=0.34.4", # Model hub integration
"tokenizers>=0.21.4", # Text tokenization
"safetensors>=0.6.2", # Safe tensor serialization
# [SOUND] Audio Processing - Hear and understand speech
"librosa>=0.11.0", # Audio analysis
"soundfile>=0.13.1", # Audio file reading/writing
"SpeechRecognition>=3.14.3", # Speech-to-text
"openai-whisper>=20230314", # Advanced speech recognition
# [NETWORK] Web Interface - The app you see in your browser
"streamlit>=1.48.0", # Main web framework
"streamlit-webrtc>=0.63.4", # Real-time audio/video
"streamlit-option-menu>=0.4.0", # Enhanced UI components
"pycloudflared>=0.2.0", # HTTPS tunnels for microphone
"pyngrok>=7.3.0", # Alternative tunneling
"plotly>=5.24.1", # Interactive plotting
# [TOOL] Utilities - Helper tools
"python-dotenv>=1.1.1", # Environment variables (.env files)
"tensorboard>=2.20.0", # Training visualization
"psutil>=6.1.1", # System monitoring
"reportlab>=4.2.5", # PDF generation
"watchdog>=6.0.0", # File system monitoring
]
# [LAUNCH] QUICK INSTALL: make setup (installs everything automatically)
[project.optional-dependencies]
# [TOOL] Development Tools - For coding and maintaining PlantGuard
dev = [
"ruff>=0.12.8", # [ACTIONS] Super fast Python linter & formatter
"mypy>=1.17.1", # [SEARCH] Type checking (catches bugs early)
"pytest>=8.4.1", # [TEST] Testing framework
"pytest-cov>=6.2.1", # [SUMMARY] Test coverage reports
"pytest-mock>=3.14.1", # [INTERFACE] Mock objects for testing
"bandit>=1.8.6", # [SECURE] Security vulnerability scanner
"safety>=3.6.0", # [SHIELD] Check for known security issues
"pre-commit>=4.3.0", # [HOOK] Git hooks for code quality
]
# [LIBRARY] Documentation Tools - Generate beautiful docs
docs = [
"sphinx>=7.2.6", # [MANUAL] Documentation generator
"sphinx-rtd-theme>=3.0.2", # [DESIGN] Read the Docs theme
"myst-parser>=2.0.0", # [WRITE] Markdown support in Sphinx
]
# [NOTEBOOK] Jupyter & Analysis - Interactive development
jupyter = [
"jupyter>=1.1.1", # [NOTEBOOK] Jupyter notebooks
"ipykernel>=6.30.1", # [PYTHON] Python kernel for notebooks
"matplotlib>=3.10.5", # [CHART] Plotting and visualization
"seaborn>=0.13.2", # [DESIGN] Beautiful statistical plots
"plotly>=5.24.1", # [SUMMARY] Interactive plots (also in main deps)
]
# [AI] ML Training & Experiments - Advanced ML features
training = [
"wandb>=0.21.1", # [SUMMARY] Experiment tracking (Weights & Biases)
"optuna>=4.4.0", # [PROGRESS] Hyperparameter optimization
]
# [PROGRESS] Quick Install Options
all = ["plantguard[dev,docs,jupyter,training]"] # Everything
basic = ["plantguard[jupyter]"] # Just notebooks
full-dev = ["plantguard[dev,docs,jupyter]"] # Development without ML extras
# [LINK] Project Links - Where to find more info
[project.urls]
"[HOME] Homepage" = "https://github.com/arslanmit/PlantGuard"
"[DIRECTORY] Source Code" = "https://github.com/arslanmit/PlantGuard"
"[LAUNCH] Try in Colab" = "https://colab.research.google.com/github/arslanmit/PlantGuard/blob/main/notebooks/PlantGuard.ipynb"
# [DESKTOP] Command Line Tools - Run PlantGuard from terminal
[project.scripts]
plantguard = "plantguard.plantguard_bot:main" # Main CLI interface
plantguard-train = "plantguard.training.production_trainer:main" # Training CLI
# ============================================================================
# 4️⃣ CODE QUALITY - Keep code clean and consistent
# ============================================================================
# [PROGRESS] GOAL: Make code readable, consistent, and bug-free
#
# [LAUNCH] QUICK COMMANDS:
# make format - Auto-fix formatting
# make lint - Check for issues
# make fix - Auto-fix what we can
# make dev - Do both format + lint
# ============================================================================
# 4️⃣ CODE QUALITY - Keep code clean and consistent
# ============================================================================
# [PROGRESS] GOAL: Make code readable, consistent, and bug-free
#
# [LAUNCH] QUICK COMMANDS:
# make format - Auto-fix formatting
# make lint - Check for issues
# make fix - Auto-fix what we can
# make dev - Do both format + lint
[tool.mypy]
python_version = "3.10" # [PYTHON] Python version we're using
strict = false # [PROGRESS] Gradual typing (not too strict while learning)
# External libraries - ignore missing type information
ignore_missing_imports = true # Ignore missing imports from external packages
follow_imports = "silent" # Don't follow imports to external packages
namespace_packages = true # Handle namespace packages better
# Relaxed warnings to reduce noise across a large, partially-typed codebase
warn_return_any = false # don't warn for Any return types for now
warn_unused_configs = false
warn_redundant_casts = false
warn_no_return = false
warn_unreachable = false
strict_equality = false
# Disable specific error codes for gradual typing
disable_error_code = [
"name-defined", # Ignore "not importing" related errors
"attr-defined", # Allow dynamic attribute access
"operator", # Allow operator overloading issues
"index", # Allow indexing issues
"assignment", # Allow assignment type mismatches
"arg-type", # Allow argument type mismatches
"return-value", # Allow return value type mismatches
"call-overload", # Allow call overload issues
"union-attr", # Allow union attribute access
"misc", # Allow miscellaneous type issues
"valid-type", # Allow type validation issues
"var-annotated", # Allow missing variable annotations
"has-type", # Allow type determination issues
"override", # Allow method override issues
"call-arg", # Allow call argument issues
"func-returns-value", # Allow function return value issues
"str-bytes-safe", # Allow string/bytes safety issues
"abstract", # Allow abstract class issues
]
# Type annotation requirements (relaxed to allow gradual typing)
disallow_untyped_defs = false # Functions may omit type hints
disallow_incomplete_defs = false # Parameters may omit type annotations
check_untyped_defs = false # Don't check bodies of untyped functions
# Folders to skip (don't type-check these)
exclude = [
"build/", # Build artifacts
"dist/", # Distribution files
".venv/", # Virtual environment
".git/", # Git files
"notebooks/", # Jupyter notebooks (different rules)
"logs/", # Log files
"runs/", # TensorBoard runs
"data/", # Data files
"scripts/", # CLI helper scripts (not part of package)
"tests/", # Test files - ignore all linter rules
]
# [TEST] Test files - relaxed rules for tests
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
check_untyped_defs = false
# ============================================================================
# 5️⃣ TYPE CHECKING - Static type analysis with Pyright
# ============================================================================
# [PROGRESS] GOAL: Catch type-related bugs early with static analysis
#
# [LAUNCH] QUICK COMMANDS:
# make typecheck - Run type checking
# [SEARCH] Pyright - Fast type checker (VS Code's default)
[tool.pyright]
# [PYTHON] Python version we're using
pythonVersion = "3.10"
pythonPlatform = "Darwin"
# [FOLDER] Folders to completely exclude from type checking
exclude = [
"build/",
"dist/",
".venv/",
".git/",
"__pycache__/",
".pytest_cache/",
".mypy_cache/",
".ruff_cache/",
"logs/",
"runs/",
"data/",
"notebooks/",
"tests/", # [IGNORE] Completely ignore tests folder from type checking
"**/tests/**", # Also exclude tests in any subdirectory
]
# [TYPE] Type checking strictness (relaxed for gradual typing)
typeCheckingMode = "basic" # Less strict than "strict" mode
reportMissingImports = false
reportMissingTypeStubs = false
# [IGNORE] Specific type checking rules to disable
reportOptionalSubscript = false # Allow None[subscript] patterns
reportUnusedImport = false # Allow unused imports
reportUnusedVariable = false # Allow unused variables
reportUnusedClass = false # Allow unused classes
reportUnusedFunction = false # Allow unused functions
reportDuplicateImport = false # Allow duplicate imports
reportMissingParameterType = false # Allow missing parameter types
reportMissingReturnType = false # Allow missing return types
reportMissingTypeArgument = false # Allow missing type arguments
reportUntypedFunctionDecorator = false # Allow untyped decorators
reportUntypedClassDecorator = false # Allow untyped class decorators
reportUntypedBaseClass = false # Allow untyped base classes
reportUntypedNamedTuple = false # Allow untyped named tuples
reportPrivateUsage = false # Allow private attribute access
reportConstantRedefinition = false # Allow constant redefinition
reportIncompatibleMethodOverride = false # Allow incompatible overrides
reportIncompatibleVariableOverride = false # Allow incompatible variable overrides
reportInconsistentConstructor = false # Allow inconsistent constructors
reportIncompleteStub = false # Allow incomplete stubs
reportOptionalMemberAccess = false # Allow accessing members on potentially None objects
# ============================================================================
# 6️⃣ TESTING - Make sure everything works correctly
# ============================================================================
# [PROGRESS] GOAL: Catch bugs and ensure PlantGuard works as expected
#
# [LAUNCH] QUICK COMMANDS:
# make test - Run all tests
# make coverage - See test coverage report
# [TEST] Pytest - Testing framework (finds and runs tests)
[tool.pytest.ini_options]
minversion = "7.0" # Minimum pytest version
# [TOOL] Test options (what pytest does when running)
addopts = [
"-ra", # Show summary of all test results
"--strict-markers", # Only allow defined test markers
"--strict-config", # Strict configuration checking
"--cov=src", # Measure code coverage for src/ folder
"--cov-report=term-missing:skip-covered", # Show missing lines in terminal
"--cov-report=html:htmlcov", # Generate HTML coverage report
"--cov-report=xml", # Generate XML coverage report
"--cov-fail-under=80", # Fail if coverage is below 80%
]
# [FOLDER] Where to find tests and how to recognize them
testpaths = ["tests"] # Look for tests in tests/ folder
python_files = ["test_*.py", "*_test.py"] # Files that contain tests
python_classes = ["Test*"] # Test classes start with "Test"
python_functions = ["test_*"] # Test functions start with "test_"
# [TAG] Test markers (categories for organizing tests)
markers = [
"slow: marks tests as slow (skip with: pytest -m 'not slow')",
"integration: marks tests as integration tests (test multiple components)",
"unit: marks tests as unit tests (test single functions)",
"gpu: marks tests that require GPU (skip if no GPU available)",
"model: marks tests that require trained models",
]
# [WARNING] Warning filters (what warnings to show/hide)
filterwarnings = [
# "error", # Treat warnings as errors (strict)
"ignore::UserWarning", # Ignore user warnings (common in ML)
# "ignore::DeprecationWarning", # Ignore deprecation warnings
# "ignore::PendingDeprecationWarning", # Ignore pending deprecation warnings
]
# [SUMMARY] Test Coverage - How much of our code is tested
[tool.coverage.run]
source = ["src"] # Measure coverage for src/ folder
branch = true # Track branch coverage (if/else paths)
# [STOP] Files to skip when measuring coverage
omit = [
"*/tests/*", # Don't measure test files themselves
"*/test_*", # Skip test files
"*/__pycache__/*", # Skip Python cache files
"*/site-packages/*", # Skip external libraries
"setup.py", # Skip setup script
]
[tool.coverage.report]
# [STOP] Lines to exclude from coverage (code that doesn't need testing)
exclude_lines = [
"pragma: no cover", # Explicit exclusion comment
"def __repr__", # String representation methods
"if self.debug:", # Debug-only code
"if settings.DEBUG", # Debug settings
"raise AssertionError", # Assertion errors
"raise NotImplementedError", # Not implemented methods
"if 0:", # Dead code
"if __name__ == .__main__.:", # Script entry points
"class .*\\bProtocol\\):", # Protocol classes
"@(abc\\.)?abstractmethod", # Abstract methods
]
show_missing = true # Show which lines aren't covered
skip_covered = true # Don't show fully covered files
[tool.coverage.html]
directory = "htmlcov" # Where to put HTML coverage report
# ============================================================================
# 7️⃣ SECURITY - Keep PlantGuard safe from vulnerabilities
# ============================================================================
# [PROGRESS] GOAL: Find potential security issues in code
#
# [LAUNCH] QUICK COMMANDS:
# make security - Run security scan
# [SECURE] Bandit - Security linter (finds potential security issues)
[tool.bandit]
# [STOP] Folders to skip during security scan
exclude_dirs = ["tests", "build", "dist", ".venv", "run", "data"]
# [STOP] Security checks to skip (because they're OK for PlantGuard)
skips = [
"B101", # assert statements (OK for debugging and development)
"B601", # shell injection (we control the shell commands)
"B614", # PyTorch model loading (we trust our local model files)
"B615", # Hugging Face downloads (managed through our model config)
]
# ============================================================================
# 8️⃣ DEVELOPMENT WORKFLOW - Helpful tools and automation
# ============================================================================
# [HOOK] Pre-commit Configuration Reference
# =====================================
# [TIP] Pre-commit runs checks automatically before each git commit
#
# [LAUNCH] SETUP:
# make setup (installs pre-commit hooks automatically)
#
# [WRITE] To create .pre-commit-config.yaml manually:
#
# repos:
# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.1.6
# hooks:
# - id: ruff
# args: [--fix]
# - id: ruff-format
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.6.1
# hooks:
# - id: mypy
# additional_dependencies: [types-all]
# ============================================================================
# 9️⃣ PACKAGE BUILDING - How to create installable PlantGuard packages
# ============================================================================
# [PROGRESS] GOAL: Configure how Python packages PlantGuard for distribution
#
# [LAUNCH] QUICK COMMANDS:
# make build - Build package for distribution
# pip install -e . - Install PlantGuard in development mode
[tool.ruff]
line-length = 150 # [MEASURE] Reasonable line length for readability
target-version = "py310" # [PYTHON] Python version we support
fix = true # [TOOL] Auto-fix issues when possible
show-fixes = true # [WRITE] Show what was fixed
output-format = "grouped" # [SUMMARY] Group similar issues together
force-exclude = true # [FORCE] Enforce exclusions even for direct file paths
# [EXTENSIONS] Include all file types for E501 checking and ignoring
include = ["**/*"] # [ALL] Check ALL file types, not just Python
extend-include = ["**/*"] # [ALL] Include ALL file extensions for linting
# [FOLDER] Folders to completely exclude from all linting
exclude = [
"build",
"dist",
".venv",
".git",
"__pycache__",
".pytest_cache",
".mypy_cache",
".ruff_cache",
"logs",
"runs",
"data",
"notebooks",
"tests",
]
# [SEARCH] What Ruff checks for (focused on essential rules)
[tool.ruff.lint]
select = [
# ============================================================================
# [PYTHON] CORE PYTHON RULES - Essential code quality
# ============================================================================
"E", # pycodestyle errors (spacing, indentation, line length)
"F", # pyflakes (unused imports, undefined variables, syntax errors)
"I", # isort (organize imports nicely by category)
"W", # pycodestyle warnings
# ============================================================================
# [BUG] BUG PREVENTION - Catch common mistakes
# ============================================================================
"B", # flake8-bugbear (common Python gotchas and anti-patterns)
"C4", # flake8-comprehensions (better list/dict comprehensions)
"UP", # pyupgrade (modern Python syntax, f-strings, type hints)
# ============================================================================
# [SECURE] SECURITY & SAFETY - Keep code secure
# ============================================================================
"S", # flake8-bandit (security vulnerabilities and unsafe patterns)
# ============================================================================
# [WRITE] CODE STYLE - Clean, readable code
# ============================================================================
"PTH", # flake8-use-pathlib (use pathlib.Path instead of os.path)
"SIM", # flake8-simplify (simpler, more readable code patterns)
"RUF", # ruff-specific rules (unique to Ruff linter)
# ============================================================================
# [TEST] TESTING - Test code quality
# ============================================================================
"PT", # flake8-pytest-style (pytest best practices)
]
extend-ignore = [
# ============================================================================
# [DESIGN] Code Style Exceptions - Maintain readability over strictness
# ============================================================================
"W291", # Trailing whitespace
"W292", # No newline at end of file
"W293", # Blank line contains whitespace
]
ignore = [
# ============================================================================
# [AI] ML/AI Specific Exceptions - Allow common ML patterns
# ============================================================================
"E501", # Allow long lines - ML code often has long function calls and imports
"S101", # Allow assert statements - essential for ML tensor shape validation
"S301", # Allow pickle usage - standard for ML model serialization
"S603", # Allow subprocess calls - needed for ML preprocessing tools
"B008", # Allow function calls in defaults - ML often has computed defaults
"B018", # Allow useless expressions - ML tensor operations have side effects
"UP032", # Allow .format() calls - ML logging often needs .format()
"PTH123", # Allow open() instead of Path.open() - ML compatibility
"S506", # Allow yaml.load() - ML config files need full YAML loading
# ============================================================================
# [SUMMARY] Development Workflow Exceptions - Allow rapid prototyping
# ============================================================================
"B007", # Allow unused loop variables - common in ML training epochs
"SIM102", # Allow if/else over ternary - ML logic often clearer explicit
"SIM108", # Allow if/else for boolean assignment - ML model conditions
"C408", # Allow unnecessary dict calls - ML config clarity
"RUF012", # Allow mutable class attributes - ML model classes need mutable state
# ============================================================================
# [DESIGN] Code Style Exceptions - Maintain readability over strictness
# ============================================================================
"E501", # Allow long lines beyond 120 chars for complex ML expressions
"COM812", # Allow missing trailing commas - dynamic ML parameter lists
# ============================================================================
# [LIBRARY] ALL AVAILABLE RULES - Commented for reference
# ============================================================================
# Uncomment any rule below to add it to the ignore list
# PYCODESTYLE ERRORS (E) - Code style and formatting
# "E101", # Indentation contains mixed spaces and tabs
# "E111", # Indentation is not a multiple of four
# "E112", # Expected an indented block
# "E113", # Unexpected indentation
# "E114", # Indentation is not a multiple of four (comment)
# "E115", # Expected an indented block (comment)
# "E116", # Unexpected indentation (comment)
# "E117", # Over-indented
# "E201", # Whitespace after '('
# "E202", # Whitespace before ')'
# "E203", # Whitespace before ':'
# "E211", # Whitespace before '('
# "E221", # Multiple spaces before operator
# "E222", # Multiple spaces after operator
# "E223", # Tab before operator
# "E224", # Tab after operator
# "E225", # Missing whitespace around operator
# "E226", # Missing whitespace around arithmetic operator
# "E227", # Missing whitespace around bitwise or shift operator
# "E228", # Missing whitespace around modulo operator
# "E231", # Missing whitespace after ','
# "E241", # Multiple spaces after ','
# "E242", # Tab after ','
# "E251", # Unexpected spaces around keyword / parameter equals
# "E261", # At least two spaces before inline comment
# "E262", # Inline comment should start with '# '
# "E265", # Block comment should start with '# '
# "E266", # Too many leading '#' for block comment
# "E271", # Multiple spaces after keyword
# "E272", # Multiple spaces before keyword
# "E273", # Tab after keyword
# "E274", # Tab before keyword
# "E275", # Missing whitespace after keyword
# "E301", # Expected 1 blank line, found 0
# "E302", # Expected 2 blank lines, found 0
# "E303", # Too many blank lines
# "E304", # Blank lines found after function decorator
# "E305", # Expected 2 blank lines after class or function definition
# "E306", # Expected 1 blank line before a nested definition
# "E401", # Multiple imports on one line
# "E402", # Module level import not at top of file
# "E501", # Line too long (82 > 79 characters)
# "E502", # The backslash is redundant between brackets
# "E701", # Multiple statements on one line (colon)
# "E702", # Multiple statements on one line (semicolon)
# "E703", # Statement ends with a semicolon
# "E711", # Comparison to None should be 'if cond is None:'
# "E712", # Comparison to True should be 'if cond is True:' or 'if cond:'
# "E713", # Test for membership should be 'not in'
# "E714", # Test for object identity should be 'is not'
# "E721", # Do not compare types, use 'isinstance()'
"E722", # Do not use bare 'except'
# "E731", # Do not assign a lambda expression, use a def
# "E741", # Ambiguous variable name 'l'
# "E742", # Ambiguous variable name 'O'
# "E743", # Ambiguous variable name 'I'
# "E902", # TokenError
# "E999", # SyntaxError
# PYCODESTYLE WARNINGS (W) - Less critical style issues
# "W191", # Indentation contains tabs
"W291", # Trailing whitespace
"W292", # No newline at end of file
"W293", # Blank line contains whitespace
# "W391", # Blank line at end of file
# "W503", # Line break before binary operator
# "W504", # Line break after binary operator
# "W601", # .has_key() is deprecated, use 'in'
# "W602", # Deprecated form of raising exception
# "W603", # '<>' is deprecated, use '!='
# "W604", # Backticks are deprecated, use 'repr()'
# "W605", # Invalid escape sequence 'x'
# PYFLAKES (F) - Logic errors and undefined variables
# "F401", # Module imported but unused
# "F402", # Import module from line N shadowed by loop variable
# "F403", # 'from module import *' used; unable to detect undefined names
# "F404", # Future import(s) name after other statements
# "F405", # Name may be undefined, or defined from star imports: module
# "F811", # Redefinition of unused name from line N
"F821", # Undefined name name
# "F822", # Undefined name name in __all__
# "F823", # Local variable name ... referenced before assignment
# "F831", # Duplicate argument name in function definition
"F841", # Local variable name is assigned to but never used
# "F901", # raise NotImplemented should be raise NotImplementedError
# ISORT (I) - Import sorting and organization
"I001", # Import block is un-sorted or un-formatted
# "I002", # Missing required import (e.g. from __future__ import annotations)
# FLAKE8-BUGBEAR (B) - Common Python gotchas
# "B002", # Python does not support the unary prefix increment
# "B003", # Assigning to os.environ doesn't clear the environment
# "B004", # Using `hasattr(x, '__call__')` to test if x is callable is unreliable
# "B005", # Using .strip() with multi-character strings is misleading
# "B006", # Do not use mutable data structures for argument defaults
# "B007", # Loop control variable `i` not used within the loop body
# "B008", # Do not perform function calls in argument defaults
# "B009", # Do not call getattr with a constant attribute value
# "B010", # Do not call setattr with a constant attribute value
# "B011", # Do not call assert False since python -O removes these calls
# "B012", # return/continue/break inside finally blocks cause exceptions to be silenced
# "B013", # A length-one tuple literal is redundant
# "B014", # Exception handler is an except clause that duplicates a previous clause
# "B015", # Pointless comparison. This comparison does nothing but waste CPU cycles
# "B016", # Cannot raise a literal. Did you intend to return it or raise an Exception?
# "B017", # self.assertRaises(Exception) should be considered evil
# "B018", # Found useless expression. Either assign it to a variable or remove it
# "B019", # Use of `assert` detected outside of tests
# "B020", # Loop control variable overrides iterable it iterates
# "B021", # f-string is missing placeholders
# "B022", # No arguments passed to `contextlib.suppress`
# "B023", # Function definition does not bind loop variable
# "B024", # Abstract base class with no abstract methods
# "B025", # Exception handler is an except clause that duplicates a previous clause
# "B026", # Star-arg unpacking after a keyword argument is strongly discouraged
# "B027", # Empty method in an abstract base class
# "B028", # No explicit stacklevel keyword argument found
# "B029", # Using `except ():` with an empty tuple does not catch anything
# "B030", # Except handlers should only be exception classes or tuples of exception classes
# "B031", # Using the generator returned from itertools.groupby() more than once
# "B032", # Possible unintentional type annotation (use `:`): `var = value`
# "B033", # Sets should not contain duplicate item
# "B034", # `re.sub()` should pass `count` and `flags` as keyword arguments
# "B035", # Found `except BaseException:` (except-base-exception)
# "B901", # Using `return x` in a generator function used to be syntactically invalid
# "B902", # Invalid first argument used for method
# "B904", # Within an except clause, raise exceptions with `raise ... from err`
# "B905", # `zip()` without an explicit `strict=` parameter
# FLAKE8-COMPREHENSIONS (C4) - List/dict comprehension improvements
# "C400", # Unnecessary generator - rewrite as a list comprehension
# "C401", # Unnecessary generator - rewrite as a set comprehension
# "C402", # Unnecessary generator - rewrite as a dict comprehension
# "C403", # Unnecessary list comprehension - rewrite as a set comprehension
# "C404", # Unnecessary list comprehension - rewrite as a dict comprehension
# "C405", # Unnecessary literal - rewrite as a set literal
# "C406", # Unnecessary literal - rewrite as a dict literal
# "C408", # Unnecessary dict call - rewrite as a literal
# "C409", # Unnecessary list passed to tuple() - rewrite as a tuple literal
# "C410", # Unnecessary list passed to list() - remove the outer call to list()
# "C411", # Unnecessary list call - remove the outer call to list()
# "C413", # Unnecessary list call around sorted()
# "C414", # Unnecessary list call within sorted()
# "C415", # Unnecessary subscript reversal of iterable
# "C416", # Unnecessary list comprehension - rewrite using list()
# "C417", # Unnecessary map usage - rewrite using a list comprehension
# "C418", # Unnecessary dict literal passed to dict() - remove the outer call
# "C419", # Unnecessary list comprehension
# PYUPGRADE (UP) - Modern Python syntax
# "UP001", # Use `{}` instead of `{}.format()`
# "UP003", # Use `{}` instead of `{}.format()`
# "UP004", # Class `Foo` inherits from `object`
# "UP005", # `six.text_type` alias for `str`
# "UP006", # Use `list` instead of `List` for type annotations
# "UP007", # Use `X | Y` for type annotations
# "UP008", # Use `super()` instead of `super(__class__, self)`
# "UP009", # UTF-8 encoding declaration is unnecessary
# "UP010", # Unnecessary `__future__` import `{name}` for target Python version
# "UP011", # Unnecessary parameters to `functools.lru_cache`
# "UP012", # Unnecessary call to `encode` as UTF-8
# "UP013", # Convert `typing.Text` to `str`
# "UP014", # Convert `typing.Callable[[...], ...]` to `collections.abc.Callable`
# "UP015", # Unnecessary open mode parameters
# "UP017", # Use `datetime.timezone.utc` alias
# "UP018", # Unnecessary call to `str`
# "UP019", # `typing.Text` is deprecated, use `str`
# "UP020", # Use builtin `open`
# "UP021", # `typing.List` is deprecated, use `list`
# "UP022", # `typing.Dict` is deprecated, use `dict`
# "UP023", # `typing.Set` is deprecated, use `set`
# "UP024", # `typing.FrozenSet` is deprecated, use `frozenset`
# "UP025", # `typing.Tuple` is deprecated, use `tuple`
# "UP026", # `typing.Type` is deprecated, use `type`
# "UP027", # `typing.Union` is deprecated, use `X | Y`
# "UP028", # `typing.Optional` is deprecated, use `X | None`
# "UP029", # Use `str` instead of `typing_extensions.LiteralString`
# "UP030", # Use implicit references for positional format fields
# "UP031", # Use format specifiers instead of `%` formatting
# "UP032", # Use f-string instead of `format` call
# "UP033", # Use `X | Y` in `isinstance` call instead of `(X, Y)`
# "UP034", # Avoid extraneous parentheses
# "UP035", # `typing.Dict` is deprecated, use `dict`
# "UP036", # Version block is outdated for minimum Python version
# "UP037", # Remove quotes from type annotation
# "UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)`
# "UP039", # Unnecessary parentheses after class base
# "UP040", # Type alias without `TypeAlias` annotation
# "UP041", # Use `types.MethodType` instead of `type(lambda: None)`
# "UP042", # Replace `yield` over `async` comprehension with `async yield`
# "UP043", # Avoid importing `typing_extensions` members deprecated in Python 3.10+
# FLAKE8-BANDIT (S) - Security issues
# "S101", # Use of assert detected. The enclosed code will be removed when compiling to optimised byte code
# "S102", # Use of exec detected
# "S103", # bad-file-permissions
# "S104", # Possible binding to all interfaces
# "S105", # Possible hardcoded password
# "S106", # Possible hardcoded password
# "S107", # Possible hardcoded password
# "S108", # Probable insecure usage of temp file/directory
"S110", # try-except-pass detected, consider logging the exception
# "S112", # try-except-continue detected, consider logging the exception
# "S113", # Probable use of requests call without timeout
# "S201", # Use of `{name}` with `shell=True` seems safe, but may be changed in the future
# "S202", # Use of `tarfile.extractall` and `tarfile.extract` are unsafe
# "S301", # `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data
# "S302", # Deserialization with the marshal module is possibly dangerous
# "S303", # Use of insecure MD2, MD4, MD5, or SHA1 hash function
# "S304", # Use of insecure cipher {name}
# "S305", # Use of insecure cipher mode {name}
# "S306", # Use of insecure and deprecated function (mktemp)
# "S307", # Use of possibly insecure function - consider using safer ast.literal_eval
# "S308", # Use of mark_safe() may expose cross-site scripting vulnerabilities
# "S310", # Audit url open for permitted schemes
# "S311", # Standard pseudo-random generators are not suitable for security/cryptographic purposes
# "S312", # Telnet-related functions are being called
# "S313", # Using xml to parse untrusted data is known to be vulnerable to XML attacks
# "S314", # Using xml to parse untrusted data is known to be vulnerable to XML attacks
# "S315", # Using xml to parse untrusted data is known to be vulnerable to XML attacks
# "S316", # Using xml to parse untrusted data is known to be vulnerable to XML attacks
# "S317", # Using xml to parse untrusted data is known to be vulnerable to XML attacks
# "S318", # Using xml to parse untrusted data is known to be vulnerable to XML attacks
# "S319", # Using xml to parse untrusted data is known to be vulnerable to XML attacks
# "S320", # Using lxml to parse untrusted data is known to be vulnerable to XML attacks
# "S321", # FTP-related functions are being called
# "S323", # Using unverified HTTPS requests is unsafe
# "S324", # Probable use of insecure hash functions in `hashlib`
# "S401", # Use of deprecated `tempfile.mktemp`
# "S402", # Use of `ftplib.FTP` in an insecure manner
# "S403", # Consider possible security implications associated with {module} module
# "S404", # Consider possible security implications associated with subprocess module
# "S405", # Consider possible security implications associated with xml module
# "S406", # Consider possible security implications associated with {module} module
# "S407", # Consider possible security implications associated with xml module
# "S408", # Consider possible security implications associated with xml module
# "S409", # Consider possible security implications associated with {module} module
# "S410", # Consider possible security implications associated with lxml module
# "S411", # Consider possible security implications associated with xmlrpc module
# "S412", # Consider possible security implications associated with httpserver module
# "S413", # Consider possible security implications associated with pycrypto module
# "S501", # Probable use of `{name}` call with verify=False disabling SSL certificate checks
# "S502", # ssl.wrap_socket call with insecure SSL/TLS protocol version
# "S503", # ssl.wrap_socket call without cert checking
# "S504", # ssl.wrap_socket call with missing hostname verification
# "S505", # ssl.wrap_socket call with weak or no cipher suites
# "S506", # Use of yaml.load(). Allows instantiation of arbitrary objects. Consider yaml.safe_load()
# "S507", # Use of `{name}` with default permissions can lead to security vulnerabilities
# "S508", # Use of `snmp-get` with SNMPv1 and SNMPv2 is insecure
# "S601", # paramiko call with policy set to AutoAddPolicy or WarningPolicy
# "S602", # `subprocess` call with `shell=True` identified, security issue
# "S603", # `subprocess` call: check for execution of untrusted input
# "S604", # Function call with `shell=True` parameter identified, security issue
# "S605", # Starting a process with a shell, possible injection attack vector
# "S606", # Starting a process without a shell
# "S607", # Starting a process with a partial executable path
# "S608", # Possible SQL injection vector through string-based query construction
# "S609", # Possible wildcard injection in call due to `*` usage
# "S612", # Log injection possible
# "S701", # Using jinja2 templates with autoescape=False is dangerous
# "S702", # Use of mako templates, which can lead to XSS
# FLAKE8-USE-PATHLIB (PTH) - Use pathlib instead of os.path
# "PTH100", # `os.path.abspath()` should be replaced by `Path.resolve()`
# "PTH101", # `os.chmod()` should be replaced by `Path.chmod()`
# "PTH102", # `os.mkdir()` should be replaced by `Path.mkdir()`
# "PTH103", # `os.makedirs()` should be replaced by `Path.mkdir(parents=True)`
# "PTH104", # `os.rename()` should be replaced by `Path.rename()`
# "PTH105", # `os.replace()` should be replaced by `Path.replace()`
# "PTH106", # `os.rmdir()` should be replaced by `Path.rmdir()`
# "PTH107", # `os.remove()` should be replaced by `Path.unlink()`
# "PTH108", # `os.unlink()` should be replaced by `Path.unlink()`
# "PTH109", # `os.getcwd()` should be replaced by `Path.cwd()`
# "PTH110", # `os.path.exists()` should be replaced by `Path.exists()`
# "PTH111", # `os.path.expanduser()` should be replaced by `Path.expanduser()`
# "PTH112", # `os.path.isdir()` should be replaced by `Path.is_dir()`
# "PTH113", # `os.path.isfile()` should be replaced by `Path.is_file()`
# "PTH114", # `os.path.islink()` should be replaced by `Path.is_symlink()`
# "PTH115", # `os.path.readlink()` should be replaced by `Path.readlink()`
# "PTH116", # `os.stat()` should be replaced by `Path.stat()` or `Path.owner()` or `Path.group()`
# "PTH117", # `os.path.isabs()` should be replaced by `Path.is_absolute()`
# "PTH118", # `os.path.join()` should be replaced by `Path` with `/` operator
# "PTH119", # `os.path.basename()` should be replaced by `Path.name`
# "PTH120", # `os.path.dirname()` should be replaced by `Path.parent`
# "PTH121", # `os.path.samefile()` should be replaced by `Path.samefile()`
# "PTH122", # `os.path.splitext()` should be replaced by `Path.suffix`, `Path.stem`, and `Path.parent`
# "PTH123", # `open()` should be replaced by `Path.open()`
# "PTH124", # `py.path.local` is in maintenance mode, use `pathlib.Path`
# "PTH201", # Use `pathlib.Path.iterdir()` instead of `os.listdir()`
# "PTH202", # Use `pathlib.Path.glob()` instead of `glob.glob()`
# "PTH203", # Use `pathlib.Path.glob()` instead of `glob.iglob()`
# "PTH204", # Use `pathlib.Path.read_text()` instead of `open()` and `.read()`
# "PTH207", # Use `pathlib.Path.glob()` instead of `glob.glob()` with `recursive` flag
# FLAKE8-SIMPLIFY (SIM) - Simplify code patterns
# "SIM101", # Use a dictionary comprehension instead of a for-loop
# "SIM102", # Use a single if-statement instead of nested if-statements
# "SIM103", # Return the condition directly
# "SIM105", # Use `contextlib.suppress(Exception)` instead of try-except-pass
# "SIM106", # `elif` after `raise` statement
# "SIM107", # Don't use `hasattr(x, "__call__")` to test if `x` is callable
# "SIM108", # Use ternary operator instead of if-else-block for simple variable assignments
# "SIM109", # Use a tuple to compare a value against multiple values
# "SIM110", # Use `any()` instead of this for-loop
# "SIM111", # Use `all()` instead of this for-loop
# "SIM112", # Use `str.lower()` and `str.upper()`
# "SIM113", # Use `.enumerate()` for index variable instead of range(len(...))
# "SIM114", # Use `.sort()` instead of `sorted()` when not using the return value
# "SIM115", # Use `.open()` for opening files instead of try-finally
# "SIM116", # Use a dictionary instead of many if-elif statements
# "SIM117", # Use a single with-statement with multiple contexts instead of nested with-statements
# "SIM118", # Use `in` to test membership of an element in a dictionary instead of `keys()`
# "SIM201", # Use `!=` instead of `not ==`
# "SIM208", # Use the `not in` operator instead of `not ... in ...`
# "SIM210", # Use `bool(...)` instead of `True if ... else False`
# "SIM211", # Use `not ...` instead of `False if ... else True`
# "SIM212", # Use `... if ... else ...` instead of `... and ... or ...`
# "SIM220", # Use `False` instead of `a and not a`
# "SIM221", # Use `True` instead of `a or not a`
# "SIM222", # Use `True` instead of `... or True`
# "SIM223", # Use `False` instead of `... and False`
# "SIM300", # Yoda condition detected
# "SIM401", # Use a dictionary comprehension instead of a for-loop
# "SIM910", # Use `dict.get(key, "default")` instead of conditional assignment
# "SIM911", # Use `zip()` instead of `enumerate()` when you only need the values
# RUFF-SPECIFIC (RUF) - Unique Ruff rules
# "RUF001", # String contains ambiguous unicode character
# "RUF002", # Docstring contains ambiguous unicode character
# "RUF003", # Comment contains ambiguous unicode character
# "RUF005", # Consider `{expression}` instead of concatenation
# "RUF006", # Store a reference to the return value of `asyncio.create_task`
# "RUF007", # Prefer `itertools.pairwise()` over `zip()` when iterating over successive pairs
# "RUF008", # Do not use mutable default values for dataclass fields
# "RUF009", # Do not perform function call in dataclass defaults
# "RUF010", # Use explicit conversion flag
# "RUF011", # Ruff-specific rule to avoid a specific anti-pattern
# "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
# "RUF013", # PEP 484 prohibits implicit `Optional`
# "RUF015", # Prefer `next(iter(x))` over single element slice
# "RUF016", # Slice in indexed access to type
# "RUF017", # Avoid quadratic list summation
# "RUF018", # Avoid assignment expressions in `assert` statements
# "RUF019", # Use `contextlib.suppress` instead of try-except-pass
# "RUF020", # `never` type used in non-return annotation
# "RUF021", # Parenthesize `a and b` expressions when chaining `and` and `or` together
# "RUF022", # `__all__` is not sorted
# "RUF023", # `__slots__` is not sorted
# "RUF024", # Use `str.removeprefix()` instead of manual prefix removal
# "RUF025", # Use `str.removesuffix()` instead of manual suffix removal
# "RUF026", # `defaultdict` in `__init__` should be a method
# "RUF027", # Possible f-string without an `f` prefix
# "RUF028", # Invalid formatter suppression comment
# "RUF029", # Function is declared `async`, but doesn't `await` or use `async` features
# "RUF030", # `print` found
# "RUF031", # `logging.exception` does not take an exception
# "RUF100", # Unused `noqa` directive
# "RUF200", # Failed to parse pyproject.toml
# FLAKE8-PYTEST-STYLE (PT) - Pytest best practices
# "PT001", # Use @pytest.fixture() over @pytest.fixture
# "PT002", # Configuration for fixture should be passed as keyword arguments
# "PT003", # `scope='function'` is implied in `@pytest.fixture()`
# "PT004", # Fixture `{}` does not return anything, add leading underscore
# "PT005", # Fixture `{}` returns a value, remove leading underscore
# "PT006", # Wrong name(s) type in `@pytest.mark.parametrize`, expected `{expected}`
# "PT007", # Wrong values type in `@pytest.mark.parametrize` expected `{expected}`
# "PT008", # Use `return` instead of `yield` in `@pytest.fixture` if the fixture does not use the `yield` syntax
# "PT009", # Use a regular `assert` instead of unittest-style `{assertion}`
# "PT010", # `pytest.raises()` is too broad, set the `match` parameter or use a more specific exception
# "PT011", # `pytest.raises({exception})` is too broad, set the `match` parameter or use a more specific exception
# "PT012", # `pytest.raises()` block should contain a single simple statement
# "PT013", # Found incorrect import of pytest, use simple `import pytest` instead
# "PT014", # Found duplicate test cases {indexes} in `@pytest.mark.parametrize`
# "PT015", # Assertion always fails, replace with `pytest.fail()`
# "PT016", # No message passed to `pytest.fail()`
# "PT017", # Found assertion on exception `{name}` in `except` block, use `pytest.raises()` instead
# "PT018", # Assertion should be broken down into multiple parts
# "PT019", # Fixture `{name}` without value is injected as parameter, use `@pytest.mark.usefixtures` instead
# "PT020", # `@pytest.yield_fixture` is deprecated, use `@pytest.fixture`
# "PT021", # Use `yield` instead of `request.addfinalizer`
# "PT022", # No teardown in fixture `{name}`, use `return` instead of `yield`
# "PT023", # Use `@pytest.mark.foo()` over `@pytest.mark.foo`
# "PT024", # `pytest.mark.asyncio` is unnecessary for fixtures
# "PT025", # `pytest.mark.usefixtures` has no effect on fixtures
# "PT026", # Useless `pytest.mark.usefixtures` without parameters
# "PT027", # Use `pytest.raises()` instead of `unittest`-style `{assertion}`
]
# [PACKAGE] Import Organization - Keep imports clean and organized
[tool.ruff.lint.isort]
# [HOME] Our code (PlantGuard modules)
known-first-party = ["plantguard", "src"]
# [NETWORK] External libraries we use (organized by category)
known-third-party = [
# [BRAIN] AI/ML Core
"torch",
"torchvision",
"torchaudio",
"torchmetrics",
# [SUMMARY] Data Science
"numpy",
"pandas",
"sklearn",
# [VISION] Computer Vision
"cv2",
"PIL",
# [HUG] Hugging Face
"transformers",
"datasets",
"accelerate",
"huggingface_hub",
"tokenizers",
"safetensors",
# [SOUND] Audio
"librosa",
"soundfile",
"speech_recognition",
"whisper",
# [NETWORK] Web Interface
"streamlit",
"streamlit_webrtc",
"streamlit_option_menu",