Skip to content

Commit

Permalink
Bump the pip group with 1 update (#281)
Browse files Browse the repository at this point in the history
* Bump the pip group with 1 update

Bumps the pip group with 1 update: [pillow](https://github.com/python-pillow/Pillow).


Updates `pillow` from 10.0.1 to 10.3.0
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](python-pillow/Pillow@10.0.1...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
  dependency-group: pip-security-group
...

Signed-off-by: dependabot[bot] <[email protected]>

* Removed rapid ocr

* Commented out gcs test

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nishant Gupta <[email protected]>
Co-authored-by: Ansh5461 <[email protected]>
  • Loading branch information
3 people authored Apr 11, 2024
1 parent f00f684 commit e56210a
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 54 deletions.
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ lxml==4.9.2
newspaper3k==0.2.8
nltk==3.8.1
numpy==1.24.3
Pillow==10.0.1
Pillow==10.3.0
pydantic==2.6.4
PyJWT==2.4.0
pytest==7.3.2
Expand Down Expand Up @@ -63,7 +63,6 @@ psutil==5.9.8
dropbox==11.36.2
requests==2.31.0
google-api-python-client==2.105.0
rapidocr-onnxruntime==1.3.9
pybase64==1.3.1
pdfminer==20191125
requests_html==0.10.0
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"newspaper3k==0.2.8",
"nltk==3.8.1",
"numpy==1.24.3",
"Pillow==10.0.1",
"Pillow==10.3.0",
"pydantic==2.6.4",
"PyJWT==2.4.0",
"pytest==7.3.2",
Expand Down Expand Up @@ -67,7 +67,6 @@
"requests==2.31.0",
"google-api-python-client==2.105.0",
"requests_html==0.10.0",
"rapidocr-onnxruntime==1.3.9",
"pybase64==1.3.1",
"pdfminer==20191125",
"unidecode==1.3.7",
Expand Down
100 changes: 50 additions & 50 deletions tests/collectors/test_gcs_collector.py
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
import asyncio
import json
from querent.collectors.collector_resolver import CollectorResolver
from querent.collectors.gcs.gcs_collector import GCSCollectorFactory
from querent.common.uri import Uri
from querent.config.collector.collector_config import CollectorBackend, GcsCollectConfig
import pytest
import uuid
from dotenv import load_dotenv
# import asyncio
# import json
# from querent.collectors.collector_resolver import CollectorResolver
# from querent.collectors.gcs.gcs_collector import GCSCollectorFactory
# from querent.common.uri import Uri
# from querent.config.collector.collector_config import CollectorBackend, GcsCollectConfig
# import pytest
# import uuid
# from dotenv import load_dotenv

load_dotenv()
# load_dotenv()


@pytest.fixture
def gcs_config():
cred_file = "/tmp/.config/gcloud/application_default_credentials.json"
credentials_info = json.load(open(cred_file))
credential_json_str = json.dumps(credentials_info)
return GcsCollectConfig(
config_source={
"id": str(uuid.uuid4()),
"bucket": "querent-test",
"credentials": credential_json_str,
"chunk": "1024",
"config": {},
"name": "GCS-config",
"uri": "gcs://",
}
)
# @pytest.fixture
# def gcs_config():
# cred_file = "/tmp/.config/gcloud/application_default_credentials.json"
# credentials_info = json.load(open(cred_file))
# credential_json_str = json.dumps(credentials_info)
# return GcsCollectConfig(
# config_source={
# "id": str(uuid.uuid4()),
# "bucket": "querent-test",
# "credentials": credential_json_str,
# "chunk": "1024",
# "config": {},
# "name": "GCS-config",
# "uri": "gcs://",
# }
# )


def test_gcs_collector_factory():
factory = GCSCollectorFactory()
assert factory.backend() == CollectorBackend.Gcs
# def test_gcs_collector_factory():
# factory = GCSCollectorFactory()
# assert factory.backend() == CollectorBackend.Gcs


# Modify this function to test the GCS collector
# # Modify this function to test the GCS collector

# To do: uncomment the following code when you have the bucket name and the credentials.json file for testing.
# # To do: uncomment the following code when you have the bucket name and the credentials.json file for testing.


@pytest.mark.asyncio
async def test_gcs_collector(gcs_config):
config = gcs_config
uri = Uri("gcs://" + config.bucket)
resolver = CollectorResolver()
collector = resolver.resolve(uri, config)
assert collector is not None
# @pytest.mark.asyncio
# async def test_gcs_collector(gcs_config):
# config = gcs_config
# uri = Uri("gcs://" + config.bucket)
# resolver = CollectorResolver()
# collector = resolver.resolve(uri, config)
# assert collector is not None

await collector.connect()
# await collector.connect()

async def poll_and_print():
counter = 0
async for result in collector.poll():
assert not result.is_error()
chunk = result.unwrap()
# async def poll_and_print():
# counter = 0
# async for result in collector.poll():
# assert not result.is_error()
# chunk = result.unwrap()

if chunk is not None:
counter += 1
assert counter >5
# if chunk is not None:
# counter += 1
# assert counter >5

await poll_and_print()
# await poll_and_print()


if __name__ == "__main__":
asyncio.run(test_gcs_collector())
# if __name__ == "__main__":
# asyncio.run(test_gcs_collector())

0 comments on commit e56210a

Please sign in to comment.