xetdata / pyxet

Python SDK for XetHub
https://xethub.com/
BSD 3-Clause "New" or "Revised" License
48 stars 8 forks source link

xet_fs.cp does not handle local files. #70

Closed hoytak closed 1 year ago

hoytak commented 1 year ago

I would expect this to work:

    xet_fs = pyxet.XetFS()

    with xet_fs.transaction: 
        print("In transaction:")
        print(f"copying: {local_filename} to {xet_path}.")
        xet_fs.cp(local_filename, xet_path)

But it just fails with

ValueError: Invalid Xet URL format: Expecting xet://user/repo/[branch]/[path]

And no additional information.

ylow commented 1 year ago

cp is only for remote to remote. local to remote is put. This is an fsspec method.