Skip to content

Commit

Permalink
reviewfix
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-anderson committed Oct 2, 2024
1 parent 4e0799d commit 551a978
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 4 additions & 1 deletion examples/s3_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import pyarrow.fs
import os

# Usage: poetry run python s3_ingest.py s3://<something> [s3://another-thing ...]

# ruff: noqa: E402
sys.path.append("../lib/sycamore")
Expand All @@ -19,6 +18,10 @@

from simple_config import idx_settings, osrch_args, title_template

if len(sys.argv) <= 1 or sys.argv[1] == "-h" or sys.argv[1] == "--help":
print("Usage: poetry run python s3_ingest.py s3://<something> [s3://another-thing ...]")
exit(1)

index = "demoindex0"

if "AWS_SECRET_ACCESS_KEY" in os.environ:
Expand Down
10 changes: 4 additions & 6 deletions lib/sycamore/sycamore/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,12 @@ def recursive_execute(self, n: Node) -> list[Document]:
from sycamore.materialize import Materialize

def get_name(f):
try:
if hasattr(f, "_name"):
return f._name # handle the case of basemap transforms
except AttributeError:
pass
try:

if hasattr(f, "__name__"):
return f.__name__
except AttributeError:
pass

return f.__class__.__name__

if len(n.children) == 0:
Expand Down

0 comments on commit 551a978

Please sign in to comment.