Skip to content

feat(launcher): add Tk-based launcher command and wrapper script#2769

Open
xxhoeckyxx wants to merge 23 commits into
strictdoc-project:mainfrom
xxhoeckyxx:derhoecki/feat/launcher
Open

feat(launcher): add Tk-based launcher command and wrapper script#2769
xxhoeckyxx wants to merge 23 commits into
strictdoc-project:mainfrom
xxhoeckyxx:derhoecki/feat/launcher

Conversation

@xxhoeckyxx
Copy link
Copy Markdown

GUI Launcher: Start/Stop Server, Exports, Logs & Project Config

Hello everyone,

this is a third proposal featuring a slightly more substantial addition 🙂

I’ve developed an additional GUI launcher using tkinter that allows users to start and stop the server via a graphical user interface.
It also provides a file export feature, where both the export path and the file format can be selected.

Background

At the moment, the server runs locally on every user’s machine, and not everyone feels comfortable working with the command line.
The launcher is intended to provide a simple and user-friendly alternative.

Additional Features

The GUI also allows users to:

  • display the server logs at the click of a button
  • edit the configuration data of individual projects directly from the UI

Note:
This feature is particularly important for our internal use, which is why I wanted to share it with you.

As always, feedback is very welcome 🙂

Best regards,
Christopher

stanislaw and others added 20 commits December 29, 2025 22:35
WHAT: Refactor FileEntry. In the former model, a source code element was
always either a function or a class. In the changed model, a source code
element can be anything. It is therefore no longer reasonable to hardcode
attributes function and clazz. Rather describe it as optional element
string and mandatory id. This change only affects the inner representation.
SDoc syntax still uses the old FUNCTION:/CLASS: fields for backwards
compatibility.

WHY: There are multiple reasons for this change:
- We want to reference more element kinds, not only functions and
  classes (say macros, structs, enums in C). The kinds are language
  specific and shall be easily extensible for StrictDoc.
- Some languages like Rust have a single namespace for all elements. For
  example, if we say "file.c:foo" in C, there could be a struct foo and
  a function void foo() in the same file. In Rust, no such overload is
  allowed. In consequence, it is possible to infer the kind from the
  identifier.
- Prepare ground for upcoming markdown forward relations, that shall use
  the element/id form right from the start.
WHY: This option is deprecated some time ago in favour of the `--filter-nodes` option.
…en diffing in/out folders

WHY: Ensures that the test diffing works correctly and the __pycache__ folder
does not get in the way.

HOW: Extracted from strictdoc-project#2766.
…islav/remove_filter_requirements

chore: remove legacy --filter-requirements option
…islav/test_exceptions

fix(tests/end2end): End2EndTestSetup: skip __pycache__ directories when diffing in/out folders
…islaw/ci

chore(.github): enable Python 3.14 on some jobs
…islav/test_exception

chore(tests/end2end): server: handle exceptions in __enter__()
…islav/wwh

docs: add WHAT-WHY-HOW training material
…mbase

WHY: Coverage is taking quite some time to load and is not needed for normal
test runs.
…islav/pytest_coverage

chore(tasks): test_unit: disable coverage by default, disable seleniumbase
…islav/element_and_id

 refactor(sdoc): change FileEntry from function/clazz to element/id
…islav/element_and_id

test(source_code_traceability): add itest for new ELEMENT/ID syntax
Co-authored-by: Copilot <copilot@github.com>
Copy link
Copy Markdown
Collaborator

@stanislaw stanislaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase (instead of merge) this branch against the latest main branch and squash all your commits to just one. Otherwise, it is harder to review the overall changeset.

When the branch is rebase/squashed to just one commit with your actual change, I will do the next round of review. For now, I left some very obvious comments.

@@ -0,0 +1,152 @@
import subprocess
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's consolidate the entire Launcher codebase in the folder strictdoc/features/launcher. This should apply to all files from this PR that are related to this feature.



def _ensure_git_workspace(self) -> bool:
if not self._ensure_workspace():
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be running invoke lint locally to make sure that your Python files have correct indentation. See the Dev Guide about this and other things.

messagebox.showerror("Git error", str(exc))
return False

if completed.returncode != 0 or completed.stdout.strip().lower() != "true":
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of extracting this Git-related functionality to a separate file, let's keep it inside your main launcher.py for now. The file will be bigger but I prefer to have separate files where their interfaces are clearly separated. The issue with this file is that it seems to be about Git but in fact it is still coupled to UI-relevant things like messagebox.showerror etc.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This role was ultimately not suitable for our company, so I moved it to a separate file. That way, it’s easier to comment it out or remove it. Maybe I could rename the feature to something more descriptive so it’s clear that it’s part of the user interface, or should we just remove this feature entirely? Or move all UI files to a separate folder, as you suggested in your post above. Just let me know what you prefer, and I’ll adjust it accordingly ;)

Comment thread tools/strictdoc_tk_launcher.py Outdated
@@ -0,0 +1,11 @@
"""Thin wrapper to launch the Tk-based StrictDoc launcher.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file actually needed?

How is it planned to be used?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was actually intended to serve as a wrapper for a command-line argument—unfortunately, I simply forgot to remove it—the wrapper for the command-line argument is now located in “commands/launcher_command.py”

Christopher Hoeck and others added 3 commits May 5, 2026 10:58
ttk Combobox now had recent_workspaces with a length of 5 entries

Co-authored-by: Copilot <copilot@github.com>
added color in Logs

Co-authored-by: Copilot <copilot@github.com>
…oved because it is no longer needed.

- The launcher has been moved to a separate feature folder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants