Giter VIP home page Giter VIP logo

Comments (6)

tovrstra avatar tovrstra commented on May 28, 2024

Yes, importlib is good.

from iodata.

tczorro avatar tczorro commented on May 28, 2024
  1. keep get_fn, but replace the implementation with importlib
  2. complete remove get_fn and use importlib to handle "data", but return a β€œstr” path
  3. change the IO in iodata so it can handle Path file as well.
    To which level you guys would prefer.

from iodata.

tovrstra avatar tovrstra commented on May 28, 2024

I'm not sure what you mean by Path file? I think option 2 is the best one, relatively little work and getting rid of redundant code.

from iodata.

tczorro avatar tczorro commented on May 28, 2024

importlib returns a Path object, so I am not sure where to convert it to str. It can be done in the tests, or it can be done in the IO functions, which allows those functions to handle Path object as well

from iodata.

tovrstra avatar tovrstra commented on May 28, 2024

Oh I see. Converting it to string in the test (as in Chemtools) seems is fine for now. Future changes will make IOData compatible with Path objects (#6), so no need to worry about it now.

from iodata.

tczorro avatar tczorro commented on May 28, 2024

I just reverted all the necessary update I made, only keeping the parts related to this issue.

from iodata.

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.