Coder Social home page Coder Social logo

Comments (21)

harelba avatar harelba commented on May 12, 2024

Acked. I have plans for it in the near future.

Thanks

from q.

hannes-brt avatar hannes-brt commented on May 12, 2024

+1

from q.

webmaven avatar webmaven commented on May 12, 2024

👍

from q.

harelba avatar harelba commented on May 12, 2024

I see there is high demand for it :)

I'll try to make room for it so it wlil go into the upcoming 1.5.0 version (due in a couple of weeks).

I'll update here.

Harel

from q.

harelba avatar harelba commented on May 12, 2024

I've created an API which will allow working with q from inside python programs. I'll upload an alpha version to the master branch in the coming day or two.

Hopefully, it'll be good enough to be released as part of the upcoming 1.5.0 version. Once it is good enough, I'll also finish the job of making qtextasdata a proper pypi module so it can be installed through pip.

Any comments regarding it will be most appreciated.

from q.

harelba avatar harelba commented on May 12, 2024

Alpha branch of the python api has been committed to https://github.com/harelba/q/tree/expose-as-python-api.

Hopefully, I'll find a good way to make this a proper pypi package without needing to replace all the installation code. If I manage to do that, then this addition will come out in the coming 1.5.0 version.

Any input would be helpful and appreciated.

Harel

from q.

harelba avatar harelba commented on May 12, 2024

Forgot to write - The readme file of the branch contains the required information about the API.

from q.

webmaven avatar webmaven commented on May 12, 2024

What if you split the q python package into a pypi installable package (although q is taken), and then made it a dependency of the system installable q-text-as-data?

from q.

harelba avatar harelba commented on May 12, 2024

Writing the same response here, for other people as well.

That's what probably I'll do eventually if there is no other option, but that's exactly what I wanted to prevent - Doing that would require fixing all the installation code for homebrew/rpm/debian/arch, and I would really like to find a good way to work around doing that, since it will postpone the time the API support will be released.

from q.

webmaven avatar webmaven commented on May 12, 2024

OK, how about this then:

Split the q python package into a pypi installable package, and then pull it in here as a git submodule, rather than as a system package or Python dependency?

from q.

harelba avatar harelba commented on May 12, 2024

Let's decide that all the discussions regarding this subject will continue here on this issue's comments.

@webmaven , this might be a good idea regardless of the issue at hand, but it won't prevent the need to rewrite all installations.

One of the complications in it being a python module is that you need pip to be installed on the user's machine. Another idea would be to have the module code reside in some private directory which only q (the command line interface) would know about.

I'm starting to think that rewriting the installations would be a must. In that case, I would prefer to try again to provided a binary compiled version of q. However, when I tried it in the past it "almost worked". Everything worked well, but there were some GLIBC versioning issues with old Linux machines.

If you have experience with compiling python for old linux machines using PyInstalled, any information about it would be great.

Harel

from q.

webmaven avatar webmaven commented on May 12, 2024

A python distributable package is just a package directory (or module) nested in another directory with a bunch of extra stuff, which can easily be ignored.

So if the package is in it's own repo, I think that making it a submodule of this one should prevent most rewriting. It certainly won't need to be pip installed.

from q.

harelba avatar harelba commented on May 12, 2024

Maybe I'm missing a part of your point, @webmaven, but there's another implicit requirement for this - The need not to duplicate any code. I don't want the executable "q" to contain the same code of the qtextasdata python module. Does what you're suggesting cover this?

from q.

webmaven avatar webmaven commented on May 12, 2024

A git submodule is basically transcluded, you need ever only edit the python code once, in either location, but you would be publishing it twice, as both an exectuable command and as an installable python module. Which is your concern?

from q.

harelba avatar harelba commented on May 12, 2024

Thanks, I believe I see your point. I'll take a look at it.

from q.

harelba avatar harelba commented on May 12, 2024

As part of the 1.5.0 release that I've released today, the q command line now uses a full-blown python module and API behind the scenes.

Exposing it as a PyPI python module will be a separate phase, after reviews by the community of the new API.

You can take a look at the python API here. Any comments would be most appreciated.

from q.

Flimm avatar Flimm commented on May 12, 2024

I haven't looked over it in detail, but I would recommend going ahead and putting on Pypi before someone else grabs the name q.

... too late, looks like someone already has grabbed the name q.

from q.

webmaven avatar webmaven commented on May 12, 2024

@Flimm:

... too late, looks like someone already has grabbed the name q.

Yes, I noted that upthread: #24 (comment)

from q.

webmaven avatar webmaven commented on May 12, 2024

Any suggestions for a different package name?

from q.

bitti avatar bitti commented on May 12, 2024

qlib? But the confusion with Qt related libs might be too great. So qapi?

from q.

webmaven avatar webmaven commented on May 12, 2024

qball, quirk, qlever, qore, etc.?

from q.

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.