Skip to content
Merged
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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ dependencies = [
"pydantic~=2.10.6",
"requests~=2.32.3",
"typer[all]~=0.9.0",
"xlsxwriter~=3.2.0",
]
requires-python = ">=3.9"
classifiers = [
Expand Down
233 changes: 0 additions & 233 deletions src/bibx/algorithms/preprocess.py

This file was deleted.

31 changes: 0 additions & 31 deletions src/bibx/cli.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import logging
from collections.abc import Callable
from enum import Enum
from typing import TextIO

import networkx as nx
import typer
Expand All @@ -14,10 +12,8 @@
read_scopus_ris,
read_wos,
)
from bibx.algorithms.preprocess import Preprocess
from bibx.algorithms.sap import Sap
from bibx.builders.openalex import EnrichReferences
from bibx.collection import Collection

app = typer.Typer()

Expand Down Expand Up @@ -100,32 +96,5 @@ def openalex(
rprint(graph)


def _read_many(
reader: Callable[[TextIO], Collection],
*filenames: str,
) -> Collection:
first, *rest = filenames
with open(first) as f:
collection = reader(f)
for filename in rest:
with open(filename) as f:
collection = collection.merge(reader(f))
return collection


@app.command()
def preprocess(
output: str,
wos: list[str] = typer.Option(help="WoS files to pre process"),
scopus: list[str] = typer.Option(help="scopus files to preprocess"),
) -> None:
"""Preprocesses a collection."""
wos_collection = _read_many(read_wos, *wos)
scopus_collection = _read_many(read_scopus_ris, *scopus)
p = Preprocess(wos_collection, scopus_collection)
p.create_workbook(output)
rprint(f":boom: workbook created at {output}")


if __name__ == "__main__":
app()
6 changes: 0 additions & 6 deletions stubs/xlsxwriter/__init__.pyi

This file was deleted.

8 changes: 0 additions & 8 deletions stubs/xlsxwriter/worksheet.pyi

This file was deleted.