Skip to content

Commit

Permalink
[origina nodes][s]: bring back source/tabular as frontend depends on it
Browse files Browse the repository at this point in the history
  • Loading branch information
zelima committed Mar 7, 2018
1 parent 8cf8c6a commit 5970e96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
10 changes: 4 additions & 6 deletions planner/nodes/basic_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,17 @@ def __init__(self, available_artifacts, outputs):

def get_artifacts(self):
for artifact in self.available_artifacts:
if artifact.datahub_type == 'original':
datahub_type = artifact.datahub_type
resource_name = artifact.resource_name.replace('_original', '')
if artifact.datahub_type == 'original' or artifact.datahub_type == 'source/tabular':
output = ProcessingArtifact(
datahub_type, resource_name,
artifact.datahub_type, artifact.resource_name,
[], [artifact],
[('assembler.update_resource',
{
'name': artifact.resource_name,
'update': {
'name': resource_name,
'name': artifact.resource_name,
'datahub': {
'type': datahub_type
'type': artifact.datahub_type
}
}
})],
Expand Down
7 changes: 2 additions & 5 deletions planner/nodes/output_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@ def get_artifacts(self):
random.randrange(1000), out_file))
datahub_type = 'derived/{}'.format(self.fmt)
resource_name = out_file.replace('.', '_')
# Exclude source/tabular as in zip it's duplicate of derived/csv
artifacts = [
a for a in self.available_artifacts if a.datahub_type != 'source/tabular'
]

output = ProcessingArtifact(
datahub_type, resource_name,
[], artifacts,
[], self.available_artifacts,
[('assembler.extract_readme', {}),
('assembler.remove_hash', {}),
('dump.to_zip', {
Expand Down

0 comments on commit 5970e96

Please sign in to comment.