{"id":21644459,"url":"https://github.com/samsung/universum","last_synced_at":"2025-05-12T14:29:41.568Z","repository":{"id":34065342,"uuid":"164376032","full_name":"Samsung/Universum","owner":"Samsung","description":"Universum project is a Python solution that simplifies SW project verification by integrating existing CI systems and provides additional functionality for CI.","archived":false,"fork":false,"pushed_at":"2024-12-19T15:26:53.000Z","size":4242,"stargazers_count":17,"open_issues_count":115,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-12T14:29:30.030Z","etag":null,"topics":["build-automation","ci","ci-framework","continuous-integration","devops","version-control"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Samsung.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2019-01-07T03:59:29.000Z","updated_at":"2024-12-19T15:26:54.000Z","dependencies_parsed_at":"2024-09-17T09:24:43.799Z","dependency_job_id":"bee7b10f-9d68-4751-b9d9-74ba893c4947","html_url":"https://github.com/Samsung/Universum","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2FUniversum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2FUniversum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2FUniversum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2FUniversum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Samsung","download_url":"https://codeload.github.com/Samsung/Universum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253754769,"owners_count":21958904,"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":["build-automation","ci","ci-framework","continuous-integration","devops","version-control"],"created_at":"2024-11-25T05:40:19.024Z","updated_at":"2025-05-12T14:29:41.541Z","avatar_url":"https://github.com/Samsung.png","language":"Python","readme":"# Project 'Universum'\n[![Documentation Status](https://readthedocs.org/projects/universum/badge/?version=latest)](\nhttps://universum.readthedocs.io/en/latest/?badge=latest)\n\nUniversum integrates various CI systems and provides additional features,\nsuch as: customized downloading sources from VCS, running tests\ndescribed in configuration file and reporting the results to code review systems.\n\nFull documentation can be found here: https://universum.readthedocs.io/\n\nPlease check out our [code of conduct](CODE_OF_CONDUCT.md)\nand [contribution policy](.github/CONTRIBUTING.md)\n\nProject is executed with `python3.7 -m universum` command.\nIndependent analyzers are executed with their module name, e.g. `python3.7 -m universum.analyzers.pylint`.\nOther Universum modes, such as poller or submitter, are called via command line, e.g.\n`python3.7 -m universum poll`\n\n## Installation\n\nMinimum prerequisites ([see documentation for details](https://universum.readthedocs.io/en/latest/install.html)):\n1. OS Linux\n2. Python version 3.7 or greater\n3. Pip version 9.0 or greater\n```bash\nsudo pip3.7 install -U universum\n```\nor\n```bash\npip3.7 install --user -U universum\n```\nCan also be installed with [extras for using VCS](\nhttps://universum.readthedocs.io/en/latest/install.html#vcs-related-extras),  but they also require\ninstalling respective command-line tools, such as git or p4.\n\n## Development\n\nIn order to prepare the development environment for the Universum, please fulfill the prerequisites,\nand then use the commands listed below. Please note we use `venv` to properly select\npython interpreter version and to isolate development environment from the system.\n\nPrerequisites:\n1. Make sure the libssl-dev and libcrypto++-dev packages are available in your environment.\n    ```bash\n    sudo apt install libssl-dev libcrypto++-dev\n    ```\n2. Install all of the VCS extras as described in the [Universum installation manual](\n   https://universum.readthedocs.io/en/latest/install.html#vcs-related-extras),\n   (including installation of Git and P4 CLI)\n3. Install Docker (`docker-ce`, `docker-ce-cli`) as described in the [official installation manual](\n   https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository)\n\n   * Also add current user to 'docker' group (use `sudo usermod -a -G docker $USER` and then relogin)\n4. Install Mozilla WebDriver: `sudo apt install firefox-geckodriver`\n\nFurther commands:\n```bash\npython3.7 -m venv virtual-environment-python3.7\nsource ./virtual-environment-python3.7/bin/activate\ngit clone https://github.com/Samsung/Universum.git universum-working-dir\ncd universum-working-dir\ngit checkout master\npip install -U .[test]\nmake images\n```\nAnd after this the `pytest` or `make test` commands can be executed (see below).\n\nThe `[test]` extra will install/update the following additional Python modules:\n\n    * `sphinx`\n    * `sphinx-argparse` (extension for `Sphinx`)\n    * `sphinx_rtd_theme` (extension for `Sphinx`)\n    * `docker`\n    * `httpretty`\n    * `mock`\n    * `pytest`\n    * `pylint`\n    * `pytest-pylint`\n    * `teamcity-messages` (is not actually used in manual testing, but is there for CI)\n    * `pytest-cov`\n    * `coverage`\n    * `mypy`\n    * `types-requests`\n    * `selenium`\n\nAlthough it is possible to get these modules via `pip3.7 install -U universum[test]`, it might be more convenient\nto checkout the Universum branch you are currently working on, change working directory to project root and\nrun a `pip3.7 install -U .[test]` command from there for more flexibility. Using virtual environment (via `venv`\ncommand) allows to separate test environment from system and provides even more control over additional modules.\n\nUninstalling Universum via `pip uninstall universum` will not uninstall all the dependencies installed along with it.\nSimply deleting the directory with virtual environment will leave the system completely cleaned of all changes.\n\nDocker images used in tests can be built manually or using the `make images` command.\nAlso `make rebuild` command can be used to update images ignoring cache (e.g. to rerun `apt update`).\nCommands `make images` and `make rebuild` use Python version set in execution environment; to build images\nfor another supported Python version, please use environment variable `PYTHON`, e.g.:\n```\nPYTHON=python3.8 make images\n```\nCurrently the following values of the `PYTHON` environment variable are supported:\n'python3.6', 'python3.7' and 'python3.8'.\n\nThe `make test` command runs all the tests (including the doctests) and collects coverage. Tests can also be launched\nmanually via `pytest` command with any required options (such as `-k` for running tests based on keywords\nor `-s` for showing the suppressed output).\n\nTo test Univesrum for all supported Python versions, please run:\n```\npip install -U nox\ncd universum-working-dir\nnox\n```\nThis will launch the testing scenario, described in `noxfile.py`. This scenario includes rebuilding docker images\nfor every supported Python version and running all the tests for corresponding Python.\n\nAlso, setting up \"REUSE_DOCKER_CONTAINERS\" environment variable (or running tests in PyCharm) will let tests\nreuse already created and initialized containers, which speeds up the testing process. But do note that this is\nrecommended for development purposes only. Without recreating containers, the remnants of previous test runs\nmay affect the current test run.\n\n\n## Project contents\n\n`universum` is main project folder, that is being copied to Python libraries location\n(e.g. `dist-packages` or `site-packages`) when installed.\nIt contains `__main__.py` script, that is the main entry point to the whole project.\nIt also contains the following modules:\n* `main`/`poll`/`submit`/`api`/`nonci` - managing modules for different Universum modes\n* `configuration_support` - special module for [configuring the project](\nhttps://universum.readthedocs.io/en/latest/configuring.html)\n* `analyzers` directory is not quite a part of Universum itself. It contains [independent scripts](\nhttps://universum.readthedocs.io/en/latest/code_report.html) compatible with Universum\nfor implementing static (and other types of) analysis support.\n* `lib` - utility functions libraries\n\n  * `ci_exception` - internal exceptions\n  * `module_arguments` - handles [command line](\n    https://universum.readthedocs.io/en/latest/args.html) and other parameters\n  * `gravity` - inter-module communication\n  * `utils` - miscellaneous\n\n* `modules` - independent packages\n\n  * `api_support` - 'main' mode module to answer API requests\n  * `automation_server` - drivers for CI systems (e.g. Jenkins)\n  * `artifact_collector` - implements [build artifacts](\n    https://universum.readthedocs.io/en/latest/configuring.html#common-variations-keys)\n  * `code_report_collector` - support for [external 'code report' modules](\n    https://universum.readthedocs.io/en/latest/code_report.html)\n  * `launcher` - executes build scenario, described in [project configuration file](\n    https://universum.readthedocs.io/en/latest/configuring.html)\n  * `output` - drivers for environment-based logs\n  * `project_directory` - interaction with host file system\n  * `reporter` - interaction with code review systems\n  * `structure_handler` - execution 'blocks' isolation, order, reporting, etc.\n  * `vcs` - CI target sources preparation\n\nAlso there are 'base' modules/classes for driver implementation standardization,\nand 'main' modules/classes for automated driver choosing based on environment and settings.\n\n`doc` directory contains sources for [project documentation](\nhttps://universum.readthedocs.io/en/latest/index.html). It can be generated\nlocally with running `make` from root directory using Sphinx.\n\n`tests` directory contains test system, based on PyTest. Full tests can be started\nfrom root directory via `make tests` command, otherwise use standard PyTest syntax.\n*Commits failing any of project tests should not be merged into 'master' branch!*\n\n`examples` contains various examples of [project configuration files](\nhttps://universum.readthedocs.io/en/latest/configuring.html). Usage of such files\nis illustrated in `run_basic_example.sh` script.\n\n`setup.py` is 'setuptools' configuration file, and shouldn't be executed on its own.\n\n## Quick architecture overview\n\n1. Project only entry point (except ['analyzers'](https://universum.readthedocs.io/en/latest/code_report.html))\n   is `universum.py`. Based on chosen execution mode (default, submitting, polling, etc.)\n   it calls one of 'main' modules, passing them all parameters\n2. Universum is a set of separate modules, each implementing its own piece of functionality.\n   They are connected using special `gravity` library\n3. All classes, inherited from `Module` (defined in `gravity`), automatically can:\n\n   * use `Dependency` mechanism to use other modules\n   * describe any module parameters in `define_arguments()` and receive them parsed via `self.settings`\n\n4. `configuration_support` is, in fact, an 'external' module, used not only by Universum,\n   but by [user configuration file](https://universum.readthedocs.io/en/latest/configuring.html)\n   for generating project configuration\n5. 'Base' classes are virtual, not implementing any actual functionality, but describing\n   the structure of inherited classes and ensuring they have all required functions\n   that will be called by modules using them\n\n## Project review slides\n\nSome additional details on how project is developed could be found in\n[project review slides](doc/Universum_ProjectReview_2021-03.pdf)\n\n## Contributing\n\nFurther versions of this README file should include:\n\n1. Notification on mandatory code review for all commits to master\n2. Notification on mandatory documenting of the newly added features\n3. Description of CI process, links to configurations/logs/build results/etc.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamsung%2Funiversum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamsung%2Funiversum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamsung%2Funiversum/lists"}