• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

geo-engine / geoengine / 6224433969

18 Sep 2023 03:07PM UTC coverage: 89.873% (-0.01%) from 89.887%
6224433969

push

github

web-flow
Merge pull request #846 from geo-engine/ml_training

Ml training

2102 of 2102 new or added lines in 22 files covered. (100.0%)

109530 of 121872 relevant lines covered (89.87%)

59591.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/operators/src/pro/engine/execution_context.rs
1
use crate::engine::{
2
    CreateSpan, ExecutionContext, ExecutionContextExtensions, InitializedPlotOperator,
3
    InitializedRasterOperator, InitializedVectorOperator, MetaData, MetaDataProvider,
4
    MockExecutionContext, ResultDescriptor, WorkflowOperatorPath,
5
};
6
use crate::pro::meta::wrapper::InitializedOperatorWrapper;
7
use crate::util::Result;
8
use async_trait::async_trait;
9
use geoengine_datatypes::dataset::{DataId, NamedData};
10
use geoengine_datatypes::raster::TilingSpecification;
11
use geoengine_datatypes::util::test::TestDefault;
12
use rayon::ThreadPool;
13
use std::sync::Arc;
14

15
/// A mock execution context that wraps all operators with a statistics operator.
16
pub struct StatisticsWrappingMockExecutionContext {
17
    pub inner: MockExecutionContext,
18
}
19

20
impl TestDefault for StatisticsWrappingMockExecutionContext {
21
    fn test_default() -> Self {
×
22
        Self {
×
23
            inner: MockExecutionContext::test_default(),
×
24
        }
×
25
    }
×
26
}
27

28
#[async_trait::async_trait]
29
impl ExecutionContext for StatisticsWrappingMockExecutionContext {
30
    fn thread_pool(&self) -> &Arc<ThreadPool> {
×
31
        &self.inner.thread_pool
×
32
    }
×
33

34
    fn tiling_specification(&self) -> TilingSpecification {
×
35
        self.inner.tiling_specification
×
36
    }
×
37

38
    fn wrap_initialized_raster_operator(
×
39
        &self,
×
40
        op: Box<dyn InitializedRasterOperator>,
×
41
        span: CreateSpan,
×
42
        path: WorkflowOperatorPath,
×
43
    ) -> Box<dyn InitializedRasterOperator> {
×
44
        InitializedOperatorWrapper::new(op, span, path).boxed()
×
45
    }
×
46

47
    fn wrap_initialized_vector_operator(
×
48
        &self,
×
49
        op: Box<dyn InitializedVectorOperator>,
×
50
        span: CreateSpan,
×
51
        path: WorkflowOperatorPath,
×
52
    ) -> Box<dyn InitializedVectorOperator> {
×
53
        InitializedOperatorWrapper::new(op, span, path).boxed()
×
54
    }
×
55

56
    fn wrap_initialized_plot_operator(
×
57
        &self,
×
58
        op: Box<dyn InitializedPlotOperator>,
×
59
        _span: CreateSpan,
×
60
        _path: WorkflowOperatorPath,
×
61
    ) -> Box<dyn InitializedPlotOperator> {
×
62
        op
×
63
    }
×
64

65
    async fn resolve_named_data(&self, data: &NamedData) -> Result<DataId> {
×
66
        self.inner.resolve_named_data(data).await
×
67
    }
×
68

69
    fn extensions(&self) -> &ExecutionContextExtensions {
×
70
        self.inner.extensions()
×
71
    }
×
72
}
73

74
#[async_trait]
75
impl<L, R, Q> MetaDataProvider<L, R, Q> for StatisticsWrappingMockExecutionContext
76
where
77
    L: 'static,
78
    R: 'static + ResultDescriptor,
79
    Q: 'static,
80
{
81
    async fn meta_data(&self, id: &DataId) -> Result<Box<dyn MetaData<L, R, Q>>> {
×
82
        self.inner.meta_data(id).await
×
83
    }
×
84
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc