Prepare wikiq for release: fixes, dependency cleanup, and packaging #2
@@ -122,8 +122,10 @@ def build_table(
|
||||
"""Build the RevisionTable with appropriate columns based on flags.
|
||||
|
||||
Returns:
|
||||
(table, reverts_column) - the table and a reference to the reverts column
|
||||
(which process() needs for setting the revert detector).
|
||||
(table, reverts_column, wikitext_parser) - the table, a reference to
|
||||
the reverts column (which process() needs for setting the revert
|
||||
detector), and the wikitext parser (None unless a wikitext-parsing
|
||||
column was requested).
|
||||
"""
|
||||
reverts_column = tables.RevisionReverts()
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ setup()
|
||||
|
||||
def read_jsonl_with_schema(filepath: str, **schema_kwargs) -> pd.DataFrame:
|
||||
"""Read JSONL file using PyArrow with explicit schema from wikiq."""
|
||||
table, _ = build_table(**schema_kwargs)
|
||||
table, _, _ = build_table(**schema_kwargs)
|
||||
schema = build_schema(table, **schema_kwargs)
|
||||
pa_table = pj.read_json(
|
||||
filepath,
|
||||
|
||||
Reference in New Issue
Block a user