{"id":19079145,"url":"https://github.com/modorganizer2/modorganizer-plugin_python","last_synced_at":"2025-04-30T05:23:48.538Z","repository":{"id":30574372,"uuid":"124586854","full_name":"ModOrganizer2/modorganizer-plugin_python","owner":"ModOrganizer2","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-31T19:07:33.000Z","size":1173,"stargazers_count":4,"open_issues_count":2,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-18T20:50:03.517Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.modorganizer.org/python-plugins-doc/","language":"C++","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ModOrganizer2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-03-09T19:55:34.000Z","updated_at":"2025-01-31T19:07:37.000Z","dependencies_parsed_at":"2023-09-29T07:52:53.792Z","dependency_job_id":"a8cccb59-0bd0-4e48-878f-97ee351bb402","html_url":"https://github.com/ModOrganizer2/modorganizer-plugin_python","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModOrganizer2%2Fmodorganizer-plugin_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModOrganizer2%2Fmodorganizer-plugin_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModOrganizer2%2Fmodorganizer-plugin_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModOrganizer2%2Fmodorganizer-plugin_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ModOrganizer2","download_url":"https://codeload.github.com/ModOrganizer2/modorganizer-plugin_python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251646336,"owners_count":21620912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-09T02:13:31.156Z","updated_at":"2025-04-30T05:23:48.517Z","avatar_url":"https://github.com/ModOrganizer2.png","language":"C++","readme":"# ModOrganizer2 - Python Proxy\n\nThis repository contains the Python proxy plugin for ModOrganizer2.\nThe proxy plugin allow developers to write Python plugins for ModOrganizer2.\n\n## Setup, build, tests\n\nThis repository is part of MO2 main repositories and should usually be build using\n[`mob`](https://github.com/ModOrganizer2/mob).\n\n## Organization\n\nThis repositories contains 5 sub-projects in `src`.\nThe interface between Python and C++ is done using the\n[`pybind11`](https://github.com/pybind/pybind11) library.\nSee the `README` in the subfolder (when there is one) for more details.\n\n- [`src/proxy`](src/proxy/) contains the actual proxy plugin.\n  This project is a simple interface between MO2 and the runner (see below).\n  The CMake code:\n  - generates the `plugin_python.dll` library,\n  - generates the translation file (under `src/`),\n  - installs necessary files for the plugin (Python DLL, Python libraries, etc),\n    including `mobase`.\n- [`src/runner`](src/runner/) contains the Python runner. This is the project that\n  instantiates a Python interpreter and load/unload Python plugins.\n- [`src/pybind11-qt`](src/pybind11-qt/) contains many utility stuff to interface\n  pybind11 with Qt and PyQt.\n- [`src/pybind11-utils`](src/pybind11-utils/) contains some utility stuff pybind11.\n  This project is header-only.\n- [`src/mobase`](src/mobase) contains the Python plugin interface.\n  - This projects generates the `mobase` Python library.\n\nSome (woefully incomplete) tests are available under `tests`, split in three\nsub-directories:\n\n- [`tests/mocks`](tests/mocks/) simply contains mocks of `uibase` interfaces to be used\n  in the two other test projects.\n- [`tests/python`](tests/python/) contains Python tests for `pytest`.\n  This project generates a bunch of Python test libraries that are then imported in\n  Python test files (`test_*.py`) and tested using `pytest`.\n  These tests mostly cover the pybind11 Qt and utility stuff, and some standalone\n  MO2 classes and functions (`IFileTree`, `GuessedString`, etc).\n- [`tests/runner`](tests/runner/) contains C++ tests, using GTest\n  Tests in this project instantiate a Python runner and then use it to check that\n  plugins implemented in Python can be used properly on the C++ side.\n\n## Building \u0026 Running tests\n\nTests are not built by default with `mob`, so you will need to run `cmake` manually\nwith the proper arguments.\n\nYou need to define `PLUGIN_PYTHON_TESTS` with `-DPLUGIN_PYTHON_TESTS` when running\nthe configure step of cmake.\n\nYou can then build the tests\n\n```bash\n# replace vsbuild with your build folder\ncmake --build vsbuild --config RelWithDebInfo --target \"python-tests\" \"runner-tests\"\n```\n\nTo run the tests, use `ctest`\n\n```bash\n# replace vsbuild with your build folder\nctest.exe --test-dir vsbuild -C RelWithDebInfo\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodorganizer2%2Fmodorganizer-plugin_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodorganizer2%2Fmodorganizer-plugin_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodorganizer2%2Fmodorganizer-plugin_python/lists"}