Graphical user interface for dtool
Project description
dtool-lookup-gui is a graphical user interface for dtool, the dtool-lookup-server, the dtool-lookup-server-direct-mongo-plugin and the dtool-lookup-server-dependency-graph-plugin written in Python and GTK.
Quick start
Just download the pre-packaged binaries of the latest release.
If the binaries won’t run out-of-the-box on your system, continue below.
OS-specific notes
Windows
The Windows executable comes in two variants, as a single portable file and an installer.
macOS
The app bundle requires MacOS 14.7 at least. After downloading the dmg Apple Disk Image of the latest release and copying dtool-lookup-gui over to your Applications folder, macOS will likely complain about dtool-lookup-gui being damaged and refuse to execute it. This is due to the fact that we are no Apple-verified developers. To run the app anyway, open a terminal and remove Apple’s quarantine attribute from the app with
sudo xattr -rds com.apple.quarantine /Applications/dtool-lookup-gui.app
That should enable you to launch the app as usual. Another option is to call
/Applications/dtool-lookup-gui.app/Contents/MacOS/dtool-lookup-gui
directly from the command line.
Linux
After downloading and extracting the tar.gz-packaged Linux build, you may
run the bundled scripts set_launcher_icon.sh and soft_link_launcher.sh
subsequently to add this launcher icon to your desktop environment:
This has been tested on Ubuntu 20.04 and GNOME 3.36.8.
The packaged Linux build will fail to launch out-of-the box under Wayland. An error like this might arise:
GLib-GIO-ERROR **: 11:26:50.444: Settings schema 'org.gnome.settings-daemon.plugins.xsettings' does not contain a key named 'antialiasing'
Trace/breakpoint trap (core dumped)
If unsure which display server is in use, check with
echo $XDG_SESSION_TYPE
This will likely output either x11 or wayland.
If you are using Wayland, launch the app with environment variable
GDK_BACKEND=x11 set, e.g. via
GDK_BACKEND=x11 dtool-gui
Use
Searching
The app searches the index of a dtool-lookup-server. How exactly the index is searched depends on the implementation of the search plugin on the server side. In the case of the reference search plugin, the dtool-lookup-server-search-plugin-mongo, a word in the search field will search for exactly that word within all string fields stored in the underlying database. This, of course, includes the content of the README.yml file attached to a dataset, but also matches against contents of the manifest (such as file names of the packaged items) and the basic set of administrative metadata, namely the fields
{
"base_uri": "s3://test-bucket",
"created_at": 1683797360.056,
"creator_username": "jotelha",
"dtoolcore_version": "3.18.2",
"frozen_at": 1683797362.855,
"name": "test_dataset_2",
"number_of_items": 1,
"size_in_bytes": 19347,
"tags": [],
"type": "dataset",
"uri": "s3://test-bucket/26785c2a-e8f8-46bf-82a1-cec92dbdf28f",
"uuid": "26785c2a-e8f8-46bf-82a1-cec92dbdf28f"
}
The dtool-lookup-server-search-plugin-mongo README offers more information on the exact search mechanism.
If the dtool-lookup-server-direct-mongo-plugin is installed on the server side, very specific search queries that make use of operators from the MongoDB language are possible. Enclose a MongoDB language query in curly brackets {...} and all fields in double quotes "..." to use this direct Mongo query functionality.
The query
{
"creator_username": {
"$in": ["anna", "bert"]
},
"readme.description": {
"$regex": "toluene"
}
}
searches for all datasets created by users with the either the local user name “anna” or “bert” on the machine of dataset creation and with the word “toluene” included in the README field “description”. The regular expression operator can of course formulate more sophisticated criteria than a plain text search on the content of a specific field.
The direct query section of the dtool-lookup-server-direct-mongo-plugin README lists a few other query examples.
Development
Please read the contributing guidelines before diving into the development process.
Requirements
This application requires Gtk 3 and GtkSourceView 4.
On Ubuntu 20.04,
apt install -y gir1.2-gtksource-4
suffices to to install these dependencies from the standard system package repositories.
On Ubuntu 24.04,
sudo apt update
sudo apt install -y \
libcairo2-dev \
libgirepository-2.0-dev \
libgirepository1.0-dev \
gir1.2-gtk-3.0 \
pkg-config \
python3-dev \
build-essential \
meson \
ninja-build
is needed.
On recent macOS (>= 10.15) use homebrew,
brew install gtksourceview4 gnome-icon-theme
On earlie macOs, MacPorts allows the installation of gtksourceview4
sudo port -v selfupdate
sudo port install xorg-server
sudo port install gtksourceview4 py-gobject3 py-pip py-numpy py-scipy
sudo port install adwaita-icon-theme
sudo port select --set python python310
sudo port select --set pip pip310
mkdir -p ~/venv
python -m venv --system-site-packages ~/venv/python-3.10
source ~/venv/python-3.10/bin/activate
pip install --upgrade pip
pip install wheel
pip install dtool-lookup-gui dtool-s3 dtool-smb
This has been tested on macOS 10.13.6.
On Windows, use mingw64/msys2 and refer to the Using GTK from MSYS2 packages on the GTK project’s pages.
Also refer to the build workflows .github/workflows/build-on-[linux|macos|windows].yml within this repository for understanding the requirements for the different systems.
On Windows WSL, install
apt install gcc cmake python3-dev libcairo2-dev gir1.2-gtksource-4 libgirepository1.0-dev
to allow a development installation of the GUI as described below.
Installation
For a locally editable install, clone this repository with
git clone git+https://github.com/livMatS/dtool-lookup-gui.git
change into the repository directory,
cd dtool-lookup-gui
create and activate a clean virtual environment,
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
and perform an editable install with
pip install -e .
Also run
glib-compile-schemas .
from within subdirectory dtool_lookup_gui. Otherwise, GUI launch fails with
gi.repository.GLib.Error: g-file-error-quark: Failed to open file “/path/to/repository/dtool_lookup_gui/gschemas.compiled”: open() failed: No such file or directory (4)
Running the GUI
After installation, run the GUI with:
dtool-gui
Note that when you run the GUI for the first time, you will need to configure the URL of the lookup and the authentication server as well as provide a username and a password. To do this, click on the “Burger” symbol and select Settings.
Pinned requirements
requirements.in contains unpinned dependencies. requirements.txt with pinned versions has been auto-generated with
pip install pip-tools
pip-compile --resolver=backtracking requirements.in > requirements.txt
GTK debugging
After
gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true
use CTRL-SHIFT-D during execution to display the GTK inspector for interactive debugging.
GUI design
The GUI uses custom Gtk widgets. To edit the the XML UI definition files with Glade, add the directory glade/catalog to Extra Catalog & Template paths within Glade’s preferences dialog.
Running unit tests
Running the unit tests requires pytest and pytest-asyncio. Then, run all tests from repository root with pytest.
Funding
This development has received funding from the Deutsche Forschungsgemeinschaft within the Cluster of Excellence livMatS.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dtool_lookup_gui-0.7.2.tar.gz.
File metadata
- Download URL: dtool_lookup_gui-0.7.2.tar.gz
- Upload date:
- Size: 595.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13cd7cdc3ef986b1efe55057dde95d36b51890b4101d43d139f845f1f5026143
|
|
| MD5 |
16c029c913d9a0aa49fef9fbb182b724
|
|
| BLAKE2b-256 |
746cc74ba5e4b91d363e91e4908a8ca563f256e5297740896981d1694d2a2993
|
Provenance
The following attestation bundles were made for dtool_lookup_gui-0.7.2.tar.gz:
Publisher:
build-and-publish.yml on livMatS/dtool-lookup-gui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dtool_lookup_gui-0.7.2.tar.gz -
Subject digest:
13cd7cdc3ef986b1efe55057dde95d36b51890b4101d43d139f845f1f5026143 - Sigstore transparency entry: 699311103
- Sigstore integration time:
-
Permalink:
livMatS/dtool-lookup-gui@d320f1f2120096588a56d30f692918b88fe9ea1b -
Branch / Tag:
refs/tags/0.7.2 - Owner: https://github.com/livMatS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish.yml@d320f1f2120096588a56d30f692918b88fe9ea1b -
Trigger Event:
push
-
Statement type:
File details
Details for the file dtool_lookup_gui-0.7.2-py3-none-any.whl.
File metadata
- Download URL: dtool_lookup_gui-0.7.2-py3-none-any.whl
- Upload date:
- Size: 131.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7062fa30a779608b7842a343ddbba2577c74dddd5b03fa336a4a8d296c4ba2d7
|
|
| MD5 |
23baada2a6f9b564bae18e3d257170f1
|
|
| BLAKE2b-256 |
6943641a60016909b10fa90fdc897a45fe758931be3042d77e77f4ac00718647
|
Provenance
The following attestation bundles were made for dtool_lookup_gui-0.7.2-py3-none-any.whl:
Publisher:
build-and-publish.yml on livMatS/dtool-lookup-gui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dtool_lookup_gui-0.7.2-py3-none-any.whl -
Subject digest:
7062fa30a779608b7842a343ddbba2577c74dddd5b03fa336a4a8d296c4ba2d7 - Sigstore transparency entry: 699311113
- Sigstore integration time:
-
Permalink:
livMatS/dtool-lookup-gui@d320f1f2120096588a56d30f692918b88fe9ea1b -
Branch / Tag:
refs/tags/0.7.2 - Owner: https://github.com/livMatS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish.yml@d320f1f2120096588a56d30f692918b88fe9ea1b -
Trigger Event:
push
-
Statement type: