Code Monkey home page Code Monkey logo

Comments (5)

jreades avatar jreades commented on July 3, 2024

It looks to me like read_nb is the key thing here in terms of enabling remote files to be used — this makes a call to:

# Read-only in UTF-8, note NO_CONVERT.
with io.open(nb, 'r', encoding='utf8') as f:
 nb = nbformat.read(f, nbformat.NO_CONVERT)

If that can work with remote files then this is a trivial fix. If it can’t then we’d probably just want to download and save a copy to a local temp directory.

The other thing I can see is that the ‘src’ attribute needs some thought as I’m not sure that we had envisioned a remote URL then calling other notebooks to be included. This should be solvable if the general problem is solvable (you just need to remember to check if src is local or remote and then parse the includes accordingly) but as with all things that seem easy a lot will depend on whether I came up with an elegant solution to this back in the day.

from geopyter.

sjsrey avatar sjsrey commented on July 3, 2024

I think we can handle this as we can test for the scheme in the opener and dispatch accordingly.
On a related note, urllib has undergone major refactoring between python2 and python3. We started with python2 for this project but I think we might want to revisit that decision as a lot content is now python3 only. We probably don't want to have two versions of gp, or one version that can support 2 and 3 (having scars that are still not healed from the pysal 2 to 3 transition).

from geopyter.

jreades avatar jreades commented on July 3, 2024

from geopyter.

sjsrey avatar sjsrey commented on July 3, 2024

Cool. I'll work on refactoring to 3 only and handling the remote v. local reads.

from geopyter.

jreades avatar jreades commented on July 3, 2024

Resolved. Though I think it still outputs a message the remote reads aren't supported.

from geopyter.

Related Issues (14)

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.