pub struct RepoContext {
pub context_id: String,
pub repo_path: PathBuf,
pub python_path: PathBuf,
pub inventory_hash: String,
pub execution_mode: ExecutionMode,
pub last_collection_time: f64,
/* private fields */
}Expand description
Represents a repository execution context.
Fields§
§context_id: StringUnique context ID
repo_path: PathBufRepository root path
python_path: PathBufPython interpreter path
inventory_hash: StringInventory hash for cache validation
execution_mode: ExecutionModeExecution mode being used
last_collection_time: f64Collection time
Implementations§
Source§impl RepoContext
impl RepoContext
Sourcepub async fn new(
context_id: &str,
repo_path: &Path,
python_path: Option<PathBuf>,
storage: Option<DaemonStorage>,
execution_mode: ExecutionMode,
) -> Result<Self>
pub async fn new( context_id: &str, repo_path: &Path, python_path: Option<PathBuf>, storage: Option<DaemonStorage>, execution_mode: ExecutionMode, ) -> Result<Self>
Create a new context.
§Arguments
context_id- Unique identifier for this contextrepo_path- Path to the repository rootpython_path- Optional path to Python interpreter (auto-detected if None)storage- Optional storage backend for persistenceexecution_mode- Execution mode (Embedded, Subprocess, Pooled, or Auto)
Sourcepub fn collect(&mut self, force: bool) -> Result<(usize, u64)>
pub fn collect(&mut self, force: bool) -> Result<(usize, u64)>
Collect tests using cached inventory or in-process collection.
Sourcepub fn get_node_ids(&self) -> Vec<String>
pub fn get_node_ids(&self) -> Vec<String>
Get all test node IDs.
Sourcepub fn get_inventory(&self) -> Vec<TestNode>
pub fn get_inventory(&self) -> Vec<TestNode>
Get all test nodes.
Sourcepub fn get_test_node(&self, node_id: &str) -> Option<TestNode>
pub fn get_test_node(&self, node_id: &str) -> Option<TestNode>
Get test node by ID.
Sourcepub fn filter_by_keyword(&self, keyword: &str) -> Vec<TestNode>
pub fn filter_by_keyword(&self, keyword: &str) -> Vec<TestNode>
Filter tests by keyword.
Sourcepub fn filter_by_marker(&self, marker: &str) -> Vec<TestNode>
pub fn filter_by_marker(&self, marker: &str) -> Vec<TestNode>
Filter tests by marker.
Sourcepub async fn run_tests(
&mut self,
node_ids: &[String],
workers: Option<u32>,
maxfail: Option<u32>,
) -> Result<RunSummary>
pub async fn run_tests( &mut self, node_ids: &[String], workers: Option<u32>, maxfail: Option<u32>, ) -> Result<RunSummary>
Run tests and return results.
Sourcepub fn get_scheduler_status(&self) -> Value
pub fn get_scheduler_status(&self) -> Value
Get scheduler status.
Sourcepub fn get_flakiness_report(&self) -> Value
pub fn get_flakiness_report(&self) -> Value
Get flakiness report.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RepoContext
impl !RefUnwindSafe for RepoContext
impl Send for RepoContext
impl Sync for RepoContext
impl Unpin for RepoContext
impl !UnwindSafe for RepoContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more