ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

1 July 2020
2020-07-01×
1 July 2020
J
@cmaureir I want to push to gerrit an update to a patch but it always create a new one. how to do it ?
Gerrit works like that
will build the docs with both patches, to check how they look like
Фотография
click to show
Фотография
click to show
Jim
maybe you'd need to download the images to do some zoom and stuff
if it looks good, I'll ask some people from the documentation team to look at it, so we can merge soon
(you can move it from the web iterface)
C
Фотография
click to show
while clicking on the 3 vertical dots
J
by the way I tried to build pyside by myself to look at the changes in the doc but it always fails on this error : No such file or directory: '/home/jimmy/dev/bla/pyside /.venv3_install/py3.7-qt5.15.0-64bit-release/bin/rcc': '/home/jimmy/dev/bla/pyside/.venv3_install/py3.7-qt5.15.0-64bit-release/bin/rcc'https://pastebin.com/1RnvUY53
C
try the "—no-examples" option
ok it works but I can't find the builded doc 🙈😵
J
I jsut discovered briefcase has new command to setup a new project, and it turns out that it proposes PySyde2 has possible GUI. i'll add it to the doc
to generate the html
C
and having sphinx installed
J
Фотография
click to show
you can see a message during the build that says something like "sphinx found" or something related to "docs"
but maybe something a bit more complex like:
C
GIF
out.mp4 · 89 KB · click to show
damn no online doc with python3.7 setup.py install --qmake 5.15.0/gcc_64/bin/qmake --parallel=12 --no-examples --doc-build-online only shiboken doc is generated: (.venv) jimmy@cacahuete:~/dev/bla/pyside$ ls -aR .venv3* | grep html html .venv3_build/py3.7-qt5.15.0-64bit-release/shiboken2/doc/html: considerations.html gettingstarted.html index.html py-modindex.html search.html shibokengenerator.html shibokenmodule.html typesystem_arguments.html typesystem_codeinjection.html typesystem_conversionrule.html typesystem_converters.html typesystem_documentation.html typesystem.html typesystem_manipulating_objects.html typesystem_modify_function.html typesystem_ownership.html typesystem_sequenceprotocol.html typesystem_solving_compilation.html typesystem_specifying_types.html typesystem_templates.html typesystem_variables.html .venv3_build/py3.7-qt5.15.0-64bit-release/shiboken2/doc/html/.doctrees: .venv3_build/py3.7-qt5.15.0-64bit-release/shiboken2/doc/html/.doctrees/examples: .venv3_build/py3.7-qt5.15.0-64bit-release/shiboken2/doc/html/examples: index.html samplebinding.html .venv3_build/py3.7-qt5.15.0-64bit-release/shiboken2/doc/html/_images: .venv3_build/py3.7-qt5.15.0-64bit-release/shiboken2/doc/html/_sources: .venv3_build/py3.7-qt5.15.0-64bit-release/shiboken2/doc/html/_sources/examples: .venv3_build/py3.7-qt5.15.0-64bit-release/shiboken2/doc/html/_static:
J
pff I'm happy to contribute but it's just so a mess to just add a line in the doc and see the result before pushing. Can't it really be much simplier ?
once you generate the docs on the build, you need to generate the html files
so you need to go inside the build directory
then pyXXX....../pyside2/
and do a make apidoc there
1. generate all the WebXML files from the Qt modules you are building 2. generate all the local documentation based on .rst files that we have in the repo 3. transform the WebXML files into HTML and add them to the generated documentation from step (2) <- this is the make apidoc
Since i didn't build the docs for every single module, what I did was to build pyside only for Core: --module-subset=Core
so both steps (1) and (3) are faster than using the whole thing
J
Ссылка
click to show
no offense but I give up. I read https://doc.qt.io/qtforpython/gettingstarted.html#building-the-documentation , I bothered you many times and I still can't build this fucking doc (some new error that I won't share). So if push some new other changes, I'll push having no idea of what it could looks like. I have no idea how to solve the doc toolchain but as you write it I see how complex it is. Let me take a step back about all this thing: - Pyside is mainly used( I think) by people from the python community. - We (python community) usually contribute to project by forking a repo, make change, push et open a PR. Thats all. Sometimes we don't clone the repo locally simply editing doc online - One day you say "pyside is cool", I'm happy to do a small contribution, but you don't now what's in front of you: create account, accept conditions, sshkeys, discover gerrit, discover gira, read 3 or 4 pages of manuel, to configure locally, trying to push, install the precommit thing, re trying to push. But you pushed some ugly thing because you didn't test it. Then you say : "If I change the doc I'm gonna build it before next push". So you read 3 or 4 others doc pages, make some google search, ask nice people for help. But no it won't work. You spent hours just to add 2 lines in the docs. You feel bad. - me eye on it : maybe all those things are usual and basics in C++ world but really it's very disturbing for "usual" python user. - pyside is supported by a Company and would need to build a big community but with all those pains it'll be hard. - I would add that python users without real C++ background can quite only contribute in docs. So I'm pretty sure that if building docs means always "all those not so easy building steps" they won't help. - Is it not possible to split the "standard doc" outside the "apidoc modules" and run pyton setup.p make_doc or something like that ?
Jimno offense but I give up. I read https://doc.qt.io/qtforpython/gettingstarted.html#building-the-documentation , I bothered you many times and I still can't build this fucking doc (some new error that I won't share). So if push some new other changes, I'll push having no idea of what it could looks
Jim gerrit is not only used by the Qt company, I think you realize that. it's actually one of the most used tools for code contribution in big enterprises. I also think that Qt should follow other hub style of projects like gitlab or github. But historically this already happened, and it was a fiasco (Qt was the first major software to join a hub like platform, gitorious.org - nothing worked as planned).
maybe the Qt guys could revisit this for Qt 6? I would like that, but I doubt.
when you talk about the python community, you are talking just to the python community that uses github aparnetly - as many applications in sourceforge and other agregators don't use the fork style.
T
I understand the frustration, but I also need to point that software development needs to adapt to tooling, and gerrit is not hard.
J
Ссылка
click to show
I have nothing against gerrit. it's just "one other step" around other things. you inspired my curiosity how I'm maybe too github "focused". I quickly looked at https://hugovk.github.io/top-pypi-packages/ and look at 40 first packages. only 4 are outside github. I should have bought it before microosoft did :-) But anyway my point was nothing more than my own opinion (and surely not the truth) on things that could prevent the community to be more involved in pyside.
maybe one of the points is that usually in python projects the process are fast and straightforward, like I clone something/fork do some changes, run the tests, and they run in a couple of minutes, and I can I don't know generate some other things, etc, and you can submit some patch verifying everything. The problem in this case, and in any project that provide bindings to C or C++ libraries, is that you need to deal with the whole overhead from it. Personally, as a PySide dev, I need to have several Qt versions compiled, and installed from the installer on my system, I need to have many Python environments, and different versions, and try little features in many different situations. It was hard, and time wasting at the beginning, because I was not used to it, but now it's simpler. The problem here is that I have no idea on how to make the building process simpler than now, and that's why the curve is so steep for people which is not used to C++ development environments to collaborate. I really would love to have something like "python gen_bindings.py" or "python build_docs" but still, I don't see how to speed up the process of querying the Qt installation, get information from the headers, modify and generate C++ wrappers, and compile that for Python to use it. Maybe the option I pointed out, to only build 'Core' helps, but still you need to take care of having 'libclang', properly setup. For the docs, it's again the same story, we need to parse the whole Qt framework to get the API documentation, and on top modify some snippets to provide python code. On that front, maybe one can provide a way to build the docs without Qt API and in that case it will be only a python-sphinx run, but we don't have the resources to do it. Yes, The Qt Company is a company, but at the moment the devs have 2 keyboards, one for the hands and other for the feet, because there are a lot of things to do and check towards Qt6. Yes, this is not the users problem, but it's just an explan
T
and by KDE and Gnome manifesto, they can't force a developer to use a closed source tool to develop. That's another reason to not use github
C
that's why I'm so pushy on people to fix things they believe it needs to be fix. Like there was another person here doing some shiboken stuff, otherwise we would still be unable to do it :/
A
@cmaureir Sounds like a complex test matrix. I'd expect to have to run the whole test suite „in the cloud“ (= on an integration server running Jenkins, or via TravisCI or similar) and have a small subset running locally. Then, when a push is received on gerrit, the test matrix kicks off and reports back to the issue.
the workflow is you submit something, and we setup a test run, you see the output
C
but some people prefer to run it locally and check before pushing
A
@cmaureir Also, from what you describe, there are many moving parts for generating the docs. How many of those change over time? Can some be cached after first run, so subsequent runs are faster?
C
yes, that's another strategy that was partially implemented with the ``—reuse-build`` option for the build, but qdoc the tool, doesn't have that option implemented.
C
I mean, that's a critical aspect so far (at least for this year), so be python 2 and python 3 (with limited api) compatible.
Python 2 reached EOL half a year ago
In case you're not bound by contracts, let it break
A
Otherwise, some will never update
we are going python3 only (finally!)
I have still in my to do list, some videos on "how to build, how to submit a patch, how to build docs, how to customize the build, etc, etc"
C
better to document them than lose them :)
J
My frustration level has fully decreased reading your comments. Interesting reading. Be sure I'm in love your work guys 😘
C
it's totally ok to say when you don't like things, as long as you do it respectfully as you did, it's totally fine and also constructive ;)
Jim I started contributing to c++ code when I took vacations from uni, 16 years ago, and had in my mind that I *had* to do something.
a lot of trial / errors / tears later - exactly one month later - I had my first c++ program.
T
just because the people I was dealing with where nice and not scared me off with dumb questions, and because I had the feeling that If I stick nothing bad would happen, I would learn different tools and different systems.
Calendar: July 2020
Archive by month
Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog