Skip to content
Permalink
Browse files

Stick out your can, here comes the garbage man

Summary: Eliminate dead code and other dust

Test Plan: Unit tests

Reviewers: schrockn, natekupp, alangenfeld

Reviewed By: schrockn

Differential Revision: https://dagster.phacility.com/D322
  • Loading branch information...
mgasner committed Jun 6, 2019
1 parent 23c3130 commit 7874693d6c446a02b06bbf9a3c4d4f518b1e7ebd
Showing with 39 additions and 160 deletions.
  1. +1 −1 examples/dagster_examples_tests/airline_demo_tests/conftest.py
  2. +0 −1 js_modules/dagit/src/ApiResultRenderer.tsx
  3. +0 −1 js_modules/dagit/src/App.tsx
  4. +0 −7 js_modules/dagit/src/PythonErrorInfo.tsx
  5. +1 −1 js_modules/dagit/src/SidebarSolidInfo.tsx
  6. +1 −1 js_modules/dagit/src/execute/ConfigEditorModePicker.tsx
  7. +1 −1 js_modules/dagit/src/execute/ConfigEditorPresetsPicker.tsx
  8. +1 −1 js_modules/dagit/src/execute/PipelineExecutionContainer.tsx
  9. +1 −1 js_modules/dagit/src/graph/PipelineGraph.tsx
  10. +1 −1 js_modules/dagit/src/plugins/generic.tsx
  11. +1 −1 js_modules/dagit/src/runs/PipelineRun.tsx
  12. +0 −24 js_modules/dagit/src/runs/RunHistory.tsx
  13. +1 −1 js_modules/dagit/src/scripts/DownloadSchema.ts
  14. +0 −8 python_modules/automation/setup.py
  15. +0 −6 python_modules/dagit/setup.py
  16. +1 −1 python_modules/dagster-airflow/dagster_airflow/operators.py
  17. +0 −6 python_modules/dagster-airflow/setup.py
  18. +0 −6 python_modules/dagster-dask/setup.py
  19. +4 −4 python_modules/dagster-graphql/dagster_graphql/implementation/pipeline_execution_manager.py
  20. +0 −7 python_modules/dagster-graphql/setup.py
  21. +1 −1 python_modules/dagster/dagster/core/engine/child_process_executor.py
  22. +1 −1 python_modules/dagster/dagster/core/engine/engine_inprocess.py
  23. +2 −2 python_modules/dagster/dagster/seven/__init__.py
  24. +19 −0 python_modules/dagster/dagster/seven/abc.py
  25. +1 −1 python_modules/dagster/dagster/utils/test.py
  26. +0 −6 python_modules/dagster/setup.py
  27. +0 −6 python_modules/dagstermill/setup.py
  28. +0 −6 python_modules/libraries/dagster-aws/setup.py
  29. +0 −6 python_modules/libraries/dagster-datadog/setup.py
  30. +0 −6 python_modules/libraries/dagster-gcp/setup.py
  31. +0 −6 python_modules/libraries/dagster-ge/setup.py
  32. +0 −6 python_modules/libraries/dagster-pagerduty/setup.py
  33. +1 −2 python_modules/libraries/dagster-pandas/dagster_pandas/examples/pandas_hello_world/pipeline.py
  34. +0 −6 python_modules/libraries/dagster-pandas/setup.py
  35. +0 −7 python_modules/libraries/dagster-pyspark/setup.py
  36. +0 −6 python_modules/libraries/dagster-slack/setup.py
  37. +0 −6 python_modules/libraries/dagster-snowflake/setup.py
  38. +0 −6 python_modules/libraries/dagster-spark/setup.py
@@ -24,7 +24,7 @@ def docker_compose_db():
try:
subprocess.check_output(['docker-compose', 'stop', 'airline-demo-db'])
subprocess.check_output(['docker-compose', 'rm', '-f', 'airline-demo-db'])
except: # pylint: disable=bare-except
except Exception: # pylint: disable=broad-except
pass
subprocess.check_output(['docker-compose', 'up', '-d', 'airline-demo-db'])

@@ -1,5 +1,4 @@
import * as React from "react";
import gql from "graphql-tag";
import { Query, QueryResult } from "react-apollo";
import Loading from "./Loading";
import MOCKS from "./__tests__/mockData";
@@ -3,7 +3,6 @@ import gql from "graphql-tag";
import { Query, QueryResult } from "react-apollo";
import { BrowserRouter, Switch, Route } from "react-router-dom";

import Loading from "./Loading";
import { TopNav } from "./TopNav";
import PythonErrorInfo from "./PythonErrorInfo";
import CustomAlertProvider from "./CustomAlertProvider";
@@ -43,13 +43,6 @@ const ErrorHeader = styled.h3`
margin: 0.5em 0 0.25em;
`;

const BoldMessage = styled.div`
font-weight: 600;
font-family: Consolas, Menlo, monospace;
font-size: 0.95em;
margin-bottom: 0.7em;
`;

const Trace = styled.div`
color: rgb(41, 50, 56);
font-family: Consolas, Menlo, monospace;
@@ -2,7 +2,7 @@ import * as React from "react";
import gql from "graphql-tag";
import styled from "styled-components";
import { Link } from "react-router-dom";
import { Colors, Icon, H6, Text, Code, UL, Button } from "@blueprintjs/core";
import { H6, Text, Code, UL, Button } from "@blueprintjs/core";

import { titleOfIO } from "./Util";
import { pluginForMetadata } from "./plugins";
@@ -1,5 +1,5 @@
import * as React from "react";
import { Button, Menu, MenuItem } from "@blueprintjs/core";
import { Button, Menu } from "@blueprintjs/core";
import { Select } from "@blueprintjs/select";
import { PipelineExecutionContainerFragment } from "./types/PipelineExecutionContainerFragment";

@@ -24,7 +24,7 @@ export default class ConfigEditorPresetsPicker extends React.Component<
ConfigEditorPresetsPickerProps
> {
render() {
const { pipelineName, solidSubset, onCreateSession } = this.props;
const { pipelineName, onCreateSession } = this.props;

return (
<Query
@@ -93,7 +93,7 @@ export default class PipelineExecutionContainer extends React.Component<
}

ensureSessionStateValid() {
const { currentSession, pipeline } = this.props;
const { pipeline } = this.props;
if (!pipeline) return;
}

@@ -88,7 +88,7 @@ class PipelineGraphContents extends React.PureComponent<
key={`composite-rect-${parentHandleID}`}
width={layout.width - 1}
height={layout.height - 1}
label={parentSolid ? parentSolid.name : ""}
label={parentSolid.name}
fill={Colors.LIGHT_GRAY5}
minified={minified}
/>
@@ -1,6 +1,6 @@
import * as React from "react";
import { startCase } from "lodash";
import { Button, Classes, Dialog, Colors } from "@blueprintjs/core";
import { Button, Classes, Dialog } from "@blueprintjs/core";
import { IPluginSidebarProps } from ".";

export class SidebarComponent extends React.Component<IPluginSidebarProps> {
@@ -18,7 +18,7 @@ import PythonErrorInfo from "../PythonErrorInfo";
import { ExecutionPlan } from "../ExecutionPlan";
import RunMetadataProvider from "../RunMetadataProvider";
import LogsToolbar from "./LogsToolbar";
import { Mutation, MutationFn, ApolloConsumer } from "react-apollo";
import { Mutation, MutationFn } from "react-apollo";
import {
HANDLE_START_EXECUTION_FRAGMENT,
handleStartExecutionResult
@@ -40,30 +40,6 @@ function getEndTime(run: RunHistoryRunFragment) {
return 0;
}

interface ISortableColumnProps {
name: string;
cellRenderer: ICellRenderer;
}

const SortableColumn: React.StatelessComponent<ISortableColumnProps> = ({
name,
cellRenderer,
children
}) => {
return (
<Column
columnHeaderCellRenderer={() => (
<ColumnHeaderCell
name={name}
menuRenderer={() => <Menu>{children}</Menu>}
/>
)}
name={name}
cellRenderer={cellRenderer}
/>
);
};

enum RunSort {
START_TIME_ASC,
START_TIME_DSC,
@@ -1,6 +1,6 @@
import { execSync } from "child_process";
import { getIntrospectionQuery, buildClientSchema, printSchema } from "graphql";
import { writeFileSync, exists } from "fs";
import { writeFileSync } from "fs";

const pyVer = execSync("python --version").toString();
const verMatch = pyVer.match(/Python ([\d.]*)/);
@@ -1,13 +1,5 @@
import sys

from setuptools import find_packages, setup

# pylint: disable=E0401, W0611
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins


setup(
name='automation',
@@ -4,12 +4,6 @@

from setuptools import find_packages, setup

# pylint: disable=E0401, W0611
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins


def long_description():
here = os.path.abspath(os.path.dirname(__file__))
@@ -269,7 +269,7 @@ def __init__(
if not self.docker_conn_id_set:
try:
from_env().version()
except: # pylint: disable=bare-except
except Exception: # pylint: disable=broad-except
pass
else:
kwargs['docker_conn_id'] = True
@@ -3,12 +3,6 @@

from setuptools import find_packages, setup

# pylint: disable=E0401, W0611
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins


def get_version(name):
version = {}
@@ -3,12 +3,6 @@

from setuptools import find_packages, setup

# pylint: disable=E0401, W0611
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins


def get_version(name):
version = {}
@@ -117,7 +117,7 @@ def execute_pipeline(self, _, pipeline, pipeline_run, raise_on_error):
step_keys_to_execute=pipeline_run.step_keys_to_execute,
),
)
except: # pylint: disable=W0702
except Exception: # pylint: disable=broad-except
if raise_on_error:
six.reraise(*sys.exc_info())

@@ -185,7 +185,7 @@ def _poll(self):
run_id=process.pipeline_run.run_id
)
)
except: # pylint: disable=W0702
except Exception: # pylint: disable=broad-except
process.pipeline_run.handle_new_event(
build_synthetic_pipeline_error_record(
process.pipeline_run.run_id,
@@ -303,7 +303,7 @@ def execute_pipeline_through_queue(

try:
repository = handle.build_repository_definition()
except: # pylint: disable=W0702
except Exception: # pylint: disable=broad-except
repo_error = sys.exc_info()
message_queue.put(MultiprocessingError(serializable_error_info_from_exc_info(repo_error)))
return
@@ -315,7 +315,7 @@ def execute_pipeline_through_queue(
run_config=run_config,
)
return result
except: # pylint: disable=W0702
except Exception: # pylint: disable=broad-except
error_info = serializable_error_info_from_exc_info(sys.exc_info())
message_queue.put(MultiprocessingError(error_info))
finally:
@@ -4,13 +4,6 @@
from setuptools import find_packages, setup


# pylint: disable=E0401, W0611
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins


def get_version(name):
version = {}
with open("dagster_graphql/version.py") as fp:
@@ -48,7 +48,7 @@ def execute_command_in_child_process(queue, command):
for step_event in command.execute():
queue.put(step_event)
queue.put(ChildProcessDoneEvent(pid=pid))
except: # pylint: disable=bare-except
except Exception: # pylint: disable=broad-except
queue.put(
ChildProcessSystemErrorEvent(
pid=pid, error_info=serializable_error_info_from_exc_info(sys.exc_info())
@@ -205,7 +205,7 @@ def dagster_event_sequence_for_step(step_context, inputs, intermediates_manager)
raise dagster_error

return
except:
except Exception: # pylint: disable=broad-except
error_info = serializable_error_info_from_exc_info(sys.exc_info())
yield DagsterEvent.step_failure_event(
step_context=step_context, step_failure_data=StepFailureData(error=error_info)
@@ -36,9 +36,9 @@ def import_module_from_path(module_name, path_to_file):
# pylint:disable=deprecated-method, no-value-for-parameter
module = SourceFileLoader(module_name, path_to_file).load_module()
else:
import imp
from imp import load_source

module = imp.load_source(module_name, path_to_file)
module = load_source(module_name, path_to_file)

return module

@@ -41,3 +41,22 @@
Sized,
ValuesView,
)

__all__ = [
'Callable',
'Container',
'Hashable',
'ItemsView',
'Iterable',
'Iterator',
'KeysView',
'Mapping',
'MappingView',
'MutableMapping',
'MutableSequence',
'MutableSet',
'Sequence',
'Set',
'Sized',
'ValuesView',
]
@@ -66,7 +66,7 @@ def _unlink_swallow_errors(path):
check.str_param(path, 'path')
try:
os.unlink(path)
except: # pylint: disable=W0702
except Exception: # pylint: disable=broad-except
pass


@@ -4,12 +4,6 @@

from setuptools import find_packages, setup

# pylint: disable=E0401, W0611
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins


def long_description():
here = os.path.abspath(os.path.dirname(__file__))
@@ -3,12 +3,6 @@

from setuptools import find_packages, setup

# pylint: disable=E0401, W0611
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins


def get_version(name):
version = {}
@@ -3,12 +3,6 @@

from setuptools import find_packages, setup

# pylint: disable=E0401, W0611
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins


def get_version(name):
version = {}
@@ -3,12 +3,6 @@

from setuptools import find_packages, setup

# pylint: disable=E0401, W0611
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins


def get_version(name):
version = {}
@@ -3,12 +3,6 @@

from setuptools import find_packages, setup

# pylint: disable=E0401, W0611
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins


def get_version(name):
version = {}
@@ -3,12 +3,6 @@

from setuptools import find_packages, setup

# pylint: disable=E0401, W0611
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins


def get_version(name):
version = {}

0 comments on commit 7874693

Please sign in to comment.
You can’t perform that action at this time.