seu-injection-framework 1.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. seu_injection_framework-1.1.7/.github/ISSUE_TEMPLATE/bug_report.yml +134 -0
  2. seu_injection_framework-1.1.7/.github/ISSUE_TEMPLATE/config.yml +17 -0
  3. seu_injection_framework-1.1.7/.github/ISSUE_TEMPLATE/feature_request.yml +145 -0
  4. seu_injection_framework-1.1.7/.github/ISSUE_TEMPLATE/research_question.yml +196 -0
  5. seu_injection_framework-1.1.7/.github/workflows/ci.yml +58 -0
  6. seu_injection_framework-1.1.7/.github/workflows/dependencies.yml +48 -0
  7. seu_injection_framework-1.1.7/.github/workflows/pylint.yml +59 -0
  8. seu_injection_framework-1.1.7/.github/workflows/python-tests.yml +61 -0
  9. seu_injection_framework-1.1.7/.github/workflows/release.yml +81 -0
  10. seu_injection_framework-1.1.7/.gitignore +197 -0
  11. seu_injection_framework-1.1.7/.vscode/settings.json +7 -0
  12. seu_injection_framework-1.1.7/CHANGELOG.md +279 -0
  13. seu_injection_framework-1.1.7/CONTRIBUTING.md +343 -0
  14. seu_injection_framework-1.1.7/LICENSE +21 -0
  15. seu_injection_framework-1.1.7/PKG-INFO +337 -0
  16. seu_injection_framework-1.1.7/README.md +243 -0
  17. seu_injection_framework-1.1.7/cnn_robustness_analysis.png +0 -0
  18. seu_injection_framework-1.1.7/docs/AI_AGENT_GUIDE.md +481 -0
  19. seu_injection_framework-1.1.7/docs/KNOWN_ISSUES.md +40 -0
  20. seu_injection_framework-1.1.7/docs/README.md +41 -0
  21. seu_injection_framework-1.1.7/docs/REPOSITORY_REVIEW_COMPLETE.md +119 -0
  22. seu_injection_framework-1.1.7/docs/archive/DEVELOPMENT_ARCHIVE.md +78 -0
  23. seu_injection_framework-1.1.7/docs/installation.md +448 -0
  24. seu_injection_framework-1.1.7/docs/quickstart.md +485 -0
  25. seu_injection_framework-1.1.7/examples/Example_Attack_Notebook.ipynb +3380 -0
  26. seu_injection_framework-1.1.7/examples/README.md +230 -0
  27. seu_injection_framework-1.1.7/examples/architecture_comparison.png +0 -0
  28. seu_injection_framework-1.1.7/examples/architecture_comparison.py +808 -0
  29. seu_injection_framework-1.1.7/examples/basic_cnn_robustness.py +313 -0
  30. seu_injection_framework-1.1.7/examples/cnn_robustness_analysis.png +0 -0
  31. seu_injection_framework-1.1.7/pyproject.toml +217 -0
  32. seu_injection_framework-1.1.7/run_tests.py +285 -0
  33. seu_injection_framework-1.1.7/src/seu_injection/__init__.py +65 -0
  34. seu_injection_framework-1.1.7/src/seu_injection/bitops/__init__.py +22 -0
  35. seu_injection_framework-1.1.7/src/seu_injection/bitops/float32.py +626 -0
  36. seu_injection_framework-1.1.7/src/seu_injection/core/__init__.py +10 -0
  37. seu_injection_framework-1.1.7/src/seu_injection/core/injector.py +607 -0
  38. seu_injection_framework-1.1.7/src/seu_injection/metrics/__init__.py +18 -0
  39. seu_injection_framework-1.1.7/src/seu_injection/metrics/accuracy.py +574 -0
  40. seu_injection_framework-1.1.7/src/seu_injection/py.typed +0 -0
  41. seu_injection_framework-1.1.7/src/seu_injection/utils/__init__.py +14 -0
  42. seu_injection_framework-1.1.7/src/seu_injection/utils/device.py +112 -0
  43. seu_injection_framework-1.1.7/tests/benchmarks/performance_validation.py +83 -0
  44. seu_injection_framework-1.1.7/tests/benchmarks/standalone_benchmark.py +125 -0
  45. seu_injection_framework-1.1.7/tests/benchmarks/test_performance.py +215 -0
  46. seu_injection_framework-1.1.7/tests/conftest.py +66 -0
  47. seu_injection_framework-1.1.7/tests/fixtures/__init__.py +1 -0
  48. seu_injection_framework-1.1.7/tests/fixtures/example_networks.py +125 -0
  49. seu_injection_framework-1.1.7/tests/integration/test_basic_cnn_robustness_example.py +162 -0
  50. seu_injection_framework-1.1.7/tests/integration/test_basic_cnn_robustness_pipeline.py +171 -0
  51. seu_injection_framework-1.1.7/tests/integration/test_workflows.py +221 -0
  52. seu_injection_framework-1.1.7/tests/smoke/test_basic_cnn_robustness_smoke.py +113 -0
  53. seu_injection_framework-1.1.7/tests/smoke/test_basic_functionality.py +206 -0
  54. seu_injection_framework-1.1.7/tests/test_bitflip.py +129 -0
  55. seu_injection_framework-1.1.7/tests/test_bitflip_coverage.py +257 -0
  56. seu_injection_framework-1.1.7/tests/test_bitflip_optimized.py +350 -0
  57. seu_injection_framework-1.1.7/tests/test_criterion.py +266 -0
  58. seu_injection_framework-1.1.7/tests/test_example_networks.py +80 -0
  59. seu_injection_framework-1.1.7/tests/test_injector.py +483 -0
  60. seu_injection_framework-1.1.7/tests/test_utils.py +89 -0
  61. seu_injection_framework-1.1.7/uv.lock +5374 -0
@@ -0,0 +1,134 @@
1
+ name: Bug Report
2
+ description: Report a bug or unexpected behavior in the SEU Injection Framework
3
+ title: "[BUG] "
4
+ labels: ["bug", "triage"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thank you for reporting a bug! Please provide detailed information to help us reproduce and fix the issue.
10
+
11
+ **Before submitting**: Please check existing issues to avoid duplicates.
12
+
13
+ - type: textarea
14
+ id: description
15
+ attributes:
16
+ label: Bug Description
17
+ description: A clear and concise description of what the bug is.
18
+ placeholder: Describe the unexpected behavior...
19
+ validations:
20
+ required: true
21
+
22
+ - type: textarea
23
+ id: reproduction
24
+ attributes:
25
+ label: Steps to Reproduce
26
+ description: Provide minimal code to reproduce the issue
27
+ placeholder: |
28
+ 1. Import seu_injection
29
+ 2. Create SEUInjector with...
30
+ 3. Run injection with...
31
+ 4. Observe error/unexpected behavior
32
+ render: python
33
+ validations:
34
+ required: true
35
+
36
+ - type: textarea
37
+ id: expected
38
+ attributes:
39
+ label: Expected Behavior
40
+ description: What should happen instead?
41
+ placeholder: Describe what you expected to happen...
42
+ validations:
43
+ required: true
44
+
45
+ - type: textarea
46
+ id: error
47
+ attributes:
48
+ label: Error Message
49
+ description: Include full error traceback if applicable
50
+ placeholder: Paste error message here...
51
+ render: shell
52
+
53
+ - type: dropdown
54
+ id: environment
55
+ attributes:
56
+ label: Environment
57
+ description: What operating system are you using?
58
+ options:
59
+ - Windows
60
+ - macOS
61
+ - Linux (Ubuntu/Debian)
62
+ - Linux (other)
63
+ - Other
64
+ validations:
65
+ required: true
66
+
67
+ - type: input
68
+ id: python-version
69
+ attributes:
70
+ label: Python Version
71
+ description: Output of `python --version`
72
+ placeholder: "3.11.8"
73
+ validations:
74
+ required: true
75
+
76
+ - type: input
77
+ id: framework-version
78
+ attributes:
79
+ label: SEU Injection Framework Version
80
+ description: Output of `pip show seu-injection-framework` or installed version
81
+ placeholder: "1.0.0"
82
+ validations:
83
+ required: true
84
+
85
+ - type: input
86
+ id: torch-version
87
+ attributes:
88
+ label: PyTorch Version
89
+ description: Output of `python -c "import torch; print(torch.__version__)"`
90
+ placeholder: "2.1.0"
91
+
92
+ - type: dropdown
93
+ id: installation
94
+ attributes:
95
+ label: Installation Method
96
+ description: How did you install the framework?
97
+ options:
98
+ - Source install (git clone + uv/pip install -e)
99
+ - Development install (git clone + uv/pip install -e)
100
+ - Other
101
+ validations:
102
+ required: true
103
+
104
+ - type: checkboxes
105
+ id: cuda
106
+ attributes:
107
+ label: CUDA/GPU Information
108
+ description: Check all that apply
109
+ options:
110
+ - label: Issue occurs with GPU/CUDA
111
+ - label: Issue occurs with CPU only
112
+ - label: Issue is related to device handling
113
+
114
+ - type: textarea
115
+ id: additional
116
+ attributes:
117
+ label: Additional Context
118
+ description: Add any other context, screenshots, or relevant information
119
+ placeholder: Any additional information that might help...
120
+
121
+ - type: checkboxes
122
+ id: checklist
123
+ attributes:
124
+ label: Pre-submission Checklist
125
+ description: Please confirm you have completed these steps
126
+ options:
127
+ - label: I have searched existing issues for duplicates
128
+ required: true
129
+ - label: I have provided a minimal reproducible example
130
+ required: true
131
+ - label: I have included all relevant version information
132
+ required: true
133
+ - label: I have tested with the latest version
134
+ required: true
@@ -0,0 +1,17 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: 📚 Documentation
4
+ url: https://github.com/wd7512/seu-injection-framework/blob/main/README.md
5
+ about: Read the documentation and examples
6
+ - name: 🚀 Quick Start Guide
7
+ url: https://github.com/wd7512/seu-injection-framework/blob/main/docs/quickstart.md
8
+ about: Get started with basic usage examples
9
+ - name: 🛠️ Development Setup
10
+ url: https://github.com/wd7512/seu-injection-framework/blob/main/CONTRIBUTING.md
11
+ about: Contributing guidelines and development workflow
12
+ - name: 📊 Research Paper
13
+ url: https://research-information.bris.ac.uk/en/publications/a-framework-for-developing-robust-machine-learning-models-in-hars
14
+ about: Read the research methodology and validation
15
+ - name: ✉️ Direct Contact
16
+ url: mailto:wd7512@bristol.ac.uk
17
+ about: Email for security issues or direct communication
@@ -0,0 +1,145 @@
1
+ name: Feature Request
2
+ description: Suggest a new feature or enhancement for the SEU Injection Framework
3
+ title: "[FEATURE] "
4
+ labels: ["enhancement", "triage"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thank you for suggesting a new feature! Please provide detailed information to help us understand your needs.
10
+
11
+ **Before submitting**: Please check existing issues and discussions for similar requests.
12
+
13
+ - type: textarea
14
+ id: summary
15
+ attributes:
16
+ label: Feature Summary
17
+ description: A clear and concise description of the feature you'd like to see
18
+ placeholder: Brief summary of the proposed feature...
19
+ validations:
20
+ required: true
21
+
22
+ - type: dropdown
23
+ id: category
24
+ attributes:
25
+ label: Feature Category
26
+ description: What type of feature is this?
27
+ options:
28
+ - Core SEU Injection (new injection methods)
29
+ - Performance Optimization
30
+ - API Enhancement
31
+ - Documentation/Examples
32
+ - Testing/Quality Assurance
33
+ - Research Tools
34
+ - Integration (ML frameworks)
35
+ - Other
36
+ validations:
37
+ required: true
38
+
39
+ - type: textarea
40
+ id: problem
41
+ attributes:
42
+ label: Problem Statement
43
+ description: What problem does this feature solve? What use case does it address?
44
+ placeholder: |
45
+ Describe the problem or limitation you're facing...
46
+ - What research scenario requires this feature?
47
+ - What current workarounds are you using?
48
+ - How would this improve your workflow?
49
+ validations:
50
+ required: true
51
+
52
+ - type: textarea
53
+ id: solution
54
+ attributes:
55
+ label: Proposed Solution
56
+ description: Describe your proposed solution in detail
57
+ placeholder: |
58
+ Detailed description of the proposed solution:
59
+ - API design (if applicable)
60
+ - Expected behavior
61
+ - Integration with existing features
62
+ - Performance considerations
63
+
64
+ - type: textarea
65
+ id: api-example
66
+ attributes:
67
+ label: Proposed API (if applicable)
68
+ description: Show how the feature would be used
69
+ placeholder: |
70
+ # Example usage:
71
+ from seu_injection import SEUInjector
72
+
73
+ injector = SEUInjector(model)
74
+ result = injector.new_feature(...)
75
+ render: python
76
+
77
+ - type: dropdown
78
+ id: priority
79
+ attributes:
80
+ label: Priority Level
81
+ description: How important is this feature for your work?
82
+ options:
83
+ - Critical (blocking current research)
84
+ - High (significantly improves workflow)
85
+ - Medium (nice to have improvement)
86
+ - Low (minor enhancement)
87
+
88
+ - type: textarea
89
+ id: research-impact
90
+ attributes:
91
+ label: Research Impact
92
+ description: How would this feature benefit the research community?
93
+ placeholder: |
94
+ - What research questions could this enable?
95
+ - Which domains would benefit (space, nuclear, etc.)?
96
+ - How many researchers might use this feature?
97
+
98
+ - type: textarea
99
+ id: alternatives
100
+ attributes:
101
+ label: Alternatives Considered
102
+ description: What alternatives have you considered?
103
+ placeholder: |
104
+ - Other approaches you've tried
105
+ - Existing tools that partially solve this
106
+ - Workarounds currently in use
107
+
108
+ - type: checkboxes
109
+ id: implementation
110
+ attributes:
111
+ label: Implementation Considerations
112
+ description: Check all that apply
113
+ options:
114
+ - label: This feature requires new dependencies
115
+ - label: This feature affects performance-critical paths
116
+ - label: This feature requires GPU/CUDA support
117
+ - label: This feature needs extensive testing
118
+ - label: This feature affects the public API
119
+ - label: I would be interested in implementing this feature
120
+
121
+ - type: textarea
122
+ id: additional
123
+ attributes:
124
+ label: Additional Context
125
+ description: Add any other context, references, or examples
126
+ placeholder: |
127
+ - Links to relevant papers or methodologies
128
+ - Screenshots or diagrams
129
+ - Related issues or discussions
130
+ - Comparison with other frameworks
131
+
132
+ - type: checkboxes
133
+ id: checklist
134
+ attributes:
135
+ label: Pre-submission Checklist
136
+ description: Please confirm you have completed these steps
137
+ options:
138
+ - label: I have searched existing issues for similar requests
139
+ required: true
140
+ - label: I have provided sufficient detail about the use case
141
+ required: true
142
+ - label: I have considered the impact on existing users
143
+ required: true
144
+ - label: I have thought about backward compatibility
145
+ required: true
@@ -0,0 +1,196 @@
1
+ name: Research Question
2
+ description: Ask questions about SEU injection methodology, framework usage, or research applications
3
+ title: "[RESEARCH] "
4
+ labels: ["research", "question", "discussion"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Welcome to the SEU Injection Framework research community!
10
+
11
+ This template is for research-oriented questions about methodology, best practices,
12
+ experimental design, or framework usage in your research.
13
+
14
+ **For bug reports**: Use the Bug Report template instead
15
+ **For feature requests**: Use the Feature Request template instead
16
+
17
+ - type: dropdown
18
+ id: question-type
19
+ attributes:
20
+ label: Question Category
21
+ description: What type of research question is this?
22
+ options:
23
+ - Methodology (SEU injection strategies)
24
+ - Experimental Design
25
+ - Framework Usage
26
+ - Performance/Optimization
27
+ - Statistical Analysis
28
+ - Model Architecture
29
+ - Research Domain Application
30
+ - Reproducibility
31
+ - Other
32
+ validations:
33
+ required: true
34
+
35
+ - type: textarea
36
+ id: question
37
+ attributes:
38
+ label: Research Question
39
+ description: Ask your question clearly and provide context
40
+ placeholder: |
41
+ State your research question clearly...
42
+
43
+ Include relevant context such as:
44
+ - Your research domain (space, nuclear, automotive, etc.)
45
+ - Model architecture you're working with
46
+ - Specific SEU injection scenario
47
+ - What you're trying to achieve or understand
48
+ validations:
49
+ required: true
50
+
51
+ - type: dropdown
52
+ id: domain
53
+ attributes:
54
+ label: Research Domain
55
+ description: Which application domain is most relevant?
56
+ options:
57
+ - Space/Aerospace
58
+ - Nuclear Systems
59
+ - Automotive/Transportation
60
+ - Defense/Military
61
+ - Industrial Control
62
+ - Medical Devices
63
+ - General Fault Tolerance
64
+ - Academic Research
65
+ - Other
66
+
67
+ - type: dropdown
68
+ id: model-type
69
+ attributes:
70
+ label: Model Architecture
71
+ description: What type of neural network are you studying?
72
+ options:
73
+ - Convolutional Neural Network (CNN)
74
+ - Fully Connected/Dense Network
75
+ - Recurrent Neural Network (RNN/LSTM)
76
+ - Transformer
77
+ - ResNet/EfficientNet
78
+ - Custom Architecture
79
+ - Multiple Architectures
80
+ - Not Applicable
81
+
82
+ - type: textarea
83
+ id: context
84
+ attributes:
85
+ label: Research Context
86
+ description: Provide background and what you've tried so far
87
+ placeholder: |
88
+ Help us understand your research context:
89
+
90
+ - What is your research goal or hypothesis?
91
+ - What have you tried already?
92
+ - What specific challenges are you facing?
93
+ - Are there specific papers or methodologies you're following?
94
+
95
+ - type: textarea
96
+ id: code-example
97
+ attributes:
98
+ label: Code Example (if applicable)
99
+ description: Share relevant code or experimental setup
100
+ placeholder: |
101
+ # Share your current approach or what you're trying to implement
102
+ from seu_injection import SEUInjector
103
+
104
+ # Your experimental setup...
105
+ render: python
106
+
107
+ - type: textarea
108
+ id: specific-help
109
+ attributes:
110
+ label: Specific Help Needed
111
+ description: What specific guidance or information would be most helpful?
112
+ placeholder: |
113
+ Be specific about what would help you most:
114
+ - Methodological guidance
115
+ - Code examples
116
+ - Literature references
117
+ - Experimental design suggestions
118
+ - Statistical analysis approaches
119
+
120
+ - type: checkboxes
121
+ id: areas
122
+ attributes:
123
+ label: Related Areas
124
+ description: Check all relevant areas for your research
125
+ options:
126
+ - label: Single Event Upset (SEU) physics
127
+ - label: Radiation effects in electronics
128
+ - label: Neural network robustness
129
+ - label: Fault injection methodologies
130
+ - label: Statistical significance testing
131
+ - label: Performance optimization
132
+ - label: Model comparison studies
133
+ - label: Reproducible research practices
134
+
135
+ - type: textarea
136
+ id: references
137
+ attributes:
138
+ label: Relevant References
139
+ description: Share any papers, resources, or related work
140
+ placeholder: |
141
+ Include any relevant:
142
+ - Research papers you're following
143
+ - Methodologies you're implementing
144
+ - Related frameworks or tools
145
+ - Existing studies in your domain
146
+
147
+ - type: dropdown
148
+ id: urgency
149
+ attributes:
150
+ label: Timeline
151
+ description: What's your timeline for this research?
152
+ options:
153
+ - Immediate (within days)
154
+ - Short-term (within weeks)
155
+ - Medium-term (within months)
156
+ - Long-term (exploratory)
157
+ - No specific timeline
158
+
159
+ - type: textarea
160
+ id: contribution
161
+ attributes:
162
+ label: Potential Contribution
163
+ description: How might your research contribute back to the community?
164
+ placeholder: |
165
+ Consider sharing:
166
+ - Novel methodologies or findings
167
+ - Benchmark results in new domains
168
+ - Validation studies
169
+ - Performance optimizations
170
+ - Documentation improvements
171
+
172
+ - type: checkboxes
173
+ id: collaboration
174
+ attributes:
175
+ label: Collaboration Interest
176
+ description: Are you interested in collaboration opportunities?
177
+ options:
178
+ - label: I'm interested in collaborating with other researchers
179
+ - label: I'm open to co-authoring publications
180
+ - label: I would like to contribute results back to the framework
181
+ - label: I'm interested in reviewing related research
182
+
183
+ - type: checkboxes
184
+ id: checklist
185
+ attributes:
186
+ label: Pre-submission Checklist
187
+ description: Please confirm you have completed these steps
188
+ options:
189
+ - label: I have searched existing issues and discussions
190
+ required: true
191
+ - label: This is a research question (not a bug report or feature request)
192
+ required: true
193
+ - label: I have provided sufficient context about my research
194
+ required: true
195
+ - label: I am open to community discussion and feedback
196
+ required: true
@@ -0,0 +1,58 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ test:
11
+ name: Tests (Python ${{ matrix.python-version }})
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v3
25
+ with:
26
+ version: latest
27
+ - name: Sync dependencies (dev extra)
28
+ run: uv sync --extra dev --frozen
29
+ - name: Run tests with coverage
30
+ run: uv run pytest tests/ -v --cov=src/seu_injection --cov-report=term --cov-fail-under=50
31
+ - name: Upload coverage HTML (only latest Python)
32
+ if: matrix.python-version == '3.11'
33
+ uses: actions/upload-artifact@v4
34
+ with:
35
+ name: coverage-html
36
+ path: htmlcov
37
+
38
+ lint:
39
+ name: Lint & Type Check
40
+ runs-on: ubuntu-latest
41
+ steps:
42
+ - uses: actions/checkout@v4
43
+ - name: Set up Python
44
+ uses: actions/setup-python@v5
45
+ with:
46
+ python-version: '3.11'
47
+ - name: Install uv
48
+ uses: astral-sh/setup-uv@v3
49
+ with:
50
+ version: latest
51
+ - name: Sync dev dependencies
52
+ run: uv sync --extra dev --frozen
53
+ - name: Ruff lint
54
+ run: uv run ruff check src tests
55
+ - name: Mypy (loose)
56
+ run: uv run mypy src/seu_injection --ignore-missing-imports
57
+ - name: Security scan (bandit)
58
+ run: uv run bandit -r src/seu_injection -ll -q || echo "Bandit issues found (non-blocking)"
@@ -0,0 +1,48 @@
1
+ name: Update Dependencies
2
+
3
+ on:
4
+ schedule:
5
+ # Run weekly on Sundays at 6 AM UTC
6
+ - cron: '0 6 * * 0'
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ update-deps:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v4
15
+ with:
16
+ token: ${{ secrets.GITHUB_TOKEN }}
17
+
18
+ - name: Install UV
19
+ uses: astral-sh/setup-uv@v3
20
+
21
+ - name: Set up Python 3.11
22
+ run: uv python install 3.11
23
+
24
+ - name: Update dependencies
25
+ run: |
26
+ uv lock --upgrade
27
+ uv sync --all-extras
28
+
29
+ - name: Run tests to verify updates
30
+ run: |
31
+ uv run python run_tests.py smoke
32
+ uv run python run_tests.py unit
33
+
34
+ - name: Create Pull Request
35
+ uses: peter-evans/create-pull-request@v5
36
+ with:
37
+ token: ${{ secrets.GITHUB_TOKEN }}
38
+ commit-message: "chore: update dependencies"
39
+ title: "Automated dependency update"
40
+ body: |
41
+ This is an automated pull request to update project dependencies.
42
+
43
+ Please review the changes and run the full test suite before merging.
44
+
45
+ - Dependencies updated via `uv lock --upgrade`
46
+ - Smoke and unit tests passed
47
+ branch: deps/auto-update
48
+ delete-branch: true
@@ -0,0 +1,59 @@
1
+ name: Code Quality
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, ai_refactor ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Install UV
17
+ uses: astral-sh/setup-uv@v3
18
+
19
+ - name: Set up Python 3.11
20
+ run: uv python install 3.11
21
+
22
+ - name: Install dependencies
23
+ run: uv sync --all-extras
24
+
25
+ - name: Run ruff linter
26
+ run: uv run ruff check src/ tests/ --output-format=github
27
+
28
+ - name: Run ruff formatter check
29
+ run: uv run ruff format src/ tests/ --check
30
+
31
+ - name: Run mypy type checking
32
+ run: uv run mypy src/seu_injection --ignore-missing-imports --no-strict-optional
33
+ continue-on-error: true
34
+
35
+ security:
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - name: Checkout code
39
+ uses: actions/checkout@v4
40
+
41
+ - name: Install UV
42
+ uses: astral-sh/setup-uv@v3
43
+
44
+ - name: Set up Python 3.11
45
+ run: uv python install 3.11
46
+
47
+ - name: Install dependencies
48
+ run: uv sync --all-extras
49
+
50
+ - name: Run bandit security linter
51
+ run: uv run bandit -r src/ -f json -o bandit-report.json
52
+ continue-on-error: true
53
+
54
+ - name: Upload security report
55
+ uses: actions/upload-artifact@v4
56
+ if: always()
57
+ with:
58
+ name: security-report
59
+ path: bandit-report.json