Skip to content

Commit

Permalink
Finish hooks for checking extra fields
Browse files Browse the repository at this point in the history
  • Loading branch information
amc-corey-cox committed Nov 12, 2024
1 parent 9b376a2 commit 6f63afa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/koza/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,14 @@ def write(self, *entities):

self.writer.write(entities)

def _get_writer(self) -> Union[TSVWriter, JSONLWriter]:
def _get_writer(self) -> KozaWriter:
writer_params = [
self.output_dir,
self.source.config.name,
self.source.config.node_properties,
self.source.config.edge_properties,
self.source.config.sssom_config,
self.source.config.check_fields,
]
if self.output_format == OutputFormat.tsv:
return TSVWriter(*writer_params)
Expand Down
1 change: 1 addition & 0 deletions src/koza/model/config/source_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ class PrimaryFileConfig(SourceConfig):
# edge_report_columns: Optional[List[str]] = None
depends_on: List[str] = field(default_factory=list)
on_map_failure: MapErrorEnum = MapErrorEnum.warning
check_fields: bool = False


@dataclass(config=PYDANTIC_CONFIG)
Expand Down

0 comments on commit 6f63afa

Please sign in to comment.