id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
⌀
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
23,400
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.ExternalImage
class ExternalImage(Image): tag: str
class ExternalImage(Image): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
84
2
0
2
1
1
0
2
1
1
0
7
0
0
23,401
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.Image
from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref from typing import Any, Optional, Union class Image(BaseModelWithNullableRequiredFields): repository: str tag: Optional[Union[str, int]] = None pullPolicy: PullPolicy @property def name(se...
class Image(BaseModelWithNullableRequiredFields): @property def name(self) -> str: pass
3
0
2
0
2
0
2
0
1
1
0
1
1
0
1
84
8
1
7
4
4
0
6
3
4
2
6
0
2
23,402
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.InitContainer
from pydantic import BaseModel, RootModel from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref class InitContainer(BaseModel): model_config = {'extra': 'allow', 'json_schema_extra': {'$ref': create_definition_ref('io.k8s.api.core.v1.Container')}}
class InitContainer(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
83
5
0
5
2
4
0
2
2
1
0
5
0
0
23,403
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.Labels
from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref from pydantic import BaseModel, RootModel class Labels(BaseModel): model_config = {'extra': 'allow', 'json_schema_extra': {'$ref': create_definition_ref('io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/pro...
class Labels(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
83
9
0
9
2
8
0
2
2
1
0
5
0
0
23,404
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.LivenessProbe
from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref from pydantic import BaseModel, RootModel class LivenessProbe(BaseModel): model_config = {'extra': 'allow', 'json_schema_extra': {'$ref': create_definition_ref('io.k8s.api.core.v1.Probe')}}
class LivenessProbe(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
83
5
0
5
2
4
0
2
2
1
0
5
0
0
23,405
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.NodeSelector
from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref from pydantic import BaseModel, RootModel class NodeSelector(RootModel[dict[str, str]]): model_config = {'json_schema_extra': {'extra': 'allow', '$ref': create_definition_ref('io.k8s.api.core.v1.PodSpec/pr...
class NodeSelector(RootModel[dict[str, str]]): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
93
7
0
7
2
6
0
2
2
1
0
6
0
0
23,406
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.PodSecurityContext
from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref from pydantic import BaseModel, RootModel from typing import Any, Optional, Union class PodSecurityContext(RootModel[dict[str, Any]]): model_config = {'json_schema_extra': {'$ref': create_definition_ref('i...
class PodSecurityContext(RootModel[dict[str, Any]]): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
93
6
0
6
2
5
0
2
2
1
0
6
0
0
23,407
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.PullPolicy
from enum import Enum class PullPolicy(str, Enum): ALWAYS = 'Always' IF_NOT_PRESENT = 'IfNotPresent' NEVER = 'Never'
class PullPolicy(str, Enum): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
115
4
0
4
4
3
0
4
4
3
0
4
0
0
23,408
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.ReadinessProbe
from pydantic import BaseModel, RootModel from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref class ReadinessProbe(BaseModel): model_config = {'extra': 'allow', 'json_schema_extra': {'$ref': create_definition_ref('io.k8s.api.core.v1.Probe')}}
class ReadinessProbe(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
83
5
0
5
2
4
0
2
2
1
0
5
0
0
23,409
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.ResourceRequirements
from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref from pydantic import BaseModel, RootModel class ResourceRequirements(BaseModel): model_config = {'extra': 'allow', 'json_schema_extra': {'$ref': create_definition_ref('io.k8s.api.core.v1.ResourceRequiremen...
class ResourceRequirements(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
83
7
0
7
2
6
0
2
2
1
0
5
0
0
23,410
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.Resources
from pydantic import BaseModel, RootModel from typing import Any, Optional, Union from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref class Resources(RootModel[dict[str, Any]]): model_config = {'json_schema_extra': {'$ref': create_definition_ref('io.k8s.api...
class Resources(RootModel[dict[str, Any]]): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
93
6
0
6
2
5
0
2
2
1
0
6
0
0
23,411
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.SecretEnvSource
from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref from pydantic import BaseModel, RootModel class SecretEnvSource(BaseModel): model_config = {'extra': 'allow', 'json_schema_extra': {'$ref': create_definition_ref('io.k8s.api.core.v1.SecretEnvSource')}}
class SecretEnvSource(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
83
5
0
5
2
4
0
2
2
1
0
5
0
0
23,412
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.SecretRef
from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref from pydantic import BaseModel, RootModel class SecretRef(BaseModel): model_config = {'extra': 'allow', 'json_schema_extra': {'$ref': create_definition_ref('io.k8s.api.core.v1.LocalObjectReference')}}
class SecretRef(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
83
7
0
7
2
6
0
2
2
1
0
5
0
0
23,413
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.SecurityContext
from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref from pydantic import BaseModel, RootModel from typing import Any, Optional, Union class SecurityContext(RootModel[dict[str, Any]], json_schema_extra={'$ref': create_definition_ref('io.k8s.api.core.v1.SecurityC...
class SecurityContext(RootModel[dict[str, Any]], json_schema_extra={'$ref': pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
93
5
0
5
4
1
0
2
1
1
0
6
0
0
23,414
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.Service
from typing import Any, Optional, Union from pydantic import BaseModel, RootModel from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref class Service(BaseModel, extra='forbid'): type: str port: int annotations: Optional[Annotations] = None
class Service(BaseModel, extra='forbid'): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
83
4
0
4
2
3
0
4
2
3
0
5
0
0
23,415
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.StartupProbe
from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref from pydantic import BaseModel, RootModel class StartupProbe(BaseModel): enabled: bool = True model_config = {'extra': 'allow', 'json_schema_extra': {'$ref': create_definition_ref('io.k8s.api.core.v1.P...
class StartupProbe(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
83
9
1
8
3
7
0
3
3
2
0
5
0
0
23,416
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.Tolerations
from typing import Any, Optional, Union from pydantic import BaseModel, RootModel class Tolerations(RootModel[list[dict[str, Any]]]): model_config = {'json_schema_extra': _tolerations_schema_extra}
class Tolerations(RootModel[list[dict[str, Any]]]): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
93
6
0
6
2
5
0
2
2
1
0
6
0
0
23,417
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.Volume
from pydantic import BaseModel, RootModel from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref class Volume(BaseModel): model_config = {'extra': 'allow', 'json_schema_extra': {'$ref': create_definition_ref('io.k8s.api.core.v1.Volume')}}
class Volume(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
83
5
0
5
2
4
0
2
2
1
0
5
0
0
23,418
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/kubernetes.py
schema.charts.utils.kubernetes.VolumeMount
from schema.charts.utils.utils import BaseModel as BaseModelWithNullableRequiredFields, create_definition_ref from pydantic import BaseModel, RootModel class VolumeMount(BaseModel): model_config = {'extra': 'allow', 'json_schema_extra': {'$ref': create_definition_ref('io.k8s.api.core.v1.VolumeMount')}}
class VolumeMount(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
83
5
0
5
2
4
0
2
2
1
0
5
0
0
23,419
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/utils.py
schema.charts.utils.utils.BaseModel
from pydantic import BaseModel as PydanticBaseModel, Field class BaseModel(PydanticBaseModel): class Config: """Pydantic currently does not support nullable required fields. Here, we use a workaround to allow this behavior. See https://github.com/samuelcolvin/pydantic/issues/1270#issuecom...
class BaseModel(PydanticBaseModel): class Config: '''Pydantic currently does not support nullable required fields. Here, we use a workaround to allow this behavior. See https://github.com/samuelcolvin/pydantic/issues/1270#issuecomment-729555558 ''' @staticmethod def...
4
1
15
0
11
4
6
0.57
1
0
0
29
0
0
0
83
24
2
14
6
10
8
12
5
9
6
5
4
6
23,420
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/utils.py
schema.charts.utils.utils.ConfigurableClass
from pydantic import BaseModel as PydanticBaseModel, Field class ConfigurableClass(PydanticBaseModel, extra='forbid'): module: str class_: str = Field(alias='class') config: dict
class ConfigurableClass(PydanticBaseModel, extra='forbid'): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
83
4
0
4
2
3
0
4
2
3
0
5
0
0
23,421
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/charts/utils/utils.py
schema.charts.utils.utils.SupportedKubernetes
from enum import Enum class SupportedKubernetes(str, Enum): V1_18 = '1.18.0'
class SupportedKubernetes(str, Enum): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
115
2
0
2
2
1
0
2
2
1
0
4
0
0
23,422
dagster-io/dagster
dagster-io_dagster/helm/dagster/schema/schema/utils/helm_template.py
schema.utils.helm_template.HelmTemplate
import yaml from kubernetes.client.api_client import ApiClient from schema.charts.dagster_user_deployments.values import DagsterUserDeploymentsHelmValues from tempfile import NamedTemporaryFile, mkstemp from dataclasses import dataclass from pprint import pprint import os import json from schema.charts.dagster.values i...
@dataclass class HelmTemplate: def render(self, values: Optional[Union[DagsterHelmValues, DagsterUserDeploymentsHelmValues]]=None, values_dict: Optional[dict[str, Any]]=None, chart_version: Optional[str]=None) -> list[Any]: pass @contextmanager def _with_chart_yaml(self, helm_dir_path: str, chart_v...
5
0
45
7
37
4
4
0.11
0
7
2
0
2
0
2
2
101
15
82
30
73
9
50
22
47
4
0
3
8
23,423
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/cli_tests/workspace_tests/autodiscovery_tests/single_cacheable_asset_repository.py
single_cacheable_asset_repository.FooCacheableAssetsDefinition
from dagster._core.definitions.assets.definition.cacheable_assets_definition import CacheableAssetsDefinition class FooCacheableAssetsDefinition(CacheableAssetsDefinition): def compute_cacheable_data(self): return [] def build_definitions(self, *_args, **_kwargs): return []
class FooCacheableAssetsDefinition(CacheableAssetsDefinition): def compute_cacheable_data(self): pass def build_definitions(self, *_args, **_kwargs): pass
3
0
2
0
2
0
1
0
1
0
0
0
2
0
2
30
6
1
5
3
2
0
5
3
2
1
5
0
2
23,424
dagster-io/dagster
dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/partitions_schedules_sensors/backfills/single_run_backfill_io_manager.py
single_run_backfill_io_manager.MyIOManager
import dagster as dg class MyIOManager(dg.IOManager): def load_input(self, context: dg.InputContext): start_datetime, end_datetime = context.asset_partitions_time_window return read_data_in_datetime_range(start_datetime, end_datetime) def handle_output(self, context: dg.OutputContext, obj): ...
class MyIOManager(dg.IOManager): def load_input(self, context: dg.InputContext): pass def handle_output(self, context: dg.OutputContext, obj): pass
3
0
3
0
3
0
1
0
1
0
0
0
2
0
2
2
8
1
7
5
4
0
7
5
4
1
1
0
2
23,425
dagster-io/dagster
dagster-io_dagster/examples/with_wandb/with_wandb/assets/example/train.py
train.CNNModel
import torch.nn as nn class CNNModel(nn.Module): def __init__(self): super().__init__() self.cnn1 = nn.Conv2d(in_channels=1, out_channels=config.channels_one, kernel_size=5, stride=1, padding=0) self.relu1 = nn.ReLU() self.maxpool1 = nn.MaxPool2d(kernel_size=2) self.cnn2 = ...
class CNNModel(nn.Module): def __init__(self): pass def forward(self, x): pass
3
0
29
5
17
7
1
0.41
1
1
0
0
2
8
2
12
59
11
34
12
31
14
22
12
19
1
1
0
2
23,426
dagster-io/dagster
dagster-io_dagster/examples/tutorial/tutorial/resources.py
tutorial.resources.DataGenerator
from typing import Union from collections.abc import Sequence from random import Random from faker import Faker from datetime import datetime, timedelta class DataGenerator: def __init__(self, seed: int=0): self.seed = seed self.fake = Faker() self.random = Random(seed) def generate_s...
class DataGenerator: def __init__(self, seed: int=0): pass def generate_signup(self, date) -> Signup: pass def get_signups_for_date(self, date: datetime) -> Sequence[Signup]: pass def get_signups_for_dates(self, start_date: datetime, end_date: Union[datetime, None]=None) -> ...
6
0
11
2
9
0
1
0
0
7
1
0
5
3
5
5
59
12
47
22
39
0
32
20
26
2
0
1
7
23,427
dagster-io/dagster
dagster-io_dagster/examples/tutorial/tutorial/resources.py
tutorial.resources.DataGeneratorResource
from datetime import datetime, timedelta from pydantic import Field from dagster import ConfigurableResource class DataGeneratorResource(ConfigurableResource): """Resource for generating simulated data for experimenting with Dagster. Examples: .. code-block:: python from dagster import Def...
class DataGeneratorResource(ConfigurableResource): '''Resource for generating simulated data for experimenting with Dagster. Examples: .. code-block:: python from dagster import Definitions, asset from dagster_data_generator import DataGeneratorResource, DataGeneratorConfig ...
5
1
5
1
4
0
1
0.57
1
5
1
0
3
0
3
3
46
10
23
12
18
13
15
11
11
2
1
1
4
23,428
dagster-io/dagster
dagster-io_dagster/examples/tutorial/tutorial/resources.py
tutorial.resources.Signup
from dataclasses import asdict, dataclass from datetime import datetime, timedelta @dataclass class Signup: name: str email: str country: str signup_source: str referral: str signup_purpose: str subscription_level: str payment_method: str sso_id: str email_verified: bool ena...
@dataclass class Signup: def to_dict(self) -> dict: pass def properties(self): pass def __eq__(self, other): pass def __hash__(self): pass def __getitem__(self, key): pass
7
0
6
0
6
0
1
0
0
2
0
0
5
0
5
5
46
5
41
7
35
0
27
7
21
2
0
1
6
23,429
dagster-io/dagster
dagster-io_dagster/examples/airlift-migration-tutorial/tutorial_example/shared/export_duckdb_to_csv.py
tutorial_example.shared.export_duckdb_to_csv.ExportDuckDbToCsvArgs
from dataclasses import dataclass from pathlib import Path from typing import Optional @dataclass class ExportDuckDbToCsvArgs: table_name: str csv_path: Path duckdb_path: Path duckdb_database_name: str duckdb_schema: Optional[str] = None
@dataclass class ExportDuckDbToCsvArgs: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
6
0
6
2
5
0
6
2
5
0
0
0
0
23,430
dagster-io/dagster
dagster-io_dagster/examples/airlift-migration-tutorial/tutorial_example/shared/load_csv_to_duckdb.py
tutorial_example.shared.load_csv_to_duckdb.LoadCsvToDuckDbArgs
from pathlib import Path from dataclasses import dataclass @dataclass class LoadCsvToDuckDbArgs: table_name: str csv_path: Path duckdb_path: Path names: list[str] duckdb_schema: str duckdb_database_name: str
@dataclass class LoadCsvToDuckDbArgs: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
7
0
7
1
6
0
7
1
6
0
0
0
0
23,431
dagster-io/dagster
dagster-io_dagster/examples/airlift-migration-tutorial/tutorial_example/snippets/custom_operator_examples/custom_dag_level_proxy.py
tutorial_example.snippets.custom_operator_examples.custom_dag_level_proxy.CustomProxyToDagsterOperator
from dagster_airlift.in_airflow import BaseProxyDAGToDagsterOperator, proxying_to_dagster from airflow.utils.context import Context import requests from airflow import DAG class CustomProxyToDagsterOperator(BaseProxyDAGToDagsterOperator): def get_dagster_session(self, context: Context) -> requests.Session: ...
class CustomProxyToDagsterOperator(BaseProxyDAGToDagsterOperator): def get_dagster_session(self, context: Context) -> requests.Session: pass def get_dagster_url(self, context: Context) -> str: pass @classmethod def build_from_dag(cls, dag: DAG): pass
5
0
4
0
4
0
1
0.08
1
3
0
0
2
0
3
45
16
2
13
7
8
1
12
6
8
2
6
1
4
23,432
dagster-io/dagster
dagster-io_dagster/examples/airlift-migration-tutorial/tutorial_example/snippets/custom_operator_examples/custom_proxy.py
tutorial_example.snippets.custom_operator_examples.custom_proxy.CustomProxyToDagsterOperator
from airflow.utils.context import Context from dagster_airlift.in_airflow import BaseProxyTaskToDagsterOperator, proxying_to_dagster import requests class CustomProxyToDagsterOperator(BaseProxyTaskToDagsterOperator): def get_dagster_session(self, context: Context) -> requests.Session: if 'var' not in cont...
class CustomProxyToDagsterOperator(BaseProxyTaskToDagsterOperator): def get_dagster_session(self, context: Context) -> requests.Session: pass def get_dagster_url(self, context: Context) -> str: pass
3
0
5
0
5
0
2
0
1
3
0
0
2
0
2
44
11
1
10
5
7
0
10
5
7
2
6
1
3
23,433
dagster-io/dagster
dagster-io_dagster/examples/airlift-migration-tutorial/tutorial_example/snippets/custom_operator_examples/plus_proxy_operator.py
tutorial_example.snippets.custom_operator_examples.plus_proxy_operator.DagsterCloudProxyOperator
import requests from airflow.utils.context import Context from dagster_airlift.in_airflow import BaseProxyTaskToDagsterOperator class DagsterCloudProxyOperator(BaseProxyTaskToDagsterOperator): def get_variable(self, context: Context, var_name: str) -> str: if 'var' not in context: raise ValueE...
class DagsterCloudProxyOperator(BaseProxyTaskToDagsterOperator): def get_variable(self, context: Context, var_name: str) -> str: pass def get_dagster_session(self, context: Context) -> requests.Session: pass def get_dagster_url(self, context: Context) -> str: pass
4
0
4
0
4
0
1
0
1
3
0
0
3
0
3
45
16
2
14
8
10
0
14
8
10
2
6
1
4
23,434
dagster-io/dagster
dagster-io_dagster/examples/with_great_expectations/with_great_expectations/ge_demo.py
with_great_expectations.ge_demo.GEOpConfig
from dagster import Config, job, op from dagster._utils import file_relative_path class GEOpConfig(Config): csv_path: str = file_relative_path(__file__, './data/succeed.csv')
class GEOpConfig(Config): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
1
0
0
23,435
dagster-io/dagster
dagster-io_dagster/examples/with_openai/with_openai/assets.py
with_openai.assets.OpenAIConfig
from dagster import AllPartitionMapping, AssetExecutionContext, AssetIn, Config, StaticPartitionsDefinition, asset, define_asset_job class OpenAIConfig(Config): model: str question: str
class OpenAIConfig(Config): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
1
0
0
23,436
dagster-io/dagster
dagster-io_dagster/examples/with_pyspark/with_pyspark/definitions.py
with_pyspark.definitions.LocalParquetIOManager
import os from dagster import ConfigurableIOManager, Definitions, asset from pyspark.sql import DataFrame, Row, SparkSession class LocalParquetIOManager(ConfigurableIOManager): def _get_path(self, context): return os.path.join(*context.asset_key.path) def handle_output(self, context, obj): ob...
class LocalParquetIOManager(ConfigurableIOManager): def _get_path(self, context): pass def handle_output(self, context, obj): pass def load_input(self, context): pass
4
0
2
0
2
0
1
0
1
0
0
0
3
0
3
3
10
2
8
5
4
0
8
5
4
1
1
0
3
23,437
dagster-io/dagster
dagster-io_dagster/examples/with_pyspark_emr/with_pyspark_emr/definitions.py
with_pyspark_emr.definitions.ParquetIOManager
from dagster_pyspark import PySparkResource from dagster import ConfigurableIOManager, Definitions, ResourceParam, asset class ParquetIOManager(ConfigurableIOManager): pyspark: PySparkResource path_prefix: str def _get_path(self, context) -> str: return '/'.join([context.resource_config['path_pref...
class ParquetIOManager(ConfigurableIOManager): def _get_path(self, context) -> str: pass def handle_output(self, context, obj): pass def load_input(self, context): pass
4
0
2
0
2
0
1
0
1
1
0
0
3
0
3
3
13
3
10
5
6
0
10
5
6
1
1
0
3
23,438
dagster-io/dagster
dagster-io_dagster/examples/with_wandb/with_wandb/assets/model_registry_example.py
with_wandb.assets.model_registry_example.PromoteBestModelToProductionConfig
from dagster import AssetIn, Config, asset class PromoteBestModelToProductionConfig(Config): model_registry: str
class PromoteBestModelToProductionConfig(Config): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
1
0
0
23,439
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.BuildCmd
import os import getdeps.cache as cache_module from getdeps.fetcher import file_name_is_cmake_file, list_files_under_dir_newer_than_timestamp, SystemPackageFetcher from getdeps.subcmd import add_subcommands, cmd, SubCmd import json @cmd('build', 'build a given project') class BuildCmd(ProjectCmdBase): def run_pro...
@cmd('build', 'build a given project') class BuildCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): pass def compute_dep_change_status(self, m, built_marker, loader): pass def compute_source_change_status(self, cached_project, fetcher, m, built_marker, project_hash):...
6
0
66
6
55
5
9
0.1
1
2
2
0
4
0
4
12
268
28
219
43
212
21
111
39
106
19
3
5
36
23,440
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.CachedProject
import shutil import tarfile import os import sys import tempfile class CachedProject(object): """A helper that allows calling the cache logic for a project from both the build and the fetch code""" def __init__(self, cache, loader, m): self.m = m self.inst_dir = loader.get_project_install...
class CachedProject(object): '''A helper that allows calling the cache logic for a project from both the build and the fetch code''' def __init__(self, cache, loader, m): pass def is_cacheable(self): '''We only cache third party projects''' pass def was_cached(self): ...
6
2
13
1
12
0
2
0.07
1
2
0
0
5
8
5
5
73
9
60
25
54
4
47
22
41
5
1
4
11
23,441
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.CleanCmd
from getdeps.buildopts import setup_build_options from getdeps.subcmd import add_subcommands, cmd, SubCmd @cmd('clean', 'clean up the scratch dir') class CleanCmd(SubCmd): def run(self, args): opts = setup_build_options(args) clean_dirs(opts)
@cmd('clean', 'clean up the scratch dir') class CleanCmd(SubCmd): def run(self, args): pass
3
0
3
0
3
0
1
0
1
0
0
0
1
0
1
3
4
0
4
3
2
0
4
3
2
1
2
0
1
23,442
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.DebugCmd
from getdeps.subcmd import add_subcommands, cmd, SubCmd @cmd('debug', "start a shell in the given project's build dir with the correct environment for running the build") class DebugCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): self.create_builder(loader, manifest).debug(reconfig...
@cmd('debug', "start a shell in the given project's build dir with the correct environment for running the build") class DebugCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): pass
3
0
2
0
2
0
1
0
1
0
0
0
1
0
1
9
3
0
3
2
1
0
3
2
1
1
3
0
1
23,443
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.EnvCmd
from getdeps.subcmd import add_subcommands, cmd, SubCmd @cmd('env', 'print the environment in a shell sourceable format') class EnvCmd(ProjectCmdBase): def setup_project_cmd_parser(self, parser): parser.add_argument('--os-type', help='Filter to just this OS type to run', choices=['linux', 'darwin', 'windo...
@cmd('env', 'print the environment in a shell sourceable format') class EnvCmd(ProjectCmdBase): def setup_project_cmd_parser(self, parser): pass def run_project_cmd(self, args, loader, manifest): pass
4
0
7
0
7
0
2
0
1
0
0
0
2
0
2
10
15
1
14
3
11
0
7
3
4
2
3
1
3
23,444
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.FetchCmd
import os from getdeps.fetcher import file_name_is_cmake_file, list_files_under_dir_newer_than_timestamp, SystemPackageFetcher from getdeps.subcmd import add_subcommands, cmd, SubCmd import getdeps.cache as cache_module @cmd('fetch', 'fetch the code for a given project') class FetchCmd(ProjectCmdBase): def setup_...
@cmd('fetch', 'fetch the code for a given project') class FetchCmd(ProjectCmdBase): def setup_project_cmd_parser(self, parser): pass def run_project_cmd(self, args, loader, manifest): pass
4
0
22
2
18
2
4
0.11
1
2
2
0
2
0
2
10
46
5
37
13
34
4
25
12
22
7
3
3
8
23,445
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.FixupDeps
import sys from getdeps.subcmd import add_subcommands, cmd, SubCmd from getdeps.dyndeps import create_dyn_dep_munger @cmd('fixup-dyn-deps', 'Adjusts dynamic dependencies for packaging purposes') class FixupDeps(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): projects = loader.manifests...
@cmd('fixup-dyn-deps', 'Adjusts dynamic dependencies for packaging purposes') class FixupDeps(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): pass def setup_project_cmd_parser(self, parser): pass
4
0
18
2
16
1
3
0.06
1
0
0
0
2
0
2
10
38
4
32
11
29
2
20
11
17
4
3
3
5
23,446
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.GenerateGitHubActionsCmd
from getdeps.buildopts import setup_build_options from getdeps.subcmd import add_subcommands, cmd, SubCmd from getdeps.platform import HostType import os from getdeps.load import ManifestLoader @cmd('generate-github-actions', 'generate a GitHub actions configuration') class GenerateGitHubActionsCmd(ProjectCmdBase): ...
@cmd('generate-github-actions', 'generate a GitHub actions configuration') class GenerateGitHubActionsCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): pass def get_run_on(self, args): pass def write_job_for_platform(self, platform, args): pass def setup...
6
0
105
11
85
10
12
0.12
1
3
2
0
4
0
4
12
427
47
341
44
336
42
202
43
197
40
3
4
47
23,447
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.InstallSysDepsCmd
from getdeps.runcmd import check_cmd from getdeps.subcmd import add_subcommands, cmd, SubCmd @cmd('install-system-deps', 'Install system packages to satisfy the deps for a project') class InstallSysDepsCmd(ProjectCmdBase): def setup_project_cmd_parser(self, parser): parser.add_argument('--recursive', help...
@cmd('install-system-deps', 'Install system packages to satisfy the deps for a project') class InstallSysDepsCmd(ProjectCmdBase): def setup_project_cmd_parser(self, parser): pass def run_project_cmd(self, args, loader, manifest): pass
4
0
55
4
51
0
10
0
1
2
0
0
2
0
2
10
111
9
102
14
99
0
57
14
54
18
3
2
19
23,448
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.ListDepsCmd
from getdeps.subcmd import add_subcommands, cmd, SubCmd @cmd('list-deps', 'lists the transitive deps for a given project') class ListDepsCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): for m in loader.manifests_in_dependency_order(): print(m.name) return 0 ...
@cmd('list-deps', 'lists the transitive deps for a given project') class ListDepsCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): pass def setup_project_cmd_parser(self, parser): pass
4
0
6
0
6
0
2
0
1
0
0
0
2
0
2
10
14
1
13
4
10
0
7
4
4
2
3
1
3
23,449
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.ProjectCmdBase
import os from getdeps.load import ManifestLoader from getdeps.buildopts import setup_build_options from getdeps.subcmd import add_subcommands, cmd, SubCmd class ProjectCmdBase(SubCmd): def run(self, args): opts = setup_build_options(args) if args.current_project is not None: opts.repo...
class ProjectCmdBase(SubCmd): def run(self, args): pass def process_project_dir_arguments(self, args, loader): pass def parse_project_arg(arg, arg_type): pass def setup_parser(self, parser): pass def setup_project_cmd_parser(self, parser): pa...
8
0
25
2
22
1
3
0.04
1
2
2
13
6
0
6
8
162
18
138
23
130
6
71
23
63
8
2
2
22
23,450
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.QueryPathsCmd
import getdeps.cache as cache_module from getdeps.subcmd import add_subcommands, cmd, SubCmd from getdeps.fetcher import file_name_is_cmake_file, list_files_under_dir_newer_than_timestamp, SystemPackageFetcher @cmd('query-paths', 'print the paths for tooling to use') class QueryPathsCmd(ProjectCmdBase): def run_p...
@cmd('query-paths', 'print the paths for tooling to use') class QueryPathsCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): pass def setup_project_cmd_parser(self, parser): pass
4
0
14
1
12
2
3
0.13
1
2
2
0
2
0
2
10
29
2
24
10
21
3
18
10
15
4
3
2
5
23,451
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.ShowBuildDirCmd
from getdeps.subcmd import add_subcommands, cmd, SubCmd @cmd('show-build-dir', 'print the build dir for a given project') class ShowBuildDirCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): if args.recursive: manifests = loader.manifests_in_dependency_order() else...
@cmd('show-build-dir', 'print the build dir for a given project') class ShowBuildDirCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): pass def setup_project_cmd_parser(self, parser): pass
4
0
8
1
8
0
2
0
1
0
0
0
2
0
2
10
18
2
16
6
13
0
10
6
7
3
3
1
4
23,452
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.ShowHostType
from getdeps.subcmd import add_subcommands, cmd, SubCmd from getdeps.platform import HostType @cmd('show-host-type', 'outputs the host type tuple for the host machine') class ShowHostType(SubCmd): def run(self, args): host = HostType() print('%s' % host.as_tuple_string()) return 0
@cmd('show-host-type', 'outputs the host type tuple for the host machine') class ShowHostType(SubCmd): def run(self, args): pass
3
0
4
0
4
0
1
0
1
1
1
0
1
0
1
3
5
0
5
3
3
0
5
3
3
1
2
0
1
23,453
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.ShowInstDirCmd
from getdeps.fetcher import file_name_is_cmake_file, list_files_under_dir_newer_than_timestamp, SystemPackageFetcher from getdeps.subcmd import add_subcommands, cmd, SubCmd @cmd('show-inst-dir', 'print the installation dir for a given project') class ShowInstDirCmd(ProjectCmdBase): def run_project_cmd(self, args,...
@cmd('show-inst-dir', 'print the installation dir for a given project') class ShowInstDirCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): pass def setup_project_cmd_parser(self, parser): pass
4
0
11
1
9
2
3
0.16
1
1
1
0
2
0
2
10
24
2
19
7
16
3
13
7
10
4
3
2
5
23,454
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.ShowScratchDirCmd
from getdeps.subcmd import add_subcommands, cmd, SubCmd from getdeps.buildopts import setup_build_options @cmd('show-scratch-dir', 'show the scratch dir') class ShowScratchDirCmd(SubCmd): def run(self, args): opts = setup_build_options(args) print(opts.scratch_dir)
@cmd('show-scratch-dir', 'show the scratch dir') class ShowScratchDirCmd(SubCmd): def run(self, args): pass
3
0
3
0
3
0
1
0
1
0
0
0
1
0
1
3
4
0
4
3
2
0
4
3
2
1
2
0
1
23,455
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.ShowSourceDirCmd
from getdeps.subcmd import add_subcommands, cmd, SubCmd @cmd('show-source-dir', 'print the source dir for a given project') class ShowSourceDirCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): if args.recursive: manifests = loader.manifests_in_dependency_order() e...
@cmd('show-source-dir', 'print the source dir for a given project') class ShowSourceDirCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): pass def setup_project_cmd_parser(self, parser): pass
4
0
8
1
8
0
2
0
1
0
0
0
2
0
2
10
18
2
16
6
13
0
10
6
7
3
3
1
4
23,456
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.TestCmd
from getdeps.subcmd import add_subcommands, cmd, SubCmd @cmd('test', 'test a given project') class TestCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): if not self.check_built(loader, manifest): print('project %s has not been built' % manifest.name) return 1 ...
@cmd('test', 'test a given project') class TestCmd(ProjectCmdBase): def run_project_cmd(self, args, loader, manifest): pass def setup_project_cmd_parser(self, parser): pass
4
0
15
0
15
0
2
0
1
1
0
0
2
0
2
10
31
1
30
3
27
0
12
3
9
2
3
1
3
23,457
facebook/watchman
build/fbcode_builder/getdeps.py
getdeps.ValidateManifest
from getdeps.subcmd import add_subcommands, cmd, SubCmd import sys from getdeps.manifest import ManifestParser @cmd('validate-manifest', 'parse a manifest and validate that it is correct') class ValidateManifest(SubCmd): def run(self, args): try: ManifestParser(file_name=args.file_name) ...
@cmd('validate-manifest', 'parse a manifest and validate that it is correct') class ValidateManifest(SubCmd): def run(self, args): pass def setup_parser(self, parser): pass
4
0
5
0
5
0
2
0
1
3
1
0
2
0
2
4
12
1
11
4
8
0
11
3
8
2
2
1
3
23,458
facebook/watchman
build/fbcode_builder/getdeps/builder.py
getdeps.builder.AutoconfBuilder
import os import subprocess class AutoconfBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir, args, conf_env_args) -> None: super(AutoconfBuilder, self).__init__(loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_...
class AutoconfBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir, args, conf_env_args) -> None: pass @property def _make_binary(self): pass def _build(self, reconfigure) -> None: pass
5
0
22
1
17
3
3
0.17
1
2
0
0
3
3
3
19
69
6
54
27
37
9
27
13
23
6
2
2
8
23,459
facebook/watchman
build/fbcode_builder/getdeps/builder.py
getdeps.builder.Boost
import subprocess import os class Boost(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir, b2_args) -> None: children = os.listdir(src_dir) assert len(children) == 1, 'expected a single directory entry: %r' % (children,) boost_s...
class Boost(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir, b2_args) -> None: pass def _build(self, reconfigure) -> None: pass
3
0
41
2
39
0
3
0
1
1
0
0
2
5
2
18
83
4
79
31
65
0
31
15
28
5
2
2
6
23,460
facebook/watchman
build/fbcode_builder/getdeps/builder.py
getdeps.builder.BuilderBase
from .dyndeps import create_dyn_dep_munger from .runcmd import run_cmd import os import sys import pathlib from shlex import quote as shellquote import shutil import subprocess from .envfuncs import add_path_entry, Env, path_search class BuilderBase(object): def __init__(self, loader, dep_manifests, build_opts: '...
class BuilderBase(object): def __init__(self, loader, dep_manifests, build_opts: 'BuildOptions', ctx, manifest, src_dir, build_dir, inst_dir, env=None, final_install_prefix=None) -> None: pass def _get_cmd_prefix(self): pass def _check_cmd(self, cmd, **kwargs) -> None: '''Run the...
19
5
14
0
12
2
3
0.18
1
6
1
12
16
13
16
16
246
21
191
74
154
35
140
53
123
5
1
3
40
23,461
facebook/watchman
build/fbcode_builder/getdeps/builder.py
getdeps.builder.CMakeBootStrapBuilder
class CMakeBootStrapBuilder(MakeBuilder): def _build(self, reconfigure) -> None: self._check_cmd(['./bootstrap', '--prefix=' + self.inst_dir, f'--parallel={self.num_jobs}']) super(CMakeBootStrapBuilder, self)._build(reconfigure)
class CMakeBootStrapBuilder(MakeBuilder): def _build(self, reconfigure) -> None: pass
2
0
9
0
9
0
1
0
1
1
0
0
1
0
1
22
10
0
10
2
8
0
4
2
2
1
3
0
1
23,462
facebook/watchman
build/fbcode_builder/getdeps/builder.py
getdeps.builder.CMakeBuilder
import shutil import sys import json from .envfuncs import add_path_entry, Env, path_search import os import subprocess from typing import Optional class CMakeBuilder(BuilderBase): MANUAL_BUILD_SCRIPT = '#!{sys.executable}\n\n\nimport argparse\nimport subprocess\nimport sys\n\nCMAKE = {cmake!r}\nCTEST = {ctest!r}\...
class CMakeBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir, defines, final_install_prefix=None, extra_cmake_defines=None, cmake_target='install') -> None: pass def _invalidate_cache(self) -> None: pass def _needs_rec...
12
2
50
5
38
7
6
0.16
1
9
0
0
7
7
7
23
550
62
422
85
391
66
179
61
164
18
2
3
56
23,463
facebook/watchman
build/fbcode_builder/getdeps/builder.py
getdeps.builder.Iproute2Builder
import shutil import os class Iproute2Builder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir) -> None: super(Iproute2Builder, self).__init__(loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir) def _build(self...
class Iproute2Builder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir) -> None: pass def _build(self, reconfigure) -> None: pass
3
0
19
1
18
0
2
0.11
1
1
0
0
2
0
2
18
43
3
36
17
23
4
15
7
12
3
2
2
4
23,464
facebook/watchman
build/fbcode_builder/getdeps/builder.py
getdeps.builder.MakeBuilder
import shutil import glob import os class MakeBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir, build_args, install_args, test_args) -> None: super(MakeBuilder, self).__init__(loader, dep_manifests, build_opts, ctx, manifest, src_dir, ...
class MakeBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir, build_args, install_args, test_args) -> None: pass @property def _make_binary(self): pass def _get_prefix(self): pass def _build(self, reconf...
7
0
15
1
13
1
2
0.06
1
1
0
1
5
3
5
21
82
11
67
31
47
4
34
17
28
4
2
2
10
23,465
facebook/watchman
build/fbcode_builder/getdeps/builder.py
getdeps.builder.NinjaBootstrap
import shutil import sys import os class NinjaBootstrap(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, build_dir, src_dir, inst_dir) -> None: super(NinjaBootstrap, self).__init__(loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir) def _b...
class NinjaBootstrap(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, build_dir, src_dir, inst_dir) -> None: pass def _build(self, reconfigure) -> None: pass
3
0
15
0
15
0
2
0
1
1
0
0
2
0
2
18
32
1
31
16
18
0
12
6
9
2
2
1
3
23,466
facebook/watchman
build/fbcode_builder/getdeps/builder.py
getdeps.builder.NopBuilder
import shutil import stat import os from .copytree import simple_copytree class NopBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, inst_dir) -> None: super(NopBuilder, self).__init__(loader, dep_manifests, build_opts, ctx, manifest, src_dir, None, inst_d...
class NopBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, inst_dir) -> None: pass def build(self, reconfigure: bool) -> None: pass
3
0
20
1
18
2
5
0.08
1
2
0
0
2
0
2
18
42
3
36
12
31
3
26
10
23
9
2
4
10
23,467
facebook/watchman
build/fbcode_builder/getdeps/builder.py
getdeps.builder.OpenSSLBuilder
import os import typing from .envfuncs import add_path_entry, Env, path_search class OpenSSLBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, build_dir, src_dir, inst_dir) -> None: super(OpenSSLBuilder, self).__init__(loader, dep_manifests, build_opts, ctx, manifes...
class OpenSSLBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, build_dir, src_dir, inst_dir) -> None: pass def _build(self, reconfigure) -> None: pass
3
0
42
2
37
3
4
0.08
1
3
0
0
2
0
2
18
85
5
74
24
61
6
30
14
27
7
2
1
8
23,468
facebook/watchman
build/fbcode_builder/getdeps/builder.py
getdeps.builder.SqliteBuilder
import os from .envfuncs import add_path_entry, Env, path_search from .fetcher import copy_if_different class SqliteBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir) -> None: super(SqliteBuilder, self).__init__(loader, dep_manifests, b...
class SqliteBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir) -> None: pass def _build(self, reconfigure) -> None: pass
3
0
40
3
36
2
2
0.04
1
2
0
0
2
2
2
18
82
7
72
23
59
3
18
11
15
3
2
1
4
23,469
facebook/watchman
build/fbcode_builder/getdeps/builder.py
getdeps.builder.SystemdBuilder
from .envfuncs import add_path_entry, Env, path_search class SystemdBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir) -> None: super(SystemdBuilder, self).__init__(loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, i...
class SystemdBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts, ctx, manifest, src_dir, build_dir, inst_dir) -> None: pass def _build(self, reconfigure) -> None: pass
3
0
25
2
20
3
2
0.2
1
2
0
0
2
0
2
18
53
4
41
15
28
8
11
5
8
2
2
1
3
23,470
facebook/watchman
build/fbcode_builder/getdeps/buildopts.py
getdeps.buildopts.BuildOptions
from .manifest import ContextGenerator import glob import sys from .envfuncs import add_flag, add_path_entry, Env from .platform import get_available_ram, HostType, is_windows from typing import Mapping, Optional import subprocess from .fetcher import get_fbsource_repo_data, homebrew_package_prefix import os class Bui...
class BuildOptions(object): def __init__(self, fbcode_builder_dir, scratch_dir, host_type, install_dir=None, num_jobs: int=0, use_shipit: bool=False, vcvars_path=None, allow_system_packages: bool=False, lfs_path=None, shared_libs: bool=False, facebook_internal=None, free_up_disk: bool=False, build_type: Optional[...
15
3
32
3
24
6
6
0.25
1
8
3
0
13
18
13
13
434
52
308
100
267
76
205
75
189
22
1
4
76
23,471
facebook/watchman
build/fbcode_builder/getdeps/cache.py
getdeps.cache.ArtifactCache
class ArtifactCache(object): """The ArtifactCache is a small abstraction that allows caching named things in some external storage mechanism. The primary use case is for storing the build products on CI systems to accelerate the build""" def download_to_file(self, name, dest_file_name) -> bool: ...
class ArtifactCache(object): '''The ArtifactCache is a small abstraction that allows caching named things in some external storage mechanism. The primary use case is for storing the build products on CI systems to accelerate the build''' def download_to_file(self, name, dest_file_name) -> bool: ...
3
3
9
0
2
7
1
3.6
1
1
0
0
2
0
2
2
25
2
5
3
2
18
5
3
2
1
1
0
2
23,472
facebook/watchman
build/fbcode_builder/getdeps/cargo.py
getdeps.cargo.CargoBuilder
import typing import os from .builder import BuilderBase import sys import shutil from .copytree import simple_copytree import re class CargoBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts: 'BuildOptions', ctx, manifest, src_dir, build_dir, inst_dir, build_doc, workspace_dir, manifests_...
class CargoBuilder(BuilderBase): def __init__(self, loader, dep_manifests, build_opts: 'BuildOptions', ctx, manifest, src_dir, build_dir, inst_dir, build_doc, workspace_dir, manifests_to_build, cargo_config_file) -> None: pass def run_cargo(self, install_dirs, operation, args=None) -> None: p...
20
6
25
2
19
4
5
0.19
1
5
0
0
17
5
18
34
466
55
351
120
316
66
237
100
217
17
2
7
89
23,473
facebook/watchman
build/fbcode_builder/getdeps/dyndeps.py
getdeps.dyndeps.DepBase
from typing import List, Optional import subprocess import sys import stat import os import shlex class DepBase(object): def __init__(self, buildopts, env, install_dirs, strip) -> None: self.buildopts = buildopts self.env = env self.install_dirs = install_dirs self.strip = strip ...
class DepBase(object): def __init__(self, buildopts, env, install_dirs, strip) -> None: pass def list_dynamic_deps(self, objfile): pass def interesting_dep(self, d) -> bool: pass def process_deps(self, destdir, final_install_prefix=None) -> None: pass def find_a...
13
1
10
1
8
1
3
0.19
1
5
0
3
12
6
12
12
140
22
99
47
86
19
92
47
79
7
1
3
36
23,474
facebook/watchman
build/fbcode_builder/getdeps/dyndeps.py
getdeps.dyndeps.ElfDeps
import os import sys import subprocess class ElfDeps(DepBase): def __init__(self, buildopts, env, install_dirs, strip) -> None: super(ElfDeps, self).__init__(buildopts, env, install_dirs, strip) args = [sys.executable, sys.argv[0]] if buildopts.allow_system_packages: args.appen...
class ElfDeps(DepBase): def __init__(self, buildopts, env, install_dirs, strip) -> None: pass def list_dynamic_deps(self, objfile): pass def rewrite_dep(self, objfile, depname, old_dep, new_dep, final_lib_dir) -> None: pass def is_objfile(self, objfile) -> bool: pass...
6
0
9
0
8
1
2
0.12
1
3
0
0
5
1
5
17
52
6
41
14
35
5
27
13
21
3
2
1
8
23,475
facebook/watchman
build/fbcode_builder/getdeps/dyndeps.py
getdeps.dyndeps.MachDeps
import os from struct import unpack import subprocess import re class MachDeps(DepBase): def interesting_dep(self, d) -> bool: if d.startswith('/usr/lib/') or d.startswith('/System/'): return False return True def is_objfile(self, objfile): if not os.path.isfile(objfile): ...
class MachDeps(DepBase): def interesting_dep(self, d) -> bool: pass def is_objfile(self, objfile): pass def list_dynamic_deps(self, objfile): pass def rewrite_dep(self, objfile, depname, old_dep, new_dep, final_lib_dir) -> None: pass
5
0
13
0
11
2
3
0.14
1
2
0
0
4
0
4
16
54
4
44
14
39
6
31
13
26
5
2
3
12
23,476
facebook/watchman
build/fbcode_builder/getdeps/dyndeps.py
getdeps.dyndeps.WinDeps
import subprocess import errno import os import glob import re class WinDeps(DepBase): def __init__(self, buildopts, env, install_dirs, strip) -> None: super(WinDeps, self).__init__(buildopts, env, install_dirs, strip) self.dumpbin = self.find_dumpbin() def find_dumpbin(self) -> str: ...
class WinDeps(DepBase): def __init__(self, buildopts, env, install_dirs, strip) -> None: pass def find_dumpbin(self) -> str: pass def list_dynamic_deps(self, exe): pass def rewrite_dep(self, objfile, depname, old_dep, new_dep, final_lib_dir) -> None: pass def in...
12
3
13
1
9
3
2
0.31
1
6
0
0
11
1
11
23
164
21
110
37
98
34
69
34
57
4
2
3
26
23,477
facebook/watchman
build/fbcode_builder/getdeps/envfuncs.py
getdeps.envfuncs.Env
import sys import os class Env(object): def __init__(self, src=None) -> None: self._dict = {} if src is None: self.update(os.environ) else: self.update(src) def update(self, src) -> None: for k, v in src.items(): self.set(k, v) def copy...
class Env(object): def __init__(self, src=None) -> None: pass def update(self, src) -> None: pass def copy(self) -> 'Env': pass def _key(self, key): pass def get(self, key, defval=None): pass def __getitem__(self, key): pass def unset(s...
17
0
6
0
4
2
2
0.44
1
5
0
0
16
1
16
16
108
19
62
21
45
27
60
21
43
5
1
3
28
23,478
facebook/watchman
build/fbcode_builder/getdeps/errors.py
getdeps.errors.ManifestNotFound
class ManifestNotFound(Exception): def __init__(self, manifest_name) -> None: super(Exception, self).__init__("Unable to find manifest '%s'" % manifest_name)
class ManifestNotFound(Exception): def __init__(self, manifest_name) -> None: pass
2
0
2
0
2
0
1
0
1
1
0
0
1
0
1
11
3
0
3
2
1
0
3
2
1
1
3
0
1
23,479
facebook/watchman
build/fbcode_builder/getdeps/errors.py
getdeps.errors.TransientFailure
class TransientFailure(Exception): """Raising this error causes getdeps to return with an error code that Sandcastle will consider to be a retryable transient infrastructure error""" pass
class TransientFailure(Exception): '''Raising this error causes getdeps to return with an error code that Sandcastle will consider to be a retryable transient infrastructure error''' pass
1
1
0
0
0
0
0
1.5
1
0
0
0
0
0
0
10
6
1
2
1
1
3
2
1
1
0
3
0
0
23,480
facebook/watchman
build/fbcode_builder/getdeps/expr.py
getdeps.expr.AllExpr
class AllExpr(ExprNode): def __init__(self, nodes) -> None: self._nodes = nodes def eval(self, ctx) -> bool: for node in self._nodes: if not node.eval(ctx): return False return True def __str__(self) -> str: items = [] for node in self._...
class AllExpr(ExprNode): def __init__(self, nodes) -> None: pass def eval(self, ctx) -> bool: pass def __str__(self) -> str: pass
4
0
4
0
4
0
2
0
1
2
0
0
3
1
3
4
15
2
13
8
9
0
13
8
9
3
2
2
6
23,481
facebook/watchman
build/fbcode_builder/getdeps/expr.py
getdeps.expr.AnyExpr
class AnyExpr(ExprNode): def __init__(self, nodes) -> None: self._nodes = nodes def eval(self, ctx) -> bool: for node in self._nodes: if node.eval(ctx): return True return False def __str__(self) -> str: items = [] for node in self._node...
class AnyExpr(ExprNode): def __init__(self, nodes) -> None: pass def eval(self, ctx) -> bool: pass def __str__(self) -> str: pass
4
0
4
0
4
0
2
0
1
2
0
0
3
1
3
4
15
2
13
8
9
0
13
8
9
3
2
2
6
23,482
facebook/watchman
build/fbcode_builder/getdeps/expr.py
getdeps.expr.EqualExpr
class EqualExpr(ExprNode): def __init__(self, key, value) -> None: self._key = key self._value = value def eval(self, ctx): return ctx.get(self._key) == self._value def __str__(self) -> str: return '%s=%s' % (self._key, self._value)
class EqualExpr(ExprNode): def __init__(self, key, value) -> None: pass def eval(self, ctx): pass def __str__(self) -> str: pass
4
0
2
0
2
0
1
0
1
1
0
0
3
2
3
4
10
2
8
6
4
0
8
6
4
1
2
0
3
23,483
facebook/watchman
build/fbcode_builder/getdeps/expr.py
getdeps.expr.ExprNode
class ExprNode(object): def eval(self, ctx) -> bool: return False
class ExprNode(object): def eval(self, ctx) -> bool: pass
2
0
2
0
2
0
1
0
1
1
0
5
1
0
1
1
3
0
3
2
1
0
3
2
1
1
1
0
1
23,484
facebook/watchman
build/fbcode_builder/getdeps/expr.py
getdeps.expr.NotExpr
class NotExpr(ExprNode): def __init__(self, node) -> None: self._node = node def eval(self, ctx) -> bool: return not self._node.eval(ctx) def __str__(self) -> str: return 'not(%s)' % self._node
class NotExpr(ExprNode): def __init__(self, node) -> None: pass def eval(self, ctx) -> bool: pass def __str__(self) -> str: pass
4
0
2
0
2
0
1
0
1
2
0
0
3
1
3
4
9
2
7
5
3
0
7
5
3
1
2
0
3
23,485
facebook/watchman
build/fbcode_builder/getdeps/expr.py
getdeps.expr.Parser
import shlex import re class Parser(object): def __init__(self, text, valid_variables) -> None: self.text = text self.lex = shlex.shlex(text) self.valid_variables = valid_variables def parse(self): expr = self.top() garbage = self.lex.get_token() if garbage != ...
class Parser(object): def __init__(self, text, valid_variables) -> None: pass def parse(self): pass def top(self): pass def ident(self) -> str: pass def parse_not(self) -> NotExpr: pass def parse_any(self) -> AnyExpr: pass def parse_all...
8
0
10
0
9
0
3
0.05
1
7
4
0
7
3
7
7
78
9
66
26
58
3
58
26
50
5
1
2
20
23,486
facebook/watchman
build/fbcode_builder/getdeps/expr.py
getdeps.expr.TrueExpr
class TrueExpr(ExprNode): def eval(self, ctx) -> bool: return True def __str__(self) -> str: return 'true'
class TrueExpr(ExprNode): def eval(self, ctx) -> bool: pass def __str__(self) -> str: pass
3
0
2
0
2
0
1
0
1
2
0
0
2
0
2
3
6
1
5
3
2
0
5
3
2
1
2
0
2
23,487
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
getdeps.fetcher.ArchiveFetcher
import os import zipfile import hashlib import time from .errors import TransientFailure from .platform import is_windows import shutil import random from urllib.parse import urlparse import tarfile class ArchiveFetcher(Fetcher): def __init__(self, build_options, manifest, url, sha256) -> None: self.manif...
class ArchiveFetcher(Fetcher): def __init__(self, build_options, manifest, url, sha256) -> None: pass def _verify_hash(self) -> None: pass def _download_dir(self): '''returns the download dir, creating it if it doesn't already exist''' pass def _download_dir(self): ...
9
1
13
1
10
2
3
0.14
1
4
1
0
8
7
8
12
110
15
83
27
74
12
75
24
66
11
2
3
23
23,488
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
getdeps.fetcher.ChangeStatus
class ChangeStatus(object): """Indicates the nature of changes that happened while updating the source directory. There are two broad uses: * When extracting archives for third party software we want to know that we did something (eg: we either extracted code or we didn't do anything) * For...
class ChangeStatus(object): '''Indicates the nature of changes that happened while updating the source directory. There are two broad uses: * When extracting archives for third party software we want to know that we did something (eg: we either extracted code or we didn't do anything) * For...
5
5
10
0
5
5
2
1.6
1
1
0
0
4
2
4
4
57
5
20
7
15
32
17
7
12
4
1
1
8
23,489
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
getdeps.fetcher.FbsourceRepoData
from typing import Dict, NamedTuple class FbsourceRepoData(NamedTuple): hash: str date: str
class FbsourceRepoData(NamedTuple): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
1
0
0
23,490
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
getdeps.fetcher.Fetcher
class Fetcher(object): """The Fetcher is responsible for fetching and extracting the sources for project. The Fetcher instance defines where the extracted data resides and reports this to the consumer via its `get_src_dir` method.""" def update(self) -> ChangeStatus: """Brings the src dir ...
class Fetcher(object): '''The Fetcher is responsible for fetching and extracting the sources for project. The Fetcher instance defines where the extracted data resides and reports this to the consumer via its `get_src_dir` method.''' def update(self) -> ChangeStatus: '''Brings the src dir ...
5
5
7
0
2
5
1
2.56
1
1
1
5
4
0
4
4
36
4
9
5
4
23
9
5
4
1
1
0
4
23,491
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
getdeps.fetcher.GitFetcher
import subprocess from .runcmd import run_cmd from urllib.parse import urlparse import sys import re import os class GitFetcher(Fetcher): DEFAULT_DEPTH = 1 def __init__(self, build_options, manifest, repo_url, rev, depth, branch) -> None: url = urlparse(repo_url) directory = '%s%s' % (url.netl...
class GitFetcher(Fetcher): def __init__(self, build_options, manifest, repo_url, rev, depth, branch) -> None: pass def _update(self) -> ChangeStatus: pass def update(self) -> ChangeStatus: pass def _clone(self) -> None: pass def clean(self) -> None: pass...
8
0
13
1
10
2
2
0.22
1
3
1
0
7
5
7
11
102
12
74
24
66
16
51
23
43
7
2
4
16
23,492
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
getdeps.fetcher.LocalDirFetcher
import os class LocalDirFetcher(object): """This class exists to override the normal fetching behavior, and use an explicit user-specified directory for the project sources. This fetcher cannot update or track changes. It always reports that the project has changed, forcing it to always be built.""" ...
class LocalDirFetcher(object): '''This class exists to override the normal fetching behavior, and use an explicit user-specified directory for the project sources. This fetcher cannot update or track changes. It always reports that the project has changed, forcing it to always be built.''' def __...
6
1
2
0
2
0
1
0.36
1
2
1
0
5
1
5
5
21
6
11
7
5
4
11
7
5
1
1
0
5
23,493
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
getdeps.fetcher.PreinstalledNopFetcher
class PreinstalledNopFetcher(SystemPackageFetcher): def __init__(self) -> None: self.installed = True
class PreinstalledNopFetcher(SystemPackageFetcher): def __init__(self) -> None: pass
2
0
2
0
2
0
1
0
1
0
0
0
1
1
1
6
3
0
3
3
1
0
3
3
1
1
2
0
1
23,494
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
getdeps.fetcher.ShipitPathMap
import sys import re from .copytree import prefetch_dir_if_eden import os class ShipitPathMap(object): def __init__(self) -> None: self.roots = [] self.mapping = [] self.exclusion = [] def add_mapping(self, fbsource_dir, target_dir) -> None: """Add a posix path or pattern. We...
class ShipitPathMap(object): def __init__(self) -> None: pass def add_mapping(self, fbsource_dir, target_dir) -> None: '''Add a posix path or pattern. We cannot normpath the input here because that would change the paths from posix to windows form and break the logic througho...
10
2
15
2
10
2
4
0.24
1
4
1
0
7
3
7
7
134
22
90
35
80
22
86
34
76
15
1
6
33
23,495
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
getdeps.fetcher.ShipitTransformerFetcher
import os from .runcmd import run_cmd import shutil class ShipitTransformerFetcher(Fetcher): @classmethod def _shipit_paths(cls, build_options): www_path = ['/var/www/scripts/opensource/codesync'] if build_options.fbsource_dir: fbcode_path = [os.path.join(build_options.fbsource_dir...
class ShipitTransformerFetcher(Fetcher): @classmethod def _shipit_paths(cls, build_options): pass def __init__(self, build_options, project_name, external_branch) -> None: pass def update(self) -> ChangeStatus: pass def clean(self) -> None: pass @classmethod ...
11
0
9
0
9
1
2
0.08
1
3
1
0
6
4
8
12
86
9
71
20
60
6
45
18
36
4
2
2
16
23,496
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
getdeps.fetcher.SimpleShipitTransformerFetcher
import shutil import os class SimpleShipitTransformerFetcher(Fetcher): def __init__(self, build_options, manifest, ctx) -> None: self.build_options = build_options self.manifest = manifest self.repo_dir = os.path.join(build_options.scratch_dir, 'shipit', manifest.name) self.ctx = c...
class SimpleShipitTransformerFetcher(Fetcher): def __init__(self, build_options, manifest, ctx) -> None: pass def clean(self) -> None: pass def update(self) -> ChangeStatus: pass def hash(self) -> str: pass def get_src_dir(self): pass
6
0
6
0
5
1
2
0.15
1
3
2
0
5
4
5
9
35
5
26
13
20
4
22
13
16
4
2
1
9
23,497
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
getdeps.fetcher.SubFetcher
import os import stat class SubFetcher(Fetcher): """Fetcher for a project with subprojects""" def __init__(self, base, subs) -> None: self.base = base self.subs = subs def update(self) -> ChangeStatus: base = self.base.update() changed = base.build_changed() or base.source...
class SubFetcher(Fetcher): '''Fetcher for a project with subprojects''' def __init__(self, base, subs) -> None: pass def update(self) -> ChangeStatus: pass def clean(self) -> None: pass def hash(self) -> None: pass def get_src_dir(self): pass
6
1
5
0
5
0
2
0.04
1
1
1
0
5
2
5
9
31
5
25
15
19
1
25
15
19
4
2
2
10
23,498
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
getdeps.fetcher.SystemPackageFetcher
import subprocess import hashlib class SystemPackageFetcher(object): def __init__(self, build_options, packages) -> None: self.manager = build_options.host_type.get_package_manager() self.packages = packages.get(self.manager) self.host_type = build_options.host_type if self.package...
class SystemPackageFetcher(object): def __init__(self, build_options, packages) -> None: pass def packages_are_installed(self): pass def update(self) -> ChangeStatus: pass def hash(self) -> str: pass def get_src_dir(self) -> None: pass
6
0
9
1
7
0
3
0.05
1
3
1
1
5
4
5
5
48
8
38
12
32
2
32
12
26
7
1
2
13
23,499
facebook/watchman
build/fbcode_builder/getdeps/load.py
getdeps.load.Loader
from .manifest import ManifestParser import os from .errors import ManifestNotFound class Loader(object): """The loader allows our tests to patch the load operation""" def _list_manifests(self, build_opts): """Returns a generator that iterates all the available manifests""" for path, _, files ...
class Loader(object): '''The loader allows our tests to patch the load operation''' def _list_manifests(self, build_opts): '''Returns a generator that iterates all the available manifests''' pass def _load_manifest(self, path): pass def load_project(self, build_opts, project_...
5
2
8
2
6
1
3
0.17
1
3
2
1
4
0
4
4
39
11
24
11
19
4
24
11
19
4
1
3
12