This is the global context map for the MSS codebase — read this first, then the
CLAUDE.md card inside the package you are changing. The dependency rules below
are machine-enforced by import-linter (pixi run -e dev lint-imports, config in
setup.cfg); if this file and the code disagree, CI is the arbiter.
Arrows mean "may import". Anything not drawn is forbidden.
┌────────────┐
│ mslib.msui │ PyQt5 desktop client (GUI)
└─────┬──────┘
┌──────────────┼───────────────────────┐
▼ ▼ ▼
mslib.mscolab mslib.support mslib.utils
(events/message_ (vendored qt_json_view) (shared: config,
type constants coordinates, units,
ONLY) netCDF, auth, qt helpers)
▲
mslib.mswms ────────────────────────────────┘
(WMS server; never imports msui/mscolab)
mslib.plugins → mslib.msui.flighttrack (grandfathered), mslib.utils
mslib.msidp → standalone SAML identity provider
Grandfathered violations (do not add new ones; the lists live in setup.cfg
under ignore_imports and must only shrink):
utils.{config,auth,airdata,migration.*}importmsui.constants(path constants).utils.mssautoplotdrives the GUI plotting stack headlessly.plugins.io.{csv,text,flitestar}importmsui.flighttrack.{mscolab,mswms}.blueprints.docsimportmsui.icons— invisible to the linter (blueprints/are namespace packages without__init__.py), but equally discouraged.
msui.py/mss.py— entry points (GUI / CLI dispatcher)msui_mainwindow.py— main window; owns flight-track list and open viewsviewwindows.py— view base classes (MSUIViewWindow,MSUIMplViewWindow)topview.py,sideview.py,tableview.py,linearview.py— the four viewsviewplotter.py— shared plotting glue for viewsmpl_qtwidget.py,mpl_map.py,mpl_pathinteractor.py— matplotlib canvas, basemap, interactive waypoint editing (the defect-prone interactive core)flighttrack.py— waypoint table model shared by all viewswms_control.py— WMS client dockwidget +MSUIWebMapService+ fetcher/cachemscolab.py— MSColab client (login, operations, permissions; largest class)socket_control.py— socket.io client; re-emits network events as Qt signalsmscolab_*.py— chat, admin, version-history, merge dialogs*_dockwidget.py— airdata, autoplot, hexagon, kmloverlay, remotesensing, satellite, multiple_flightpath, multilayers dock widgetseditor.py— JSON config editor;performance_settings.py,aircraft.pyconstants.py— MSUI config paths (imported by utils — grandfathered)ui/— Qt Designer sources;qt5/— pyuic5 output, NEVER edit by hand
server.py— thin app assembly (auth handlers, blueprint registration)app/__init__.py— Flask app factory;blueprints/{operation,auth,chat,user,docs}file_manager.py— operations, permissions, git-backed versioning (core logic)chat_manager.py— chat persistence;sockets_manager.py— socket.io eventsmodels.py— SQLAlchemy models;migrations/— Alembic, NEVER edit by handevents.py—SocketEventsname registry (shared with client — contract)message_type.py— chat message enum (shared with client — contract)conf.py—DefaultSettings;mscolab.py— CLI (db init/seed/reset)seed.py— demo users/operations;utils.py,auth.py,forms.py
wms.py—WMSServer, layer registration, GetMap/GetCapabilities handlingmss_plot_driver.py— section drivers feeding data to stylesmpl_hsec*.py,mpl_vsec*.py,mpl_lsec*.py— plot bases + style classes (horizontal/vertical/linear sections); plugin authors subclass thesedataaccess.py— NetCDF file discovery/access;generics.py— generic stylesdemodata.py/seed.py— demo data generation;gallery_builder.py— docs galleryapp/,blueprints/— Flask assembly;mswms.py— entry point
config.py—MSUIDefaultConfigdefaults +config_loader(THE config API)coordinate.py,units.py,time.py,thermolib.py— pure science helpersnetCDF4tools.py— NetCDF helpers;ogcwms.py— OWSLib WMS subclassauth.py— keyring/password handling;qt.py— Qt helperscolordialog.py— CustomColorDialog;airdata.py— airport/airspace downloadmssautoplot.py— headless batch plotting CLI (drives msui plotting stack)migration/— config-format migrations between major versions
mslib/plugins/io/— flight-track import/export formats (csv, kml, gpx, text, flitestar); registered via configimport_plugins/export_pluginsmslib/msidp/— standalone SAML2 identity provider (entry:msidp)mslib/support/qt_json_view/— vendored JSON tree widget (config editor)
- Never hand-edit
mslib/msui/qt5/ui_*.py(pyuic5 output; sources inmslib/msui/ui/) ormslib/mscolab/migrations/(Alembic). - Client/server shared vocabulary lives ONLY in
mslib/mscolab/events.pyandmslib/mscolab/message_type.py. REST payloads are implicit dicts today — when touching one, update BOTH the blueprint handler and the client call site inmslib/msui/mscolab.py, and grep for the endpoint name. - All configuration access goes through
mslib.utils.config.config_loader; never read the settings JSON directly. - Qt imports are allowed only in
mslib/msui,mslib/utils/{qt,colordialog}.py, andmslib/support. - New cross-package imports must satisfy the import-linter contracts in
setup.cfg— never extend anignore_importslist.
| Command | Scope | Wall time |
|---|---|---|
pixi run -e dev lint |
flake8 | seconds |
pixi run -e dev lint-imports |
architecture contracts | seconds |
pixi run -e dev codespell |
spelling | seconds |
pixi run -e dev test-fast |
plugins + utils + meta, no servers | ~30 s |
pixi run -e dev test-mscolab / test-mswms |
one server suite | minutes |
pixi run -e dev test-msui |
full GUI suite (offscreen Qt) | ~10 min |
pixi run -e dev test |
everything | ~13 min |
Tests live under tests/_test_<package>/, mirroring the package layout. The
MSColab server fixture forks only when a collected test needs it; Qt tests
require QT_QPA_PLATFORM=offscreen (the tasks set it).