def test_get_dataset_schema(s): destination = FileUtils.get_destination(TEST_RESOURCES, s) schema = None if FileUtils.is_valid_file(destination): schema = DaveEngine.get_dataset_schema(destination) assert schema is not None
def get_dataset_schema(filename, target): destination = get_destination(filename, target) if not destination: return common_error("Invalid file or cache key") schema = DaveEngine.get_dataset_schema(destination) return json.dumps(schema, cls=NPEncoder)
def get_dataset_schema(filename, target): destination = get_destination(filename, target) if not destination: return common_error("Invalid file or cache key, filename: %s" % filename) schema = DaveEngine.get_dataset_schema(destination) return json.dumps(schema, cls=NPEncoder)
def test_get_dataset_schema(s): destination = FileUtils.get_destination(TEST_RESOURCES, s) schema = None if destination: schema = DaveEngine.get_dataset_schema(destination) assert not os.path.isfile(destination) or schema != None
def get_dataset_schema (filename, target): if not filename: return common_error(error = "No filename setted" ) if not session['uploaded_filename'] or session['uploaded_filename'] != filename: return common_error("Filename not uploaded" ) destination = FileUtils.get_destination(target, filename) if not destination: return common_error("Error opening file") schema = DaveEngine.get_dataset_schema(destination) return json.dumps( schema )
def get_dataset_schema(filename, target): if not filename: return common_error(error="No filename setted") if not session['uploaded_filename'] or session['uploaded_filename'] != filename: return common_error("Filename not uploaded") destination = FileUtils.get_destination(target, filename) if not FileUtils.is_valid_file(destination): return common_error("Invalid file") schema = DaveEngine.get_dataset_schema(destination) return json.dumps(schema, cls=NPEncoder)
def get_dataset_schema(filename, target): if not filename: return common_error(error="No filename setted") if not session[ 'uploaded_filename'] or session['uploaded_filename'] != filename: return common_error("Filename not uploaded") destination = FileUtils.get_destination(target, filename) if not destination: return common_error("Error opening file") schema = DaveEngine.get_dataset_schema(destination) return json.dumps(schema)