{"id":16928448,"url":"https://github.com/peterjclaw/libproton","last_synced_at":"2026-06-08T15:32:02.428Z","repository":{"id":14618691,"uuid":"17336014","full_name":"PeterJCLaw/libproton","owner":"PeterJCLaw","description":"A python library which simpliefies the creation of a Proton compliant scorer.","archived":false,"fork":false,"pushed_at":"2024-05-16T21:02:14.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-14T16:21:28.388Z","etag":null,"topics":["srcomp"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/libproton/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PeterJCLaw.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}},"created_at":"2014-03-02T11:04:51.000Z","updated_at":"2024-05-16T21:02:18.000Z","dependencies_parsed_at":"2024-05-16T22:23:29.616Z","dependency_job_id":"e74e14ec-6cb3-4ac9-b6b8-335ab2c1a5d7","html_url":"https://github.com/PeterJCLaw/libproton","commit_stats":{"total_commits":91,"total_committers":2,"mean_commits":45.5,"dds":0.06593406593406592,"last_synced_commit":"4fccfce667c09af877b7d9ef219c549373f44f87"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterJCLaw%2Flibproton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterJCLaw%2Flibproton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterJCLaw%2Flibproton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterJCLaw%2Flibproton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeterJCLaw","download_url":"https://codeload.github.com/PeterJCLaw/libproton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241818898,"owners_count":20025212,"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":["srcomp"],"created_at":"2024-10-13T20:36:50.410Z","updated_at":"2026-06-08T15:32:02.395Z","avatar_url":"https://github.com/PeterJCLaw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LibProton\n\n[![CircleCI](https://circleci.com/gh/PeterJCLaw/libproton.svg?style=svg)](https://circleci.com/gh/PeterJCLaw/libproton)\n\nThis is a library which simplifies the task of creating\n[Proton](https://github.com/PeterJCLaw/proton) compliant scoring scripts.\n\nIt supports Python 3.7+.\n\n## Install\n\nInstall [from PyPI](https://pypi.org/project/libproton/):\n\n``` shell\npip install libproton\n```\n\n## API\n\nThe following is a complete and minimal Proton compliant scorer, and shows\nthe expected usage of the library.\n\n~~~~ python\n#!/usr/bin/env python\n\nimport libproton\n\nclass Scorer:\n    def __init__(self, teams_data, arena_data):\n        self._teams_data = teams_data\n        self._arena_data = arena_data\n\n    def calculate_scores(self):\n        \"\"\"Main scoring entry point.\n\n           Expected to return a mapping of TLA -\u003e score for each team in\n           the input data. Errors either in the input or otherwise should\n           be handled by raising exceptions.\n        \"\"\"\n        scores = {}\n        for tla in self._teams_data.keys():\n            scores[tla] = 4\n        return scores\n\n    def validate(self, extra_data):\n        \"\"\"An optional additional method to validate the scoresheet.\n\n           If this method is implemented it will be called with the value\n           of the ``other`` key from the input. If the key is not present\n           then this method will still be called (with ``None``).\n\n           If there are validation errors the this method should raise\n           an exception about them.\n        \"\"\"\n        pass\n\nif __name__ == '__main__:\n    libproton.main(Scorer)\n~~~~\n\n## Tests\n\nRun `./script/test`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterjclaw%2Flibproton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterjclaw%2Flibproton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterjclaw%2Flibproton/lists"}