{"id":39280396,"url":"https://github.com/lsst-ts/ts_m2gui","last_synced_at":"2026-01-18T01:01:10.458Z","repository":{"id":37498844,"uuid":"460901609","full_name":"lsst-ts/ts_m2gui","owner":"lsst-ts","description":"Main Telescope M2 Graphical User Interface (GUI) in Python","archived":false,"fork":false,"pushed_at":"2025-10-23T16:31:50.000Z","size":4995,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-10-23T17:32:31.702Z","etag":null,"topics":["m2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lsst-ts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT","agents":null,"dco":null,"cla":null}},"created_at":"2022-02-18T15:17:58.000Z","updated_at":"2025-10-23T16:31:53.000Z","dependencies_parsed_at":"2023-12-18T17:58:52.905Z","dependency_job_id":"677a1990-927b-4ecf-a5d0-5e1dfbb40f0e","html_url":"https://github.com/lsst-ts/ts_m2gui","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/lsst-ts/ts_m2gui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst-ts%2Fts_m2gui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst-ts%2Fts_m2gui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst-ts%2Fts_m2gui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst-ts%2Fts_m2gui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lsst-ts","download_url":"https://codeload.github.com/lsst-ts/ts_m2gui/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst-ts%2Fts_m2gui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28525418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"ssl_error","status_checked_at":"2026-01-18T00:39:39.467Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["m2"],"created_at":"2026-01-18T01:00:40.752Z","updated_at":"2026-01-18T01:01:10.428Z","avatar_url":"https://github.com/lsst-ts.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![docs](https://img.shields.io/badge/docs-ts--m2gui.lsst.io-brightgreen)](https://ts-m2gui.lsst.io/)\n\n# M2 Graphical User Interface (GUI) in Python\n\n## Platform\n\n- AlmaLinux 8.10\n- python: 3.11.9\n\n## Needed Package\n\n- numpy (install by `conda`)\n- pyyaml (install by `conda`)\n- pyside6 (install by `conda`)\n- qt6-charts (install by `conda`)\n- qt5-qtbase-devel (install by `dnf`)\n- xorg-x11-server-Xvfb (optional, install by `dnf`)\n- qasync (install by `conda -c conda-forge`)\n- [black](https://github.com/psf/black) (optional)\n- [flake8](https://github.com/PyCQA/flake8) (optional)\n- [isort](https://github.com/PyCQA/isort) (optional)\n- [mypy](https://github.com/python/mypy) (optional)\n- [documenteer](https://github.com/lsst-sqre/documenteer) (optional)\n- pytest (optional, install by `conda`)\n- pytest-flake8 (optional, install by `conda -c conda-forge`)\n- pytest-qt (optional, install by `conda -c conda-forge`)\n- pytest-xvfb (optional, install by `conda -c conda-forge`)\n\n## Code Format\n\nThis code is automatically formatted by `black` using a git pre-commit hook (see `.pre-commit-config.yaml`).\nTo enable this, see [pre-commit](https://pre-commit.com).\n\n## Build the Document\n\nTo build project documentation, run `package-docs build` to build the documentation.\nTo clean the built documents, use `package-docs clean`.\nSee [Building single-package documentation locally](https://developer.lsst.io/stack/building-single-package-docs.html) for further details.\n\n## Run GUI in Docker Container\n\nYou need to set the QT environment variables:\n\n```bash\nexport QT_API=\"PySide6\"\nexport PYTEST_QT_API=\"PySide6\"\n```\n\n### AlmaLinux\n\nIf the user of docker container has no writing permission to the X11 socket, you need to run the following command first (use the `root` user in container):\n\n```bash\nxhost local:root\n```\n\nThen, do the image forwarding by the following command (note you need to use the `root` as the user or not):\n\n```bash\ndocker run -it --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v ${path_to_this_package}:${path_of_package_in_container} ${docker_image}:${image_tag}\n```\n\n### MacOS\n\n1. Setup the x11 by following: [x11_docker_mac](https://gist.github.com/cschiewek/246a244ba23da8b9f0e7b11a68bf3285).\n\n2. Forward GUI by (note the MacOS will handle the writing permission for you):\n\n```bash\nxhost +\nIP=$(ifconfig en0 | grep inet | awk '$1==\"inet\" {print $2}')\ndocker run -it --rm -e DISPLAY=${IP}:0 -v /tmp/.X11-unix:/tmp/.X11-unix -v ${path_to_this_package}:${path_of_package_in_container} ${docker_image}:${image_tag}\n```\n\n## Run GUI without the LSST Docker Image on MacOS\n\nYou need to setup the QT environment with:\n\n```bash\nexport QT_MAC_WANTS_LAYER=1\nexport QT_MAC_USE_NSWINDOW=1\n```\n\nYou may need to setup the **PYTHONPATH** to point to `python/` directory as well.\n\n## Executable\n\nThe executable (`run_m2gui`) is under the `bin/` directory.\nUse the argument of `-h` to know the available options.\nThe logged message will be under the `log/` directory.\n\nThe environment variable **TS_CONFIG_MTTCS_DIR** specifies [ts_config_mttcs](https://github.com/lsst-ts/ts_config_mttcs) directory for GUI started in the simulation mode.\n\n## Unit Tests\n\nYou can run the unit tests by:\n\n```bash\npytest tests/\n```\n\nIf you have the **Xvfb** and **pytest-xvfb** installed, you will not see the prompted windows when running the unit tests.\n\nNote: If the variable of `PYTEST_QT_API` is not set, you might get the core dump error in the test.\n\n## Class Diagrams\n\nThe class diagrams are in [here](doc/uml).\nYou can use the [Mermaid](https://mermaid.live) to read them.\nQT is an event-based framework and the signal plays an important role among classes.\nThe `emit()` and `connect()` in the class diagrams mean the class **emits** a specific siganl or **connects** it to a specific callback function.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsst-ts%2Fts_m2gui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flsst-ts%2Fts_m2gui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsst-ts%2Fts_m2gui/lists"}