{"id":29016281,"url":"https://github.com/karrlab/unitth","last_synced_at":"2025-06-25T22:07:55.356Z","repository":{"id":62586473,"uuid":"64947097","full_name":"KarrLab/unitth","owner":"KarrLab","description":"Python interface for UnitTH unit test history report generator","archived":false,"fork":false,"pushed_at":"2020-06-26T19:49:21.000Z","size":193,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-25T12:50:06.723Z","etag":null,"topics":["html-report","unit-test","unit-test-result-parser","unitth"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KarrLab.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}},"created_at":"2016-08-04T15:42:55.000Z","updated_at":"2024-07-27T15:44:41.000Z","dependencies_parsed_at":"2022-11-03T22:16:15.509Z","dependency_job_id":null,"html_url":"https://github.com/KarrLab/unitth","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/KarrLab/unitth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarrLab%2Funitth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarrLab%2Funitth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarrLab%2Funitth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarrLab%2Funitth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KarrLab","download_url":"https://codeload.github.com/KarrLab/unitth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarrLab%2Funitth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261960463,"owners_count":23236575,"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":["html-report","unit-test","unit-test-result-parser","unitth"],"created_at":"2025-06-25T22:07:54.372Z","updated_at":"2025-06-25T22:07:55.333Z","avatar_url":"https://github.com/KarrLab.png","language":"Python","readme":"[![PyPI package](https://img.shields.io/pypi/v/unitth.svg)](https://pypi.python.org/pypi/unitth)\n[![Documentation](https://readthedocs.org/projects/unitth/badge/?version=latest)](http://docs.karrlab.org/unitth)\n[![Test results](https://circleci.com/gh/KarrLab/unitth.svg?style=shield)](https://circleci.com/gh/KarrLab/unitth)\n[![Test coverage](https://coveralls.io/repos/github/KarrLab/unitth/badge.svg)](https://coveralls.io/github/KarrLab/unitth)\n[![Code analysis](https://api.codeclimate.com/v1/badges/e6819121e1e8ca0485a0/maintainability)](https://codeclimate.com/github/KarrLab/unitth)\n[![License](https://img.shields.io/github/license/KarrLab/unitth.svg)](LICENSE)\n![Analytics](https://ga-beacon.appspot.com/UA-86759801-1/unitth/README.md?pixel)\n\n# unitth\n\nThis package provides a Python method and command line interface for generating HTML reports of unit test histories. The package is a Python interface for the [UnitTH](http://junitth.sourceforge.net).\n\n## Installation\n* Latest release from PyPI\n  ```\n  pip install unitth\n  ```\n\n* Latest revision from GitHub\n  ```\n  pip install git+https://github.com/KarrLab/unitth.git#egg=unitth\n  ```\n\n## Usage\n\n### Command line\n```\nusage: unitth (sub-commands ...) [options ...] {arguments ...}\n\nGenerate HTML unit test history report\n\npositional arguments:\n  xml_report_dir        Parent directory of XML reports of individual builds\n                        to generate a history report of\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --debug               toggle debug output\n  --quiet               suppress all output\n  --xml-report-filter [XML_REPORT_FILTER]\n                        Starts-with filter for individual reports with `xml-\n                        report-dir` that should be included in the history\n                        report. Set `xml-report-filter` to to include all\n                        files/subdirectories in the history report.\n  --html-report-path HTML_REPORT_PATH\n                        Directory of HTML reports of individual\n                        builds(relative to XML directories of individual\n                        builds)\n  --generate-exec-time-graphs GENERATE_EXEC_TIME_GRAPHS\n                        Whether execution time graphs shall be generated\n  --html-report-dir HTML_REPORT_DIR\n                        directory to store generated HTML history report\n  --initial_java_heap_size INITIAL_JAVA_HEAP_SIZE\n                        Initial Java heap size\n  --maximum_java_heap_size MAXIMUM_JAVA_HEAP_SIZE\n                        Maximum Java heap size\n```\n\n## Example usage\n\n### Python\n```\nfrom nose2unitth.core import Converter as nose2unitth\nfrom junit2htmlreport.parser import Junit as JunitParser\nfrom unitth.core import UnitTH\nimport os\nimport subprocess\n\nos.mkdir('reports')\nos.mkdir('reports/nose')\nos.mkdir('reports/unitth')\nos.mkdir('reports/html')\n\nsubprocess.check_call(['nosetests', 'tests/test_unitth.py:TestDummy.test_dummy_test',\n                       '--with-xunit', '--xunit-file', 'reports/nose/1.xml'])\nsubprocess.check_call(['nosetests', 'tests/test_unitth.py:TestDummy.test_dummy_test',\n                       '--with-xunit', '--xunit-file', 'reports/nose/2.xml'])\n\nnose2unitth.run('reports/nose/1.xml', 'reports/unitth/1')\nnose2unitth.run('reports/nose/2.xml', 'reports/unitth/2')\n\nwith open('reports/unitth/1/index.html', 'wb') as html_file:\n    print \u003e\u003e html_file, JunitParser('reports/nose/1.xml').html()\nwith open('reports/unitth/2/index.html', 'wb') as html_file:\n    print \u003e\u003e html_file, JunitParser('reports/nose/2.xml').html()\n\nUnitTH.run('reports/unitth/*', xml_report_filter='', html_report_dir='reports/html')\n```\n\n### Command line\n```                        \nmkdir reports\nmkdir reports/nose\nmkdir reports/unitth\nmkdir reports/html\n\nnosetests tests/test_unitth.py:TestDummy.test_dummy_test --with-xunit --xunit-file reports/nose/1.xml\nnosetests tests/test_unitth.py:TestDummy.test_dummy_test --with-xunit --xunit-file reports/nose/2.xml\n\nnose2unitth reports/nose/1.xml reports/unitth/1\nnose2unitth reports/nose/2.xml reports/unitth/2\n\njunit2html reports/nose/1.xml reports/unitth/1/index.html\njunit2html reports/nose/2.xml reports/unitth/2/index.html\n\nunitth --xml_report_filter --html_report_dir reports/html \"reports/unitth/*\"\n```\n\n## Documentation\n\nPlease see the [API documentation](http://docs.karrlab.org/unitth).\n\n## License\nThe build utilities are released under the [MIT license](LICENSE).\n\n## Development team\nThis package was developed by [Jonathan Karr](http://www.karrlab.org) at the Icahn School of Medicine at Mount Sinai in New York, USA.\n\n## Questions and comments\nPlease contact the [Jonathan Karr](http://www.karrlab.org) with any questions or comments.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarrlab%2Funitth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarrlab%2Funitth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarrlab%2Funitth/lists"}