|
1 | 1 | # SPDX-FileCopyrightText: 2026 Helio Chissini de Castro <heliocastro@gmail.com> |
2 | 2 | # SPDX-License-Identifier: MIT |
3 | 3 |
|
4 | | -from datetime import datetime |
5 | 4 |
|
6 | | -from pydantic import BaseModel, ConfigDict, Field |
7 | | - |
8 | | -from ort.models import AdvisorResult |
9 | | -from ort.models.config.advisor_configuration import AdvisorConfiguration |
10 | | -from ort.utils.environment import Environment |
| 5 | +from pydantic import Field |
11 | 6 |
|
| 7 | +from .advisor_result import AdvisorResult |
| 8 | +from .base_run import BaseRun |
| 9 | +from .config.advisor_configuration import AdvisorConfiguration |
12 | 10 | from .identifier import Identifier |
13 | 11 |
|
14 | 12 |
|
15 | | -class AdvisorRun(BaseModel): |
| 13 | +class AdvisorRun(BaseRun): |
16 | 14 | """ |
17 | 15 | Type alias for a function that allows filtering of [AdvisorResult]s. |
18 | 16 |
|
19 | 17 | """ |
20 | 18 |
|
21 | | - model_config = ConfigDict( |
22 | | - extra="forbid", |
23 | | - ) |
24 | | - start_time: datetime = Field( |
25 | | - description="The time the advisor was started.", |
26 | | - ) |
27 | | - end_time: datetime = Field( |
28 | | - description="The time the advisor has finished.", |
29 | | - ) |
30 | | - environment: Environment = Field( |
31 | | - description="The [Environment] in which the advisor was executed.", |
32 | | - ) |
33 | 19 | config: AdvisorConfiguration = Field( |
34 | 20 | description="The [AdvisorConfiguration] used for this run.", |
35 | 21 | ) |
|
0 commit comments