Giter VIP home page Giter VIP logo

Comments (12)

scottransom avatar scottransom commented on September 4, 2024

Sorry for the delay... I've been traveling and am slowly digging myself out of email backlog. Yeah, I think this sounds like a pretty good idea. Have you (or anyone else?) taken a look as to how much work this would require?

from presto.

gijzelaerr avatar gijzelaerr commented on September 4, 2024

hi @scottransom, no problem thanks for replying.

I made the package now in such a way that all python files are installed into a presto package inside the default search path. Since some python files in presto expect the presto python modules to be in the root of the python path, one needs to manually add the presto python package to the python root. The long term and right solution here is to modify the presto code to load the modules from the presto module, not the root. This is the 'pythonic' way to do things.

I'm no presto expert, but I asked somebody to try to get the presto package working. It looks like everything works, as long as you manually set the python path.

If we modify the Python code, the presto package would just run out of the box. I think this is also a good first step into cleanup presto up, I think the installation procedure can be simplified. Problem is that if we install the presto python modules into a presto module (which is the right thing to do) exciting scripts will fail for people. But this is something we could write into a changelog which is bundles with a release.

If you want I can help you out modifying the code. But if we do I strongly recommend you start introducing versioning to this presto repository. I only see one 0.2 release from 2.5 years ago. I suggest you just make a release now, and we make a release after the Python modifications.

from presto.

gijzelaerr avatar gijzelaerr commented on September 4, 2024

We now patch the original source to use the presto package:

https://github.com/kernsuite-debian/presto/blob/master/debian/patches/presto_package

from presto.

gijzelaerr avatar gijzelaerr commented on September 4, 2024

hi @scottransom is it an idea to try to pick this up again? the KERN packages have been used for a while now, and moving a presto python code into a presto python module is a requirement to package up presto properly. I'm shipping a patched presto based on a module and as far as I know it works quite well, but the changes get out of sync over time.

from presto.

scottransom avatar scottransom commented on September 4, 2024

hi @gijzelaerr Yeah, I think this makes sense. I'm in the middle of a big PR to get PRESTO working in Python2 and Python3 (see #90 ), and hopefully we can make this a part of that big change. Do you know if your changes will work with Py3?

from presto.

gijzelaerr avatar gijzelaerr commented on September 4, 2024

hi @scottransom my changes definitely will work with Python3, and i'll fix the python3 issues where I'll encounter them. I'm going to sit down for this next week Wednesday for a day. In what time zone are you? Maybe good if I can ask you some questions during the refactor?

from presto.

scottransom avatar scottransom commented on September 4, 2024

I'm in the US Eastern. So we are currently 4 hours behind UTC. Am happy to handle questions about the refactor.

from presto.

gijzelaerr avatar gijzelaerr commented on September 4, 2024

ok well, I'll just get started on Wednesday and then around the time you wake up, I might some questions. I'm in central europe time, UCT+1.

my goals are:

  • move all python code to a presto module
  • make the installation procedure more pythonic
  • improve/maintain python3 support while keeping python 2 support.

If there is time left I will:

  • examine the code using static code analysis and try to find/fix bugs.

from presto.

gijzelaerr avatar gijzelaerr commented on September 4, 2024

I see now you have already been very busy with adding python3 support in the python3 branch. Maybe best to merge that in first. What is the status of this work now?

from presto.

gijzelaerr avatar gijzelaerr commented on September 4, 2024

ah well i'll base it on the python3 branch then.

from presto.

gijzelaerr avatar gijzelaerr commented on September 4, 2024

this is implemented in this PR #94

from presto.

gijzelaerr avatar gijzelaerr commented on September 4, 2024

this issue has been resolved! Thanks!

from presto.

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.