diff --git a/luigi/__init__.py b/luigi/__init__.py index 7e80b2023e..1b92384d97 100644 --- a/luigi/__init__.py +++ b/luigi/__init__.py @@ -35,8 +35,7 @@ DateParameter, MonthParameter, YearParameter, DateHourParameter, DateMinuteParameter, DateSecondParameter, DateIntervalParameter, TimeDeltaParameter, IntParameter, FloatParameter, BooleanParameter, BoolParameter, - TaskParameter, EnumParameter, DictParameter, ListParameter, TupleParameter, - InputFileParameter, OutputFileParameter + TaskParameter, EnumParameter, DictParameter, ListParameter, TupleParameter ) from luigi import configuration @@ -58,6 +57,5 @@ 'DateIntervalParameter', 'TimeDeltaParameter', 'IntParameter', 'FloatParameter', 'BooleanParameter', 'BoolParameter', 'TaskParameter', 'ListParameter', 'TupleParameter', 'EnumParameter', 'DictParameter', - 'configuration', 'interface', 'file', 'run', 'build', 'event', 'Event', - 'InputFileParameter', 'OutputFileParameter' + 'configuration', 'interface', 'file', 'run', 'build', 'event', 'Event' ] diff --git a/luigi/parameter.py b/luigi/parameter.py index 1ef13b68e5..4db3096aec 100644 --- a/luigi/parameter.py +++ b/luigi/parameter.py @@ -29,7 +29,6 @@ import operator import functools from ast import literal_eval -import os try: from ConfigParser import NoOptionError, NoSectionError @@ -960,38 +959,3 @@ def serialize(self, x): :param x: the value to serialize. """ return json.dumps(x) - - -class InputFileParameter(Parameter): - """ - Paramater whose value is an existing file. - """ - - def parse(self, s): - """ - Returns the real path to the file from the string if it exists. - """ - if os.path.isfile(s): - return os.path.realpath(s) - else: - raise OSError("{s} does not exist".format(s=s)) - - -class OutputFileParameter(Parameter): - """ - Parameter whose value is an output file to be created. - """ - - def parse(self, s): - """ - Returns the real path to the file and attempts to create any directories - needed. - """ - s = os.path.realpath(s) - if not os.path.isdir(os.path.dirname(s)): - try: - os.makedirs(os.path.dirname(s)) - except OSError: - raise OSError("could not make parent directories for {s}".format( - s=s)) - return s