Skip to content

Commit

Permalink
Fix - Google Drive Issue of not loading same name files (#12022)
Browse files Browse the repository at this point in the history
  • Loading branch information
ammirsm authored Mar 19, 2024
1 parent b8717bb commit 9c1d1db
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ poetry_requirements(
"google-auth-oauthlib": ["google_auth_oauthlib"],
},
)

python_requirements(
name="reqs",
)
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,12 @@ def get_metadata(filename):
metadata = {}

for fileid_meta in fileids_meta:
filename = fileid_meta[2]
filepath = os.path.join(temp_dir, filename)
# Download files and name them with their fileid
fileid = fileid_meta[0]
filepath = os.path.join(temp_dir, fileid)
final_filepath = self._download_file(fileid, filepath)

# Add metadata of the file to metadata dictionary
metadata[final_filepath] = {
"file id": fileid_meta[0],
"author": fileid_meta[1],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ maintainers = [
]
name = "llama-index-readers-google"
readme = "README.md"
version = "0.1.6"
version = "0.1.7"

[tool.poetry.dependencies]
python = ">=3.10,<4.0"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
python_tests(
interpreter_constraints=["==3.10.*"],
)
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from llama_index.core.readers.base import BaseReader
from llama_index.readers.google import GoogleDriveReader


def test_class():
names_of_base_classes = [b.__name__ for b in GoogleDriveReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes

0 comments on commit 9c1d1db

Please sign in to comment.