repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/utils/tests/test_periodic_execution_yielder.py | osprey_worker/src/osprey/engine/utils/tests/test_periodic_execution_yielder.py | import time
from osprey.engine.utils.periodic_execution_yielder import PeriodicExecutionYielder
# possibly need to mock out sleep calls if we run into unit test issues
def test_periodic_yield() -> None:
execution_time_sec = 0.001
yield_time_sec = 0.002
execution_yielder = PeriodicExecutionYielder(executi... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/verdicts.py | osprey_worker/src/osprey/engine/language_types/verdicts.py | from dataclasses import dataclass
from typing import List, Self, cast
from osprey.engine.executor.custom_extracted_features import CustomExtractedFeature
from osprey.engine.language_types.effects import EffectToCustomExtractedFeatureBase
from osprey.engine.shared_constants import VERDICT_DIMENSION_NAME
from .rules im... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/osprey_invariant_generic.py | osprey_worker/src/osprey/engine/language_types/osprey_invariant_generic.py | from typing import Any, Generic, Tuple, TypeVar, Union
_T = TypeVar('_T')
class OspreyInvariantGeneric(Generic[_T]):
"""A special Generic that is allowed within Osprey Rules.
This generic has a single inner type and that type is invariant, meaning it has to be exactly the same on two
variants of this cl... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/labels.py | osprey_worker/src/osprey/engine/language_types/labels.py | from dataclasses import dataclass
from datetime import timedelta
from typing import Any, List, Optional, Self, cast
from osprey.engine.executor.custom_extracted_features import CustomExtractedFeature
from osprey.engine.language_types.effects import EffectToCustomExtractedFeatureBase
from osprey.engine.shared_constants... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/entities.py | osprey_worker/src/osprey/engine/language_types/entities.py | from dataclasses import dataclass
from typing import Any, Tuple, Type, TypeVar, Union
import typing_inspect
from osprey.engine.language_types.osprey_invariant_generic import OspreyInvariantGeneric
from .post_execution_convertible import _U, PostExecutionConvertible
_T = TypeVar('_T')
@dataclass(frozen=True, order=... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/experiments.py | osprey_worker/src/osprey/engine/language_types/experiments.py | from dataclasses import dataclass
from typing import Any, List
from osprey.engine.utils.types import add_slots
from .entities import EntityT
from .post_execution_convertible import PostExecutionConvertible
# TODO allow use of tuples as post execution convertibles
# Osprey UI doesn't recognize tuples. We will use a l... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/rules.py | osprey_worker/src/osprey/engine/language_types/rules.py | from dataclasses import dataclass
from typing import Dict
from osprey.engine.utils.types import add_slots
from .post_execution_convertible import PostExecutionConvertible
@add_slots
@dataclass(frozen=True)
class RuleT(PostExecutionConvertible[bool]):
name: str
value: bool
description: str
features: ... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/effects.py | osprey_worker/src/osprey/engine/language_types/effects.py | from abc import abstractmethod
from dataclasses import dataclass, field
from typing import Generic, Iterable, List, Self
from osprey.engine.executor.custom_extracted_features import (
CustomExtractedFeature,
SerializableT,
)
from osprey.engine.language_types.rules import RuleT
@dataclass(kw_only=True)
class ... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/__init__.py | osprey_worker/src/osprey/engine/language_types/__init__.py | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false | |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/time_delta.py | osprey_worker/src/osprey/engine/language_types/time_delta.py | import datetime
from dataclasses import dataclass
from typing import Optional
from osprey.engine.utils.types import add_slots
from .post_execution_convertible import PostExecutionConvertible
@add_slots
@dataclass
class TimeDeltaT(PostExecutionConvertible[float]):
timedelta: datetime.timedelta
def to_post_e... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/post_execution_convertible.py | osprey_worker/src/osprey/engine/language_types/post_execution_convertible.py | import abc
from typing import Generic, Optional, Type, TypeVar
import typing_inspect
_T = TypeVar('_T')
_U = TypeVar('_U')
class PostExecutionConvertible(abc.ABC, Generic[_T]):
"""A mixin that indicates that the value should be converted to a different value if it ends up as a feature."""
__slots__ = ()
... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/tests/test_entities.py | osprey_worker/src/osprey/engine/language_types/tests/test_entities.py | import pytest
from osprey.engine.language_types.entities import EntityT
def test_allowed_types() -> None:
EntityT[str]
EntityT[int]
EntityT('MyType', 'hello')
EntityT('MyType', 1234)
with pytest.raises(TypeError):
EntityT[bool]
with pytest.raises(TypeError):
EntityT[float]
... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/tests/test_osprey_invariant_generic.py | osprey_worker/src/osprey/engine/language_types/tests/test_osprey_invariant_generic.py | from typing import Any, Mapping, Sequence, TypeVar
import pytest
from osprey.engine.language_types.osprey_invariant_generic import OspreyInvariantGeneric
@pytest.mark.parametrize(
'args, kwargs',
(
# Bound
((), {'bound': object}),
# Constraints
((int, float), {}),
# No... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/language_types/tests/__init__.py | osprey_worker/src/osprey/engine/language_types/tests/__init__.py | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false | |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/ast_validator.py | osprey_worker/src/osprey/engine/query_language/ast_validator.py | from typing import TYPE_CHECKING
from osprey.engine.ast import grammar
from osprey.engine.ast.ast_utils import filter_nodes, iter_nodes
from osprey.engine.ast.error_utils import SpanWithHint
from osprey.engine.ast.grammar import BinaryComparison, BooleanOperation, Call, Not, UnaryOperation
from osprey.engine.ast_valid... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/__init__.py | osprey_worker/src/osprey/engine/query_language/__init__.py | from osprey.engine.ast.sources import SOURCE_ENTRY_POINT_PATH, Sources
from osprey.engine.ast_validator.validation_context import ValidatedSources, ValidationContext, ValidationFailed
from osprey.engine.ast_validator.validators.unique_stored_names import UniqueStoredNames
from osprey.engine.ast_validator.validators.val... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/ast_druid_translator.py | osprey_worker/src/osprey/engine/query_language/ast_druid_translator.py | from typing import Any, Dict
from osprey.engine.ast import grammar
from osprey.engine.ast_validator.validation_context import ValidatedSources
from osprey.engine.ast_validator.validators.validate_call_kwargs import ValidateCallKwargs
from osprey.engine.udf.base import QueryUdfBase
from osprey.engine.utils.osprey_unary... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/tests/test_did_mutate_label.py | osprey_worker/src/osprey/engine/query_language/tests/test_did_mutate_label.py | import json
from typing import Any, Callable, Dict, List
import pytest
from osprey.engine.ast_validator.validators.unique_stored_names import UniqueStoredNames
from osprey.engine.ast_validator.validators.validate_call_kwargs import ValidateCallKwargs
from osprey.engine.conftest import RunValidationFunction
from osprey... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/tests/conftest.py | osprey_worker/src/osprey/engine/query_language/tests/conftest.py | from typing import Sequence, Tuple, Union
import pytest
from osprey.engine.ast_validator.validation_context import ValidatedSources
from osprey.engine.ast_validator.validators.imports_must_not_have_cycles import ImportsMustNotHaveCycles
from osprey.engine.ast_validator.validators.unique_stored_names import UniqueStore... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/tests/test_regex_match.py | osprey_worker/src/osprey/engine/query_language/tests/test_regex_match.py | from typing import Any, Callable, List
import pytest
from osprey.engine.ast_validator.validators.unique_stored_names import UniqueStoredNames
from osprey.engine.ast_validator.validators.validate_call_kwargs import ValidateCallKwargs
from osprey.engine.ast_validator.validators.validate_dynamic_calls_have_annotated_rval... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/tests/test_ast_druid_translator.py | osprey_worker/src/osprey/engine/query_language/tests/test_ast_druid_translator.py | import json
import pytest
from osprey.engine.ast_validator.validators.imports_must_not_have_cycles import ImportsMustNotHaveCycles
from osprey.engine.ast_validator.validators.unique_stored_names import UniqueStoredNames
from osprey.engine.ast_validator.validators.validate_call_kwargs import ValidateCallKwargs
from osp... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/tests/__init__.py | osprey_worker/src/osprey/engine/query_language/tests/__init__.py | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false | |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/tests/test_parse_query_to_validated_ast.py | osprey_worker/src/osprey/engine/query_language/tests/test_parse_query_to_validated_ast.py | from typing import Any, Callable, List
import pytest
from osprey.engine.ast_validator.validators.imports_must_not_have_cycles import ImportsMustNotHaveCycles
from osprey.engine.ast_validator.validators.unique_stored_names import UniqueStoredNames
from osprey.engine.ast_validator.validators.validate_call_kwargs import ... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/udfs/did_mutate_label.py | osprey_worker/src/osprey/engine/query_language/udfs/did_mutate_label.py | from typing import Dict
from osprey.engine import shared_constants
from osprey.engine.ast_validator.validation_context import ValidationContext
from osprey.engine.language_types.labels import LabelStatus
from osprey.engine.query_language.udfs.registry import register
from osprey.engine.udf.arguments import ArgumentsBa... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/udfs/regex_match.py | osprey_worker/src/osprey/engine/query_language/udfs/regex_match.py | import re
from typing import Dict
from osprey.engine.ast import grammar
from osprey.engine.ast_validator.validation_context import ValidationContext
from osprey.engine.query_language.udfs.registry import register
from osprey.engine.udf.arguments import ArgumentsBase, ConstExpr
from osprey.engine.udf.base import QueryU... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/udfs/registry.py | osprey_worker/src/osprey/engine/query_language/udfs/registry.py | from osprey.engine.udf.registry import UDFRegistry
UDF_REGISTRY = UDFRegistry()
register = UDF_REGISTRY.register
| python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/udfs/did_declare_verdict.py | osprey_worker/src/osprey/engine/query_language/udfs/did_declare_verdict.py | from typing import Dict
from osprey.engine import shared_constants
from osprey.engine.ast_validator.validation_context import ValidationContext
from osprey.engine.query_language.udfs.registry import register
from osprey.engine.udf.arguments import ArgumentsBase, ConstExpr
from osprey.engine.udf.base import QueryUdfBas... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/query_language/udfs/__init__.py | osprey_worker/src/osprey/engine/query_language/udfs/__init__.py | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false | |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor_registry.py | osprey_worker/src/osprey/engine/executor/node_executor_registry.py | from typing import TYPE_CHECKING, Any, ClassVar, Dict, Optional, Type
from osprey.engine.ast.grammar import ASTNode
if TYPE_CHECKING:
from osprey.engine.ast_validator.validation_context import ValidatedSources
from .node_executor._base_node_executor import BaseNodeExecutor
class NodeExecutorRegistry:
"... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/dependency_chain.py | osprey_worker/src/osprey/engine/executor/dependency_chain.py | from dataclasses import dataclass
from typing import TYPE_CHECKING, Tuple
from osprey.engine.utils.types import add_slots
if TYPE_CHECKING:
from osprey.engine.ast.grammar import ASTNode
from .node_executor._base_node_executor import BaseNodeExecutor
@add_slots
@dataclass(frozen=True)
class DependencyChain:... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/executor.py | osprey_worker/src/osprey/engine/executor/executor.py | from collections import defaultdict
from typing import Any, Dict, List, Optional, Sequence, Tuple
import gevent
import gevent.pool
from ddtrace import tracer
from ddtrace.span import Span as TracerSpan
from osprey.engine.ast.grammar import ASTNode
from osprey.engine.executor.custom_extracted_features import (
Acti... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/external_service_utils.py | osprey_worker/src/osprey/engine/executor/external_service_utils.py | from abc import ABC, abstractmethod
from datetime import datetime, timedelta
from typing import Dict, Generic, Hashable, Optional, Sequence, Tuple, TypeVar, cast
from gevent.event import AsyncResult
from result import Err, Ok, Result
KeyT = TypeVar('KeyT', bound=Hashable)
ValueT = TypeVar('ValueT')
class ExternalSe... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/topological_sorter.py | osprey_worker/src/osprey/engine/executor/topological_sorter.py | """
Copy of graphlib python library with some changes to let us modify the graph after
calling `prepare()`. This semantic change is necessary because the execution of certain
Osprey nodes (e.g. Import and Require) cause new nodes to get added to the ExecutionContext
after execution has already started.
List of notable... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/execution_context.py | osprey_worker/src/osprey/engine/executor/execution_context.py | import json
import logging
import traceback
from collections import defaultdict
from dataclasses import dataclass, field
from datetime import datetime
from typing import (
TYPE_CHECKING,
Any,
DefaultDict,
Dict,
Iterable,
List,
Mapping,
Sequence,
Set,
Type,
TypeAlias,
Type... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/graph_data.py | osprey_worker/src/osprey/engine/executor/graph_data.py | import copy
from enum import StrEnum
from typing import Any, Dict, List, Optional, Set, Tuple
from typing_extensions import TypedDict
class NodeType(StrEnum):
UNASSIGNED = 'Unassigned'
FILE = 'File'
RULE = 'Rule'
LABEL = 'Label'
LIST = 'List'
LITERAL = 'Literal'
NUMBER = 'Number'
BOOL... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/execution_visualizer.py | osprey_worker/src/osprey/engine/executor/execution_visualizer.py | import copy
import enum
import pathlib
import tempfile
from typing import Any, Dict, Optional, Set, Type, Union
from graphviz import Digraph
from osprey.engine.ast.grammar import (
Assign,
ASTNode,
BinaryComparison,
BinaryOperation,
Boolean,
BooleanOperation,
Call,
FormatString,
Lit... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/__init__.py | osprey_worker/src/osprey/engine/executor/__init__.py | from osprey.engine.utils.imports import import_all_direct_children
from . import node_executor
import_all_direct_children(node_executor)
| python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/udf_execution_helpers.py | osprey_worker/src/osprey/engine/executor/udf_execution_helpers.py | from __future__ import annotations
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Any, Dict, Generic, Hashable, Type, TypeVar, cast
from osprey.engine.executor.external_service_utils import (
ExternalService,
ExternalServiceAccessor,
)
if TYPE_CHECKING:
from osprey.engine.executor.... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/custom_extracted_features.py | osprey_worker/src/osprey/engine/executor/custom_extracted_features.py | from abc import ABC, abstractmethod
from dataclasses import dataclass
from datetime import datetime
from typing import Any, Dict, Generic, List, TypeVar, Union
SerializableT = TypeVar(
'SerializableT', bound=Union[str, int, float, bool, None, List[Any], Dict[str, Any]], covariant=True
)
class CustomExtractedFeat... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/execution_graph.py | osprey_worker/src/osprey/engine/executor/execution_graph.py | from typing import TYPE_CHECKING, Any, Dict, Hashable, Iterator, List, Optional, Sequence, Set, TypeVar
from osprey.engine.ast.grammar import Assign, ASTNode, Load, Name, Source, Statement
from osprey.engine.utils.periodic_execution_yielder import maybe_periodic_yield
from .dependency_chain import DependencyChain
if... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/tests/test_executor.py | osprey_worker/src/osprey/engine/executor/tests/test_executor.py | import abc
import json
from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Sequence, Type
import gevent
import gevent.event
import gevent.pool
import pytest
from osprey.engine.ast_validator.validation_context import ValidationContext
from osprey.engine.conftest import ExecuteFunction, Execu... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/tests/test_custom_extracted_features.py | osprey_worker/src/osprey/engine/executor/tests/test_custom_extracted_features.py | import datetime
from collections import defaultdict
from dataclasses import dataclass
from typing import Any, List, Self, Sequence, Tuple
from unittest.mock import Mock, patch
from osprey.engine.executor.custom_extracted_features import (
ActionIdExtractedFeature,
CustomExtractedFeature,
ErrorCountExtracte... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/tests/test_binary_comparison.py | osprey_worker/src/osprey/engine/executor/tests/test_binary_comparison.py | import pytest
from osprey.engine.conftest import ExecuteFunction
@pytest.mark.parametrize(
'statement, expected',
[
('Foo == "hello"', True),
('"hello" == Foo', True),
('"world" == Foo', False),
('Foo == "world"', False),
('Foo == Bar', False),
('Bar == Foo', Fa... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/tests/test_literals.py | osprey_worker/src/osprey/engine/executor/tests/test_literals.py | from typing import Any
import pytest
from osprey.engine.conftest import CheckFailureFunction, ExecuteFunction, RunValidationFunction
def test_num_literal(execute: ExecuteFunction) -> None:
data = execute(
"""
One: ExtractLiteral[int] = 1
"""
)
assert data == {'One': 1}
def test... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/tests/test_udf_execution_helpers.py | osprey_worker/src/osprey/engine/executor/tests/test_udf_execution_helpers.py | from typing import List
import pytest
from osprey.engine.conftest import ExecuteFunction
from osprey.engine.executor.execution_context import ExecutionContext
from osprey.engine.executor.external_service_utils import ExternalService
from osprey.engine.executor.udf_execution_helpers import HasHelper, UDFHelpers
from os... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/tests/conftest.py | osprey_worker/src/osprey/engine/executor/tests/conftest.py | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false | |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/tests/test_binary_operation.py | osprey_worker/src/osprey/engine/executor/tests/test_binary_operation.py | import pytest
from osprey.engine.conftest import ExecuteFunction
@pytest.mark.parametrize(
'expr, result',
[
('1 + 2', 1 + 2),
('1 - 2', 1 - 2),
('1 * 2', 1 * 2),
('1 / 2.0', 1 / 2.0),
('1 / 2', 1 / 2),
('1 // 2.0', 1 // 2.0),
('1 % 2', 1 % 2),
(... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/tests/test_unary_operation.py | osprey_worker/src/osprey/engine/executor/tests/test_unary_operation.py | import pytest
from osprey.engine.conftest import ExecuteFunction
@pytest.mark.parametrize(
'expr, result',
[
('not True', False),
('not False', True),
('not 1 == 2', True),
('not not True', True),
('not not not True', False),
('-2', -2),
('-2.1', -2.1),
... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/tests/__init__.py | osprey_worker/src/osprey/engine/executor/tests/__init__.py | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false | |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/tests/test_call.py | osprey_worker/src/osprey/engine/executor/tests/test_call.py | from typing import Any
import pytest
from osprey.engine.conftest import ExecuteFunction, ExecuteWithResultFunction
from osprey.engine.executor.execution_context import ExecutionContext
from osprey.engine.udf.arguments import ArgumentsBase
from osprey.engine.udf.base import InvalidDynamicReturnType, UDFBase
from osprey... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/tests/test_graph_data.py | osprey_worker/src/osprey/engine/executor/tests/test_graph_data.py | from datetime import datetime
from osprey.engine.executor.graph_data import GraphData, Node, NodeType
def create_node(data: GraphData) -> Node:
unique_suffix = datetime.now()
return data.create_node('Test name', NodeType.STRING, 'main.sml', f'This is the string! {unique_suffix}')
def test_node_creation() -... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/tests/test_render_graph.py | osprey_worker/src/osprey/engine/executor/tests/test_render_graph.py | import copy
import json
from typing import Any, Dict, Set
import pytest
from osprey.engine.ast_validator.validation_context import ValidatedSources
from osprey.engine.ast_validator.validators.unique_stored_names import UniqueStoredNames
from osprey.engine.ast_validator.validators.validate_call_kwargs import ValidateCa... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/_base_node_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/_base_node_executor.py | from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, ClassVar, Generic, Sequence, Type, TypeVar
from ddtrace.span import Span
from osprey.engine.ast.grammar import ASTNode
if TYPE_CHECKING:
from osprey.engine.ast_validator.validation_context import ValidatedSources
from ..execution_context i... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/binary_comparison_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/binary_comparison_executor.py | import operator
from typing import TYPE_CHECKING, Callable, List
from osprey.engine.ast.grammar import (
ASTNode,
BinaryComparison,
Equals,
GreaterThan,
GreaterThanEquals,
In,
LessThan,
LessThanEquals,
NotEquals,
NotIn,
)
from ..node_executor_registry import NodeExecutorRegistr... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/boolean_operation_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/boolean_operation_executor.py | from typing import TYPE_CHECKING, Callable, Iterator, Sequence
from osprey.engine.ast.grammar import And, ASTNode, BooleanOperation, Or
from ..node_executor_registry import NodeExecutorRegistry
from ._base_node_executor import BaseNodeExecutor
if TYPE_CHECKING:
from osprey.engine.ast_validator.validation_context... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/binary_operation_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/binary_operation_executor.py | import operator
from typing import TYPE_CHECKING, Any, Callable, List
from osprey.engine.ast.grammar import (
Add,
ASTNode,
BinaryOperation,
BitwiseAnd,
BitwiseOr,
BitwiseXor,
Divide,
FloorDivide,
LeftShift,
Modulo,
Multiply,
Pow,
RightShift,
Subtract,
)
from ..... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/unary_operation_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/unary_operation_executor.py | import operator
from typing import TYPE_CHECKING, Any, Callable, List, Mapping, Type
from osprey.engine.ast.grammar import ASTNode, Not, UnaryOperation, UnaryOperator, USub
from ..node_executor_registry import NodeExecutorRegistry
from ._base_node_executor import BaseNodeExecutor
if TYPE_CHECKING:
from osprey.en... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/assign_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/assign_executor.py | from typing import TYPE_CHECKING, Any, List
from osprey.engine.ast.grammar import Assign, ASTNode
from ..node_executor_registry import NodeExecutorRegistry
from ._base_node_executor import BaseNodeExecutor
if TYPE_CHECKING:
from ..execution_context import ExecutionContext
@NodeExecutorRegistry.register_globall... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/name_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/name_executor.py | from typing import TYPE_CHECKING, Any, List
from osprey.engine.ast.grammar import ASTNode, Load, Name
from ..node_executor_registry import NodeExecutorRegistry
from ._base_node_executor import BaseNodeExecutor
if TYPE_CHECKING:
from osprey.engine.ast_validator.validation_context import ValidatedSources
from... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/call_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/call_executor.py | from typing import TYPE_CHECKING, Any, List
from osprey.engine.ast.grammar import ASTNode, Call
from ..node_executor_registry import NodeExecutorRegistry
from ._base_node_executor import BaseNodeExecutor
if TYPE_CHECKING:
from ddtrace.span import Span
from osprey.engine.ast_validator.validation_context impor... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/__init__.py | osprey_worker/src/osprey/engine/executor/node_executor/__init__.py | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false | |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/literals/string_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/literals/string_executor.py | from typing import TYPE_CHECKING
from osprey.engine.ast.grammar import String
from ...node_executor_registry import NodeExecutorRegistry
from .._base_node_executor import BaseNodeExecutor
if TYPE_CHECKING:
from ...execution_context import ExecutionContext
@NodeExecutorRegistry.register_globally
class StringExe... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/literals/boolean_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/literals/boolean_executor.py | from typing import TYPE_CHECKING
from osprey.engine.ast.grammar import Boolean
from ...node_executor_registry import NodeExecutorRegistry
from .._base_node_executor import BaseNodeExecutor
if TYPE_CHECKING:
from ...execution_context import ExecutionContext
@NodeExecutorRegistry.register_globally
class BooleanE... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/literals/none_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/literals/none_executor.py | from typing import TYPE_CHECKING
from osprey.engine.ast.grammar import None_
from ...node_executor_registry import NodeExecutorRegistry
from .._base_node_executor import BaseNodeExecutor
if TYPE_CHECKING:
from ...execution_context import ExecutionContext
@NodeExecutorRegistry.register_globally
class NoneExecut... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/literals/__init__.py | osprey_worker/src/osprey/engine/executor/node_executor/literals/__init__.py | # flake8: noqa: F401
from .boolean_executor import BooleanExecutor
from .format_string_executor import FormatStringExecutor
from .list_executor import ListExecutor
from .none_executor import NoneExecutor
from .number_executor import NumberExecutor
from .string_executor import StringExecutor
| python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/literals/format_string_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/literals/format_string_executor.py | from typing import TYPE_CHECKING, Sequence
from osprey.engine.ast.grammar import ASTNode, FormatString
from ...node_executor_registry import NodeExecutorRegistry
from .._base_node_executor import BaseNodeExecutor
if TYPE_CHECKING:
from ...execution_context import ExecutionContext
@NodeExecutorRegistry.register... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/literals/number_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/literals/number_executor.py | from typing import TYPE_CHECKING, Union
from osprey.engine.ast.grammar import Number
from ...node_executor_registry import NodeExecutorRegistry
from .._base_node_executor import BaseNodeExecutor
if TYPE_CHECKING:
from ...execution_context import ExecutionContext
@NodeExecutorRegistry.register_globally
class Nu... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/executor/node_executor/literals/list_executor.py | osprey_worker/src/osprey/engine/executor/node_executor/literals/list_executor.py | from typing import TYPE_CHECKING, Any, Sequence
from typing import List as ListT
from osprey.engine.ast.grammar import ASTNode, List
from ...node_executor_registry import NodeExecutorRegistry
from .._base_node_executor import BaseNodeExecutor
if TYPE_CHECKING:
from ...execution_context import ExecutionContext
... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/config/config_subkey_handler.py | osprey_worker/src/osprey/engine/config/config_subkey_handler.py | from collections import defaultdict
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Type, TypeVar
from pydantic.main import BaseModel
from .config_registry import ConfigRegistry
from .utils import parse_config_with_auto_default
if TYPE_CHECKING:
from osprey.engine.ast_validator.validation_context im... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/config/utils.py | osprey_worker/src/osprey/engine/config/utils.py | from typing import Any, Dict, List, Type, Union
from osprey.engine.ast.sources import SourcesConfig
from pydantic.fields import SHAPE_LIST, SHAPE_SET
from pydantic.main import BaseModel
def parse_config_with_auto_default(
sources_config: SourcesConfig, subkey_name: str, model: Type[BaseModel]
) -> BaseModel:
... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/config/__init__.py | osprey_worker/src/osprey/engine/config/__init__.py | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false | |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/config/config_registry.py | osprey_worker/src/osprey/engine/config/config_registry.py | from dataclasses import dataclass
from typing import TYPE_CHECKING, Dict, Optional, Sequence, Set, Type
from osprey.engine.utils.types import add_slots
from pydantic import ValidationError as PydanticValidationError
from pydantic.main import BaseConfig, BaseModel, Extra
from .utils import parse_config_with_auto_defau... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/config/tests/test_config.py | osprey_worker/src/osprey/engine/config/tests/test_config.py | import json
import textwrap
from typing import Dict
from unittest.mock import MagicMock
import pytest
from osprey.engine.ast.grammar import Source
from osprey.engine.ast.sources import CONFIG_PATH, SOURCE_ENTRY_POINT_PATH, Sources, SourcesConfig
from osprey.engine.ast_validator.validation_context import ValidatedSourc... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/config/tests/__init__.py | osprey_worker/src/osprey/engine/config/tests/__init__.py | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false | |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/registry.py | osprey_worker/src/osprey/engine/udf/registry.py | from typing import Any, Dict, Iterator, Optional, Type
import typing_inspect
from osprey.engine.udf.arguments import EXTRA_ARGS_ATTR
from .base import UDFBase
from .type_evaluator import is_compatible_type
from .type_helpers import UnsupportedTypeError, get_osprey_generic_param, is_typevar, to_display_str
class UDF... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/arguments.py | osprey_worker/src/osprey/engine/udf/arguments.py | import ast
import inspect
import textwrap
from contextlib import contextmanager
from functools import lru_cache
from typing import Any, Dict, Generic, Iterator, List, Optional, Sequence, Type, TypeVar, Union, cast, get_type_hints
import typing_inspect
from osprey.engine.ast import grammar
from pydantic import BaseMode... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/type_helpers.py | osprey_worker/src/osprey/engine/udf/type_helpers.py | from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type, TypeVar, Union, overload
from osprey.engine.ast.grammar import Span
from osprey.engine.language_types.osprey_invariant_generic import OspreyInvariantGeneric
from typing_inspect import get_args, get_parameters, is_generic_type, is_union_type
from... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/rvalue_type_checker.py | osprey_worker/src/osprey/engine/udf/rvalue_type_checker.py | from abc import ABC, abstractmethod
from typing import Callable, ClassVar, Dict, List, Optional, Sequence, Tuple, Type, TypeVar, Union
from osprey.engine.ast.grammar import Annotation, Annotations, AnnotationWithVariants, Assign, Span
from osprey.engine.language_types.entities import EntityT
from .type_helpers import... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/type_evaluator.py | osprey_worker/src/osprey/engine/udf/type_evaluator.py | import typing
from dataclasses import dataclass
from typing import Any, List, Optional, Sequence, TypeVar
from osprey.engine.language_types.osprey_invariant_generic import OspreyInvariantGeneric
from osprey.engine.language_types.post_execution_convertible import PostExecutionConvertible
from osprey.engine.utils.types ... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/__init__.py | osprey_worker/src/osprey/engine/udf/__init__.py | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false | |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/base.py | osprey_worker/src/osprey/engine/udf/base.py | import inspect
import textwrap
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Any, ClassVar, Dict, Generic, Optional, Sequence, Tuple, Type, TypeVar, cast
import typing_inspect
from osprey.engine.executor.execution_context import ExecutionContext
from pydantic import BaseModel
from result import... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/tests/test_udf.py | osprey_worker/src/osprey/engine/udf/tests/test_udf.py | import textwrap
from typing import Any
from osprey.engine.executor.execution_context import ExecutionContext
from osprey.engine.udf.arguments import ArgumentsBase, ArgumentSpec, ConstExpr
from osprey.engine.udf.base import MethodSpec, UDFBase
def test_udf_annotations_result() -> None:
class Arguments(ArgumentsBa... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/tests/test_type_evaluator.py | osprey_worker/src/osprey/engine/udf/tests/test_type_evaluator.py | from typing import Any, Callable, List, Optional, Tuple, TypeVar, Union
import pytest
from osprey.engine.language_types.entities import EntityT
from osprey.engine.language_types.osprey_invariant_generic import OspreyInvariantGeneric
from osprey.engine.udf.arguments import ConstExpr
from osprey.engine.udf.type_evaluato... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/tests/test_udf_registry.py | osprey_worker/src/osprey/engine/udf/tests/test_udf_registry.py | from typing import Any, Generic, List, Optional, Sequence, Tuple, Type, TypeVar, cast
import pytest
from osprey.engine.conftest import CheckOutputFunction
from osprey.engine.executor.execution_context import ExecutionContext
from osprey.engine.language_types.osprey_invariant_generic import OspreyInvariantGeneric
from ... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/tests/test_type_helpers.py | osprey_worker/src/osprey/engine/udf/tests/test_type_helpers.py | from typing import Any, Dict, List, Optional, TypeVar, Union
import pytest
from osprey.engine.language_types.entities import EntityT
from osprey.engine.udf.arguments import ConstExpr
from osprey.engine.udf.type_helpers import UnsupportedTypeError, get_typevar_substitution, to_display_str
@pytest.mark.parametrize(
... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/tests/test_const_expr.py | osprey_worker/src/osprey/engine/udf/tests/test_const_expr.py | from typing import List, Type, TypeVar
import pytest
from osprey.engine.ast import grammar
from osprey.engine.udf.arguments import ConstExpr
_T = TypeVar('_T')
@pytest.mark.parametrize(
'ty, lit',
[
(str, grammar.String),
(float, grammar.Number),
(int, grammar.Number),
(bool,... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/tests/test_arguments.py | osprey_worker/src/osprey/engine/udf/tests/test_arguments.py | from typing import Optional, Union
from osprey.engine.udf.arguments import ArgumentsBase, ConstExpr
StrConstExpr = ConstExpr[str] # This being inside the below function is causing mypy to crash
def test_arguments_items() -> None:
class Arguments(ArgumentsBase):
foo: str
bar: StrConstExpr
i... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/tests/__init__.py | osprey_worker/src/osprey/engine/udf/tests/__init__.py | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false | |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/udf/tests/test_rvalue_type_checker.py | osprey_worker/src/osprey/engine/udf/tests/test_rvalue_type_checker.py | from typing import List, Sequence, Tuple, Type
import pytest
from osprey.engine.ast.grammar import Annotation, AnnotationWithVariants, Span
from osprey.engine.ast.sources import Sources
from osprey.engine.language_types.entities import EntityT
from osprey.engine.udf.rvalue_type_checker import AnnotationConversionError... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/stdlib/__init__.py | osprey_worker/src/osprey/engine/stdlib/__init__.py | from typing import TYPE_CHECKING
from osprey.engine.utils.imports import import_all_direct_children
if TYPE_CHECKING:
from osprey.engine.config.config_registry import ConfigRegistry
def get_config_registry() -> 'ConfigRegistry':
from . import configs
import_all_direct_children(configs)
from ._regi... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/stdlib/_registry.py | osprey_worker/src/osprey/engine/stdlib/_registry.py | from typing import Callable, Type
from osprey.engine.config.config_registry import ConfigRegistry
from osprey.engine.config.config_subkey_handler import ModelT
_config_registry = ConfigRegistry()
def register_config_subkey(subkey: str) -> Callable[[Type[ModelT]], Type[ModelT]]:
"""A decorator to register a Pyda... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/stdlib/udfs/domain_chopper.py | osprey_worker/src/osprey/engine/stdlib/udfs/domain_chopper.py | from typing import List, cast
from osprey.engine.executor.execution_context import ExpectedUdfException
from tld import get_tld
from ._prelude import ArgumentsBase, ConstExpr, ExecutionContext, UDFBase
from .categories import UdfCategories
class DomainChopperArguments(ArgumentsBase):
urls: List[str]
fld: Co... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/stdlib/udfs/json_data.py | osprey_worker/src/osprey/engine/stdlib/udfs/json_data.py | from typing import Any
from osprey.engine.stdlib.udfs import json_utils
from osprey.engine.udf.rvalue_type_checker import ExtractSecretTypeChecker, SecretTypeChecker
from ._prelude import ArgumentsBase, ConstExpr, ExecutionContext, UDFBase, ValidationContext
from .categories import UdfCategories
class Arguments(Arg... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/stdlib/udfs/time_bucket.py | osprey_worker/src/osprey/engine/stdlib/udfs/time_bucket.py | from osprey.engine.language_types.time_delta import TimeDeltaT
from osprey.worker.lib.snowflake import Snowflake
from ._prelude import ArgumentsBase, ConstExpr, ExecutionContext, UDFBase, ValidationContext
from .categories import UdfCategories
class TimedeltaArguments(ArgumentsBase):
timedelta: TimeDeltaT
gr... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/stdlib/udfs/verdicts.py | osprey_worker/src/osprey/engine/stdlib/udfs/verdicts.py | from osprey.engine.language_types.effects import EffectBase
from osprey.engine.language_types.verdicts import VerdictEffect
from ._prelude import ArgumentsBase, ExecutionContext, UDFBase
from .categories import UdfCategories
class VerdictArguments(ArgumentsBase):
verdict: str
"""The verdict value."""
class... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/stdlib/udfs/string.py | osprey_worker/src/osprey/engine/stdlib/udfs/string.py | from __future__ import annotations
import re
import string
import unicodedata
from itertools import chain
from typing import Dict, Iterator, List, Literal, Optional, Set, cast
from urllib.parse import ParseResult, urlparse, urlunparse
from osprey.engine.stdlib.udfs._prelude import (
ArgumentsBase,
ExecutionCo... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/stdlib/udfs/random_int.py | osprey_worker/src/osprey/engine/stdlib/udfs/random_int.py | import random
from ._prelude import ArgumentsBase, ConstExpr, ExecutionContext, UDFBase, ValidationContext
from .categories import UdfCategories
class Arguments(ArgumentsBase):
start: ConstExpr[int]
end: ConstExpr[int]
class RandomInt(UDFBase[Arguments, int]):
"""Returns an integer between the `start` ... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/stdlib/udfs/list_read.py | osprey_worker/src/osprey/engine/stdlib/udfs/list_read.py | from typing import Any, List
from osprey.engine.executor.execution_context import ExpectedUdfException
from ._prelude import ArgumentsBase, ExecutionContext, UDFBase
from .categories import UdfCategories
class Arguments(ArgumentsBase):
list: List[Any] = []
index: int = 0
class ListRead(UDFBase[Arguments, ... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/stdlib/udfs/regex_match.py | osprey_worker/src/osprey/engine/stdlib/udfs/regex_match.py | import re
from typing import List
from ._prelude import ArgumentsBase, ConstExpr, ExecutionContext, UDFBase, ValidationContext
from .categories import UdfCategories
class RegexArgumentsBase(ArgumentsBase):
pattern: ConstExpr[str]
"""The regex pattern to evaluate."""
case_insensitive: ConstExpr[bool] = C... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
roostorg/osprey | https://github.com/roostorg/osprey/blob/5c1f999c156b420043be7efdd472c8e31096bfb5/osprey_worker/src/osprey/engine/stdlib/udfs/labels.py | osprey_worker/src/osprey/engine/stdlib/udfs/labels.py | from dataclasses import dataclass
from datetime import datetime, timezone
from enum import Enum, auto
from typing import Any, Optional, Sequence
from osprey.engine.executor.udf_execution_helpers import HasHelperInternal
from osprey.engine.language_types.effects import (
EffectBase,
)
from osprey.engine.language_ty... | python | Apache-2.0 | 5c1f999c156b420043be7efdd472c8e31096bfb5 | 2026-01-05T07:11:51.519046Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.