emzed IDE, see also https://emzed.ethz.ch
Project description
emzed.spyder
emzed.spyder is a customized distribution of the Spyder IDE
for the emzed mass spectrometry platform (ETH Zurich,
Scientific IT Services).
emzed Related Functions in the Spyder Terminal
remote_interpreter_startup.py is injected as the IPython kernel startup
file. Because it runs as a startup script, everything defined at its top level
lands directly in the user namespace — including emzed itself (preloaded) and
all emzed_* helper functions listed below:
| Function | Description |
|---|---|
emzed_help |
list all emzed specific commands |
emzed_edit_config |
reopen the first-run configuration dialog |
emzed_update |
Update emzed and emzed_gui |
emzed_check_versions |
Check installed vs. latest versions |
emzed_install_ext |
Install an emzed extension |
To separate projects with separated virtual environments
or to create emzed extensions:
| Function | Description |
|---|---|
emzed_project_new |
Create a new project |
emzed_project_activate |
Switch the active project |
emzed_project_deactivate |
Deactivate the current project |
emzed_project_list |
List all projects |
emzed_project_update |
Reinstall project after setup.py changes |
emzed_project_test |
Run the project's test suite |
emzed_project_test_coverage |
Run tests and open coverage report |
emzed_project_build_wheel |
Build a distributable wheel |
emzed_project_upload / emzed_project_upload_test |
Upload to PyPI |
Run emzed_help() in the console for a full listing.
Project locations on disk
Projects are stored in a platform-specific folder:
- macOS/Linux:
~/.emzed3_projects/<project_name>/ - Windows:
%APPDATA%\emzed3_projects\<project_name>\
Each project folder contains a .venv/ subdirectory with the project's own
Python environment.
Project workflow
emzed_project_new(name) scaffolds a new project using a cookiecutter
template. It:
- Creates the project folder under the projects directory above.
- Generates a
setup.py,requirements_dev.txt,LICENSE.txt, and asrc/emzed_ext_<name>/package skeleton. - Creates a
.venv/that inheritsemzedand its dependencies from the shared remote venv (via a.pthfile), so only project-specific packages need to be installed on top. - Activates the new project and opens
setup.pyin the editor.
After editing setup.py and requirements_dev.txt, run
emzed_project_update() to install the project and its dependencies into the
project venv.
emzed_project_activate(name) switches the active project — the next IPython
console that opens will use that project's .venv as its Python interpreter
and start in the project folder. Only one project can be active at a time;
emzed_project_deactivate() returns to the default remote venv.
Variable Explorer Integration
emzed_spyder_kernels.py runs inside the remote kernel and patches
spyder_kernels.utils.nsview so that emzed-specific types display correctly
in Spyder's variable explorer:
| Patch | Effect |
|---|---|
get_type_string |
Shows "Table", "PeakMap", or "ImmutablePeakMap" as the type |
get_size |
Shows meaningful size (e.g. "42 row x 5 columns" for a Table) |
value_to_display |
Shows column names for Table objects |
is_supported |
Marks Table/ImmutablePeakMap as not directly serialisable |
globalsfilter |
Hides closed Table/ImmutablePeakMap objects from the explorer |
These patches must live in the kernel process (not Spyder's process) because
the variable explorer inspects live objects — but isinstance checks cannot
be used from the Spyder side, since emzed is only installed in the remote
venv. Instead, patch_gui.py detects Table/PeakMap by the type name
string returned from the kernel when a double-click occurs, then calls
_inspect() directly in the remote shell to open the viewer without copying
data across the process boundary.
Architecture
The project is a thin wrapper around Spyder that patches it at startup time. It does not fork Spyder — it installs alongside it and monkey-patches live classes before Spyder finishes booting.
Entry point: emzed_spyder.start:main imports patch_all, then delegates
to spyder.app.start.main.
Patch modules (applied in strict order)
| Module | What it patches |
|---|---|
patch_config.py |
Config folder location, splash/icon assets, theme, update checks, startup scripts |
patch_gui.py |
Window title, variable explorer double-click, code completion filtering, IPython prompt, console working directory |
patch_remote_kernel_startup.py |
Kernel spec (argv, env), console banner with ASCII art, active project/runtime status, and version check |
The ordering is critical: set_remote_python_interpreter must run after all
config patches because Spyder caches some config at import time.
Two-Venv Model
emzed.spyder uses two separate Python environments:
- Spyder venv — runs the IDE itself (PyQt5, Spyder,
emzed_spyder) - Remote venv (
~/.emzed3/remote_venv/) — runs user code; containsemzed,emzed_gui,emzed_spyder_kernels
At startup, the remote venv is validated (required packages are imported to confirm they work) and recreated from scratch if invalid, downloading setup files from GitLab.
User projects each get their own .venv that inherits from the remote venv
via a .pth file, avoiding re-installation of the heavy emzed stack.
CI/CD and Tooling
- CI: GitLab CI (
.gitlab-ci.yml) - Linting: ruff, black, flake8 via pre-commit hooks
- Dependency management:
uv - Platform notes: PyQt5 is pinned on Windows;
uvenvironments are scoped to Linux and Windows (macOS uses system Qt)
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 emzed_spyder-3.0.3.tar.gz.
File metadata
- Download URL: emzed_spyder-3.0.3.tar.gz
- Upload date:
- Size: 4.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c83236fbe443f25f03ceaa7d9442301749a75f435709a437f162df9434191120
|
|
| MD5 |
a52d2f0647338880b3c22dda1f720169
|
|
| BLAKE2b-256 |
3452a1826a498222c1d32a10ed52b9353408b397d105cb0842173ea581255927
|
File details
Details for the file emzed_spyder-3.0.3-py3-none-any.whl.
File metadata
- Download URL: emzed_spyder-3.0.3-py3-none-any.whl
- Upload date:
- Size: 4.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b7ab10005511428c8f351d8b1bd94ce93beb195007f26618530f5fdd4cd487d
|
|
| MD5 |
a9ec1d0f6b045535ba0efec574707d54
|
|
| BLAKE2b-256 |
156f948a0387d220d3ccbc8a9f79d32690787c8d4156857fe1b8e4546ecb711d
|