From ef660c924067241bc8813aee7bd633ecc072c5f5 Mon Sep 17 00:00:00 2001 From: Ryan Heuser Date: Tue, 5 Dec 2023 12:03:48 -0500 Subject: [PATCH] minor --- ppa/archive/management/commands/generate_textcorpus.py | 3 --- ppa/archive/tests/test_generate_textcorpus.py | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ppa/archive/management/commands/generate_textcorpus.py b/ppa/archive/management/commands/generate_textcorpus.py index 3366121d..de0e2a90 100644 --- a/ppa/archive/management/commands/generate_textcorpus.py +++ b/ppa/archive/management/commands/generate_textcorpus.py @@ -5,7 +5,6 @@ """ import os -import jsonlines import json from django.core.management.base import BaseCommand from ppa.archive.models import DigitizedWork @@ -73,7 +72,6 @@ def get_query(order=True): q=get_query(order=True) q.set_limits(step, step+batch_size) for d in q: - print(d) yield d def handle(self, *args, **options): @@ -82,7 +80,6 @@ def handle(self, *args, **options): """ # options path = options['path'] - print(options) doclimit = options['doc_limit'] if options['doc_limit']>0 else None progress = options['verbosity']>0 batch_size = options['batch'] diff --git a/ppa/archive/tests/test_generate_textcorpus.py b/ppa/archive/tests/test_generate_textcorpus.py index cab3cf3f..223ab5b0 100644 --- a/ppa/archive/tests/test_generate_textcorpus.py +++ b/ppa/archive/tests/test_generate_textcorpus.py @@ -3,10 +3,7 @@ from django.core.management import call_command from django.core.management.base import CommandError import os -import jsonlines,json - -# mock results for acet query used to get document IDs and page counts -mock_solr_facets = {"group_id_s": {"doc_1": 2, "doc_2": 1}} +import json # mock result for solr document data mock_solr_docs = [