Beta release of GitBuilding v0.13

Hello all,

There have been big things happening with GitBuilding recently. Thanks to funding from LibreHub via @Tobey 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

Some new features include:

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.

6 Likes

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?

1 Like

Ah crap. No I’m and idiot. I didn’t make a check that the settings directory exists.

I’ll push out and update (hopefully tomorrow) in the mean time. If you run

mkdir ~/.local/share/gitbuilding

and then try again it should work. Sorry!

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.

This is great news Julian :slight_smile:

Here is my first try, no errors but no output.

The webapp launches though:

However I don’t get automatic scrolling when clicking the pencil button:

It’s looking great ^.^

I really look forward for a left side panel listing tools and parts from libraries, for easy search and insert.

4 Likes

Just FYI, we’ve started using Wiki JS for publishing docs: https://docs.openlabautomata.xyz/

I exported the output to Markdown, from the original GitBuilding docs, and it just worked. :slight_smile:

The only downside is that its a one way conversion.

2 Likes

Same problem here, and I only get the highlighting for just a second when I press the pencil button. That may be by design though.

I agree that it’s looking great.

Thanks @jmwright and @naikymen

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?

Beta 2 can be downloaded with

pip install gitbuilding[gui]==0.13.0b2
2 Likes

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.

1 Like

:partying_face: Oh thank heavens for that. I stick with Firefox despite snap, but snap is awful.

Here’s a link: Enough of it! Ubuntu to Ditch Snap Completely With 24.04 LTS Naughty Nightingale

1 Like

We are now off topic… also:

1 Like

I didn’t come across any other errors. I’m on Arch. It’s nice, stable, and snap-free. :slight_smile:

ÂżIs there a verbose mode that I can turn on?

Here is my screen: https://photos.app.goo.gl/Udwq5FW4qax9D6jB8

It works now, I don’t know why. xD

That’s great I hadn’t noticed!


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.

Thanks for your work on this Julian. :slight_smile:

1 Like

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.

My pleasure:

Name: PyQt5
Version: 5.15.9
Summary: Python bindings for the Qt cross platform application toolkit
Home-page: https://www.riverbankcomputing.com/software/pyqt/
Author: Riverbank Computing Limited
Author-email: info@riverbankcomputing.com
License: GPL v3
Location: /usr/lib/python3.11/site-packages
Requires: PyQt5-sip
Required-by: git-cola, PyQtWebEngine, QScintilla

Name: PyQtWebEngine
Version: 5.15.6
Summary: Python bindings for the Qt WebEngine framework
Home-page: https://www.riverbankcomputing.com/software/pyqtwebengine/
Author: Riverbank Computing Limited
Author-email: info@riverbankcomputing.com
License: GPL v3
Location: /usr/lib/python3.11/site-packages
Requires: PyQt5, PyQt5-sip
Required-by: