Artifacts
provide.testkit.quality.artifacts
¶
Artifact management for quality analysis results.
Classes¶
ArtifactManager
¶
Manages artifacts generated during quality analysis.
Provides centralized artifact management with organization, cleanup, and metadata tracking capabilities.
Initialize artifact manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_dir
|
Path | str
|
Base directory for all artifacts |
'.quality-artifacts'
|
Source code in provide/testkit/quality/artifacts.py
Functions¶
cleanup_old_artifacts
¶
Clean up old artifact directories.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tool
|
str | None
|
Specific tool to clean up (None for all tools) |
None
|
keep_count
|
int
|
Number of recent directories to keep |
5
|
Source code in provide/testkit/quality/artifacts.py
create_session_dir
¶
create_summary_report
¶
Create a summary report across all tools.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
dict[str, QualityResult]
|
Results from multiple tools |
required |
Returns:
| Type | Description |
|---|---|
Path
|
Path to summary report |
Source code in provide/testkit/quality/artifacts.py
create_timestamped_dir
¶
Create a timestamped directory for a tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tool
|
str
|
Tool name |
required |
Returns:
| Type | Description |
|---|---|
Path
|
Path to tool's timestamped directory |
Source code in provide/testkit/quality/artifacts.py
export_artifacts
¶
Export all artifacts to a specified location.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
export_path
|
Path | str
|
Path to export to |
required |
compress
|
bool
|
Whether to create a compressed archive |
True
|
Returns:
| Type | Description |
|---|---|
Path
|
Path to exported artifacts |
Source code in provide/testkit/quality/artifacts.py
generate_index
¶
Generate an index of all artifacts.
Returns:
| Type | Description |
|---|---|
Path
|
Path to generated index file |
Source code in provide/testkit/quality/artifacts.py
get_disk_usage
¶
Get disk usage statistics for artifacts.
Returns:
| Type | Description |
|---|---|
dict[str, int]
|
Dictionary with disk usage information |
Source code in provide/testkit/quality/artifacts.py
get_latest_dir
¶
Get the latest artifact directory for a tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tool
|
str
|
Tool name |
required |
Returns:
| Type | Description |
|---|---|
Path | None
|
Path to latest directory or None if none exist |
Source code in provide/testkit/quality/artifacts.py
organize_artifacts
¶
Organize artifacts from a quality result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
QualityResult
|
Quality result with artifacts |
required |
target_dir
|
Path
|
Target directory for organized artifacts |
required |