There have been big things happening with GitBuilding recently. Thanks to funding from LibreHub via @MakerTobey I have been able to focus on the UI of GitBuilding to make it more user friendly. Tonight I released a beta version of the next version, v0.13.0
Automatic rebuilding when using an external editor
Part of the plans for v0.13 are to improve the editor to reduce the need to us external programs and especially the command line to make new projects, and to run GitBuilding. Unfortunately, to install this beta release and fire up the new gui you do still need the command line, however we are far closer to the point where we can make an application with that can be downloaded and installed.
The Beta release
If anyone has time to try the beta release, that would be super helpful.
(Shamelessly tagging @jmwright, @naikymen and @Juliencolomb , as they have been very helpful in the past)
To install run :
pip install gitbuilding[gui]==0.13.0b2
[Install command updated as beta 2 has now been released based on comments below.]
If you get a big error about PyQt5, this is probably caused by pip being old. Run:
pip install --upgrade pip
and then try again. Once installed you can run
gitbuilding-gui
To load the new GUI. If you want to run the new GUI from the browser run:
gitbuilding webapp
User Guide
I should also mention that @biomakers_lab has started a GitBuilding user guide in both English and Spanish, which should help people get to grips with GitBuilding.
I will also make a “Cheat Sheet” as soon as I have time.
That’s great news! I’m glad to see GitBuilding getting support.
I tried running the webapp, but am not able to open existing GitBuilding projects. No matter what, I get an error dialog saying that the project can’t be opened. I may not be choosing the correct directory or doing something else wrong. I also see the following error/stacktrace in the terminal.
$ gitbuilding webapp
GitBuilding server running on http://localhost:6178/ (Press CTRL+C to quit)
WARNING:waitress.queue:Task queue depth is 1
ERROR:gitbuilding.server:Exception on /launcher/open-project [POST]
Traceback (most recent call last):
File "/home/jwright/miniforge/envs/gitbuilding13/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/home/jwright/miniforge/envs/gitbuilding13/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/jwright/miniforge/envs/gitbuilding13/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/home/jwright/miniforge/envs/gitbuilding13/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/jwright/miniforge/envs/gitbuilding13/lib/python3.10/site-packages/gitbuilding/server.py", line 339, in _open_project
self._update_projects_file()
File "/home/jwright/miniforge/envs/gitbuilding13/lib/python3.10/site-packages/gitbuilding/server.py", line 239, in _update_projects_file
write_local_file("projects.json", DATADIR, json.dumps(projects_dict))
File "/home/jwright/miniforge/envs/gitbuilding13/lib/python3.10/site-packages/gitbuilding/native_file_operations.py", line 162, in write_local_file
with codecs.open(fullpath, "w", encoding='utf-8') as file_obj:
File "/home/jwright/miniforge/envs/gitbuilding13/lib/python3.10/codecs.py", line 906, in open
file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: '/home/jwright/.local/share/gitbuilding/projects.json'
I may be doing something wrong here too or be missing the point of the new command, but running webapp from a docs directory opens and only gives me the options to open or create a new project. Maybe gitbuilding serve still serves the purpose of launching from a project directory and gitbuilding webapp is for a stand-alone experience?
Also yes this is correct. If you are in a specific documentation directory then still run serve. Webapp is the stand alone option. It will let you open/make new projects. The projects should be within the directory that you started in. So best to run it from your user directory.
GUI is blank
This is weird. Are there any other errors? Might be that you need extra QT libraries. What OS are you on?
Editor
The pencil button should select the correct pagragraph for 1/4 of a second. And then leave your cursor at the top of the paragraph. Does it do that? If it does that but doesn’t scroll to the correct place then that is weird. What browser are you on?
We are moving towards this. Have you clicked the new Part option in the toolbar. This should give you a modal to select parts already in your documentation. It doesn’t yet read through libraries.
@julianstirling I did a screencast of what happens when clicking the pencil icon. Unfortunately, the Gnome 3 screencast feature doesn’t pick up the mouse cursor. However, you can see the icon size/highlight change as I mouse over it next to the text “Once the inside mirrors are cut…”. You can see that when the text is scrolled outside of the viewport, it makes it seem like the button has no effect.
Another thing I noticed is that when I export a static website, the edit icon from the GitBuilding editor seems to be included with my files. I’m not sure why that would be needed on my static site, but I’ve left it in.
$ gitbuilding build-html --no-server
$ git status
...
Untracked files:
(use "git add <file>..." to include in what will be committed)
hardware/stereoscope/v1/static/Icons/edit.png
What browser is this on? I can try to reproduce it. Having the classic “but it works fine here” bug problem.
Updated to say it doesn’t work on Brave, does work on Firefox. So it is probably a chromium based thing. I’ll investigate how to force it to move.
Hmm, yeah I just put all the icons together, but yes I suppose those editor ones don’t need to be in the final build. I’ll make an issue to change that before release.
Beta2 is now out with a number of fixes. I still haven’t been able to work out why @naikymen can’t see the GUI window. Does anyone else have this problem, or PyQT experience to know where I should look?
I am running Chrome. I normally run Firefox but had so many issues with the Snap on Ubuntu 23.04 that I had to switch. Fortunately they are removing the Snap system from Ubuntu in future releases.
I wouldn’t worry about the edit icon. It sounds like it’s expected behavior, and the image doesn’t take up much space on disk.
Unrelated: how are you planning to start the GUI for a particular project?
Some IDEs have a file similar to GB’s “buildconf.yaml” in the project directory. For example, RStudio adds a file with an “Rproj” file extension, which launches the IDE when clicked.
Though I’m not sure how hard it is to associate file extensions with programs in a portable way. Just tossing out ideas.
Also unrelated: There are some scripts to extract thumbnails from FCStd files, perhaps this can be a nice/simple way to “render” them with the ![]{} syntax.
Not that I know of. The problem must be in QT firing up and QT is poorly documented in my opinion. Are you able to run
pip show PyQt5; pip show PyQtWebEngine
and paste the output?
This is a great question. In truth I haven’t thought about this. I tend to launch every program from the terminal/or a launcher that I can fire up from the keyboard…because I am weird. How do most people open programs on their computer? Start menu, double clicking files? This will involve some thinking, and talking to normal people.
Agreed. I had looked at this in the past, I shall look at it again. It would be nice to have freecad previews.
Sorry for the confusion. There were three people including me who looked at the article before you, and none of us caught the April Fools warning.
Getting back on task, the b2 release works fine for me, even when I deleted the ~/.local/share/gitbuilding directory before starting it. This is on Ubuntu 23.04, soon to be Debian or something else. Arch has issues with hard locks on my laptop for some reason.
How do most people open programs on their computer? Start menu, double clicking files? This will involve some thinking, and talking to normal people.
Didn’t somebody package GitBuilding with Electron.js as an experiment? It seems like gitbuilding webapp would be perfect for that use case where a user can just double-click an icon. I will probably still use gitbuilding serve from a specific docs directory most of the time, but it’s nice to have an app mode now too.