Coder Social home page Coder Social logo

advestis / transparentpath Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 2.0 7.26 MB

A class that allows one to use a path in a local file system or a gcs file system (more or less) in almost the same way one would use a pathlib.Path object.

License: GNU General Public License v3.0

Dockerfile 0.07% Python 99.93%
google-cloud-platform python

transparentpath's People

Contributors

actions-user avatar aducourthial avatar pcdesforges-advestis avatar wmarechal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

transparentpath's Issues

Is there a way to build absolute paths from TransparentPath objects?

I'm trying to build complete path filenames from TransparentPath objects as functions I'm trying to use are expecting path strings.

Ideally I would call a method like path.absolute to get "/my/absolute/path/filename" if local or "gs://my-bucket/filename" if GCS.

For the moment I've coded this functionality as :

base_dir = Path("/images/tfrecords")
TRAIN_FILENAMES = base_dir.glob("train*.*")
prefix = "gs://" if FS == 'gcs' else ''
TRAIN_FILENAMES = [prefix + base_dir.path.as_posix() + "/" + el.name for el in TRAIN_FILENAMES]

Maybe there is a way to do it already that I don't know?
Thanks for your repo!

conflict with fsspec version required by gcsfs

Hello! There is a conflict between the versions of fsspec required by the most recent gcsfs and transparentpath. In particular, gcsfs==2022.2.0 depends on fsspec==2022.02.0 and transparentpath depends on fsspec==2021.10.0. Hopefully this is a quick fix. Thanks for this project, by the way, it's super helpful!

feature request - add ability to specify project

I'm getting :

  File "/usr/local/lib/python3.6/dist-packages/transparentpath/gcsutils/transparentpath.py", line 625, in set_global_fs
    raise ValueError("Need to provide a project name!")

I don't see a way to let transparent path know which project I'd like to use other than using a token

Handle dual token connections

dans le même script j'ai set deux token pour Path. Quand je la lance sans la variable GOOGLE_CRED ça ne marche pas sur la lecture des fichiers sand, mais quand je set GOOGLE_CRED avec le token dev, ça marche.

Loosen fsspec==2022.2.0 and gcsfs==2022.2.0

fsspec==2022.2.0 is causing issues with more updated versions of s3fs. Can this dependency please be loosened. Requesting that we do the same for gcsfs==2022.2.0

ERROR: Cannot install -r requirements.txt (line 10), -r requirements.txt (line 5) and transparentpath==1.1.38 because these package versions have conflicting dependencies.

The conflict is caused by:
    dask 2023.9.2 depends on fsspec>=2021.09.0
    s3fs 2023.9.2 depends on fsspec==2023.9.2
    transparentpath 1.1.38 depends on fsspec==2022.2.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

read_bytes not supported

how can I "read bytes" - this seems like he most basic functionality of path pretty much. how have you implemented the other functionalities with out using "read_bytes"?

Add clickable link

Extract clickable link from FinObject and make it a transparentpath attribute

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.