Giter VIP home page Giter VIP logo

Comments (1)

brl0 avatar brl0 commented on August 16, 2024

There is a difference between fsspec glob syntax and pathlib glob syntax, as noted in the example notebook (link added):

The glob method is also available for most filesystems. Note the syntax here is as detailed in fsspec docs, rather than that of pathlib.

The fsspec implementation has some issues, see fsspec/filesystem_spec#1019, which seems like it may be the root cause.

Based on some limited testing, the pattern /**/* seems to be treated by fsspec as an absolute path within the bucket, so it may only be a circumstantial work around if you are operating at the root of the bucket, and pathlib doesn't even accept the pattern because it says only relative patterns are accepted. There is possibly a separate bug in fsspec, because the resulting paths are incorrectly assembled.

Open PR #96 includes an improved rglob, which might be a better work around for this issue once it gets merged.

I think that addressing the issues mentioned here should happen in the fsspec implementation. I am not sure if the fsspec behavior is intended to differ from pathlib. If not, then fixing that is what is needed, but if the difference is intended, then maybe some consideration ought to be given to implementing a more pathlib compliant approach here, and I could see reasons to go either way.

Hope this helps.

from universal_pathlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.