Changeset View
Changeset View
Standalone View
Standalone View
swh/graph/luigi/compressed_graph.py
Show First 20 Lines • Show All 307 Lines • ▼ Show 20 Lines | Example invocation:: | ||||
--local-graph-path=graph/ \ | --local-graph-path=graph/ \ | ||||
--s3-graph-path=s3://softwareheritage/graph/swh_2022-11-08/compressed/ | --s3-graph-path=s3://softwareheritage/graph/swh_2022-11-08/compressed/ | ||||
""" | """ | ||||
local_graph_path = luigi.PathParameter() | local_graph_path = luigi.PathParameter() | ||||
s3_graph_path = S3PathParameter(significant=False) | s3_graph_path = S3PathParameter(significant=False) | ||||
def requires(self) -> List[luigi.Task]: | def requires(self) -> List[luigi.Task]: | ||||
"""Returns a :class:`ExportGraph` task that writes local files at the | """Returns a :class:`UploadGraphToS3` task that writes local files to S3.""" | ||||
expected location.""" | |||||
return [ | return [ | ||||
UploadGraphToS3( | UploadGraphToS3( | ||||
local_graph_path=self.local_graph_path, | local_graph_path=self.local_graph_path, | ||||
s3_graph_path=self.s3_graph_path, | s3_graph_path=self.s3_graph_path, | ||||
) | ) | ||||
] | ] | ||||
def output(self) -> List[luigi.Target]: | def output(self) -> List[luigi.Target]: | ||||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |