Skip to content
Open

cli #45

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: |
pip install uv
uv venv
uv pip install -e .[dev] || echo "No dev extra"
uv pip install -e .[dev,cli] || echo "No dev extra"
echo "Dependencies installed successfully"

- name: Setup git
Expand Down
6 changes: 5 additions & 1 deletion bib_dedupe/bib_dedupe.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import bib_dedupe.merge
import bib_dedupe.prep
from bib_dedupe import verbose_print
from bib_dedupe.constants.fields import ORIGIN


def prep(
Expand Down Expand Up @@ -147,6 +148,7 @@ def merge(
matched_df: typing.Optional[pd.DataFrame] = None,
duplicate_id_sets: typing.Optional[list] = None,
verbosity_level: typing.Optional[int] = None,
origin_column: str = ORIGIN,
) -> pd.DataFrame:
"""
Merges duplicate records in the given dataframe.
Expand All @@ -173,7 +175,9 @@ def merge(
matched_df = match(blocked_df)
duplicate_id_sets = bib_dedupe.cluster.get_connected_components(matched_df)

return bib_dedupe.merge.merge(records_df, duplicate_id_sets=duplicate_id_sets)
return bib_dedupe.merge.merge(
records_df, duplicate_id_sets=duplicate_id_sets, origin_column=origin_column
)


def _download_file_from_github(url: str, local_path: str) -> None:
Expand Down
Loading