{"id":18485120,"url":"https://github.com/weso/hercules-sync","last_synced_at":"2025-04-08T19:32:08.047Z","repository":{"id":42650399,"uuid":"237957806","full_name":"weso/hercules-sync","owner":"weso","description":"Tools to synchronise data between the ontology files and Wikibase instance for the Hercules project at University of Murcia.","archived":false,"fork":false,"pushed_at":"2022-03-29T22:01:14.000Z","size":101970,"stargazers_count":4,"open_issues_count":11,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-23T17:45:44.015Z","etag":null,"topics":["asio","ontology","rdf","semantic-web","wikibase"],"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/weso.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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":"2020-02-03T12:17:11.000Z","updated_at":"2022-12-14T09:52:07.000Z","dependencies_parsed_at":"2022-09-14T16:01:19.974Z","dependency_job_id":null,"html_url":"https://github.com/weso/hercules-sync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weso%2Fhercules-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weso%2Fhercules-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weso%2Fhercules-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weso%2Fhercules-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weso","download_url":"https://codeload.github.com/weso/hercules-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247912696,"owners_count":21017037,"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":["asio","ontology","rdf","semantic-web","wikibase"],"created_at":"2024-11-06T12:44:20.995Z","updated_at":"2025-04-08T19:32:07.551Z","avatar_url":"https://github.com/weso.png","language":"Python","funding_links":[],"categories":["Universidad e Investigación"],"sub_categories":[],"readme":"# hercules-sync\n\u003ctable\u003e\n\u003ctr\u003e\n  \u003ctd\u003eLicense\u003c/td\u003e\n  \u003ctd\u003e\n    \u003ca href=\"https://github.com/weso/hercules-sync/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/weso/hercules-sync.svg\" alt=\"license\" /\u003e\n    \u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003eBuild Status\u003c/td\u003e\n  \u003ctd\u003e\n    \u003ca href=\"https://travis-ci.org/weso/hercules-sync\"\u003e\n    \u003cimg src=\"https://travis-ci.org/weso/hercules-sync.svg?branch=master\" alt=\"travis build status\" /\u003e\n    \u003c/a\u003e\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003eCoverage\u003c/td\u003e\n  \u003ctd\u003e\n    \u003ca href=\"https://codecov.io/gh/weso/hercules-sync\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/weso/hercules-sync/branch/master/graph/badge.svg\" alt=\"coverage\" /\u003e\n    \u003c/a\u003e\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\nTools to synchronise data between the ontology files and Wikibase instance for the Hercules project at University of Murcia.\n\n## Directory structure\n* docs: Development documentation of this module.\n* hercules_sync: Source code of the application.\n* tests: Test suite used to validate the project.\n\n## Defining a webhook in the source repo\nIn order to perform the synchronization automatically, a webhook must be created in the original repository where the ontology is stored. This webhook will be launched whenever a new push event occurs in the repo, and the synchronization service will be called to sync the changes with the wikibase instance. When creating a new webhook, the payload url must point to the URL where this server will be available. It is also important to define a secret key that will be used to accept only requests from the source repo and not from other ones. An example configuration will look like this one:\n![](docs/images/webhook_example.png)\n\n## Launching the app with Docker\nIn order to execute the app you need to set the following configuration in the docker-compose.yml file:\n* GITHUB_OAUTH: Github token with access to read the repository where the ontology is stored. This token will be used to download the modified files through the GitHub API. For more information, see [the official GitHub page about creating a personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).\n* WBAPI: Endpoint of the target Wikibase instance API where the ontology will be sincronized. E.g. https://hercules-demo.wiki.opencura.com/w/api.php\n* WBSPARQL: SPARQL endpoint of the target wikibase. E.g. https://hercules-demo.wiki.opencura.com/query/sparql\n* WBUSER: Username of the user that will perform the synchronization operation in the target wikibase.\n* WBPASS: Password of the user defined by the username stated above.\n* WEBHOOK_SECRET: Secret key of the webhook created in the previous step.\n\n## Launching the app directly with Python\nThis application is compatible with Python 3.6 forwards, but the recommended Python version is at least Python 3.7 due to performance. After you have installed Python, you can run the following command to install every dependency:\n```\npip install -r requirements.txt\n```\n\nAfter the requirements have been installed, you need to set directly the environment variables described in the previous section. After that, the following command can be executed to launch the app:\n```\npython wsgi.py\n```\n\nAlternatively, there is a sh script available that installs the dependencies and runs the server automatically. In order to execute this script, you have to set the environment variables and then run:\n```\nsh start_server.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweso%2Fhercules-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweso%2Fhercules-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweso%2Fhercules-sync/lists"}