{"id":13557673,"url":"https://github.com/AKSW/QuitStore","last_synced_at":"2025-04-03T12:31:00.843Z","repository":{"id":9709251,"uuid":"63066076","full_name":"AKSW/QuitStore","owner":"AKSW","description":"🖧 Quads in Git - Distributed Version Control for RDF Knowledge Bases","archived":false,"fork":false,"pushed_at":"2024-06-27T14:57:16.000Z","size":10654,"stargazers_count":102,"open_issues_count":54,"forks_count":22,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-03-05T15:48:06.660Z","etag":null,"topics":["git","graph","quad","rdf","sparql","sparql-endpoints","version-control","version-control-system","versioning"],"latest_commit_sha":null,"homepage":"http://aksw.org/Projects/Quit","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/AKSW.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":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-11T12:29:55.000Z","updated_at":"2025-02-16T12:50:15.000Z","dependencies_parsed_at":"2023-12-31T11:24:28.530Z","dependency_job_id":"e78b07eb-987f-417c-8b1e-493850d0338f","html_url":"https://github.com/AKSW/QuitStore","commit_stats":{"total_commits":787,"total_committers":7,"mean_commits":"112.42857142857143","dds":0.3240152477763659,"last_synced_commit":"39305ef0e40974b93cdc9e0b28de1ddf42e41881"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AKSW%2FQuitStore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AKSW%2FQuitStore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AKSW%2FQuitStore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AKSW%2FQuitStore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AKSW","download_url":"https://codeload.github.com/AKSW/QuitStore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247002172,"owners_count":20867415,"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":["git","graph","quad","rdf","sparql","sparql-endpoints","version-control","version-control-system","versioning"],"created_at":"2024-08-01T12:04:28.937Z","updated_at":"2025-04-03T12:30:56.378Z","avatar_url":"https://github.com/AKSW.png","language":"Python","funding_links":[],"categories":["Python","git","Databases"],"sub_categories":["Data Cube extensions"],"readme":"\n\u003cimg alt=\"The QuitStore Logo: A glass of quinch jam (German: Quittenmarmelade) with the Git logo on the lid. 'Graph jam in a git glass'\" src=\"https://raw.githubusercontent.com/AKSW/QuitStore/master/assets/quitstore.png\" width=\"512\" /\u003e\n\n# Quit Store\n\nBuild status of `master` branch:\n\n[![Build Status](https://travis-ci.org/AKSW/QuitStore.svg?branch=master)](https://travis-ci.org/AKSW/QuitStore)\n[![Coverage Status](https://coveralls.io/repos/github/AKSW/QuitStore/badge.svg?branch=master)](https://coveralls.io/github/AKSW/QuitStore)\n\nThe *Quit Store* (stands for \u003cem\u003eQu\u003c/em\u003eads in G\u003cem\u003eit\u003c/em\u003e) provides a workspace for distributed collaborative Linked Data knowledge engineering.\nYou are able to read and write [RDF Datasets](https://www.w3.org/TR/rdf11-concepts/#section-dataset) (aka. multiple [Named Graphs](https://en.wikipedia.org/wiki/Named_graph)) through a standard SPARQL 1.1 [Query](https://www.w3.org/TR/sparql11-query/) and [Update](https://www.w3.org/TR/sparql11-update/) interface.\nTo collaborate you can create multiple branches of the Dataset and share your repository with your collaborators as you know it from Git.\n\nIf you want to read more about the Quit Store we can recommend our paper:\n\n[*Decentralized Collaborative Knowledge Management using Git*](https://natanael.arndt.xyz/bib/arndt-n-2018--jws)\nby Natanael Arndt, Patrick Naumann, Norman Radtke, Michael Martin, and Edgard Marx in Journal of Web Semantics, 2018\n[[@sciencedirect](https://www.sciencedirect.com/science/article/pii/S1570826818300416)] [[@arXiv](https://arxiv.org/abs/1805.03721)]\n\n## Getting Started\n\nTo get the Quit Store you have three options:\n\n- Install via [pipx](https://pipx.pypa.io/)\n- Clone it with Git from our repository: https://github.com/AKSW/QuitStore\n- Use Docker and see the section [Docker](#docker) in the README\n\n- The binary self-contained releasses created with [pyinstaller](https://pyinstaller.org/) are currently broken [#291](https://github.com/AKSW/QuitStore/issues/291) and [#302](https://github.com/AKSW/QuitStore/issues/302). I'm happy about help.\n\n### Installation via pipx\n\n```\n$ pipx install git+https://github.com/AKSW/QuitStore.git\n  installed package quit 0.25.4, installed using Python 3.12.1\n  These apps are now globally available\n    - quitstore\ndone! ✨ 🌟 ✨\n$ quitstore --help\n```\n\n### Installation from Source\n\nInstall [poetry](https://python-poetry.org/).\n\nGet the Quit Store source code:\n```\n$ git clone https://github.com/AKSW/QuitStore.git\n$ cd QuitStore\n```\nIf you are using virtualenvwrapper:\n```\n$ poetry install\n$ poetry run quitstore --help\n```\n\n### Git configuration\n\nConfigure your name and email for Git.\nThis information will be stored in each commit you are creating with Git and the Quit Store on your system.\nIt is relevant so people know which contribution is coming from whom. Execute the following command if you haven't done that before.\n\n```\n$ git config --global user.name \"Your Name\"\n$ git config --global user.email \"you@e-mail-provider.org\"\n```\n\n### Start with Existing Data (Optional)\n\nIf you already have data which you want to use in the quit store follow these steps:\n\n1. Create a repository which will contain your RDF data.\n\n```\n$ git init /path/to/repo\n```\n\n2. Put your RDF data formatted as [N-Triples](https://www.w3.org/TR/n-triples/) and sorted (e.g. using `cat data-in.nt | LC_ALL=C sort -u \u003e data-out.nt`) into files like `\u003cgraph\u003e.nt` into this directory.\n3. For each `\u003cgraph\u003e.nt` file create a corresponding `\u003cgraph\u003e.nt.graph` file which must contain the IRI for the respective graph. (These `.graph` files are also used by the [Virtuoso bulk loading process](https://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtBulkRDFLoader#Bulk%20loading%20process)).\n4. Add the data to the repository and create a commit.\n\n```\n$ git add …\n$ git commit -m \"init repository\"\n```\n\nTo ingest further versions of your data into the Quit Store you can add further commits by going through steps 2.-4..\nAlternatively you are also able to execute SPARQL 1.1. Update operations to create new versions on the Quit Store.\n\n### Start the Quit Store\n\nIf you are using the binary:\n```\n$ chmod +x quit #\n$ ./quit -t /path/to/repo\n```\n\nIf you have it installed from the sources:\n```\n$ poetry run quitstore -t /path/to/repo\n```\n\nOpen your browser and go to [`http://localhost:5000/`](http://localhost:5000/).\n\nHave a lot of fun!\n\nFor more command line options check out the section [Command Line Options](#command-line-options) in the README.\n\n\n\n## Command Line Options\n\n`-b`, `--basepath`\n\nSpecify a base path/application root. This will work with WSGI and docker only.\n\n`-t`, `--targetdir`\n\nSpecify a target directory where the repository can be found or will be cloned (if remote is given) to.\n\n`-r`, `-repourl`\n\nSpecify a link/URL to a remote repository.\n\n`-c`, `--configfile`\n\nSpecify a path to a configuration file. (Defaults to ./config.ttl)\n\n`-nv`, `--disableversioning`\n\nRun Quit-Store without versioning activated\n\n`-f`, `--features`\n\nThis option enables additional features of the store:\n\n- `provenance` - Enable browsing interfaces for provenance information.\n- `persistance` - Store all internal data as RDF graph.\n- `garbagecollection` - Enable garbage collection. With this feature enabled, git will check for garbage collection after each commit. This may slow down response time but will keep the repository size small.\n\n`-v`, `--verbose` and `-vv`, `--verboseverbose`\n\nSet the log level for the standard output to verbose (INFO) respective extra verbose (DEBUG).\n\n`-l`, `--logfile`\n\nWrite the log output to the given path.\nThe path is interpreted relative to the current working directory.\nThe log level for the logfile is always extra verbose (DEBUG).\n\n## Configuration File\n\n*deprecated* (we plan to remove the configuration file feature)\n\nIf you want to work with configuration files you can create a `config.ttl` file.\nThis configuration file consists of two parts, the store configuration and the graph configuration.\nThe store configuration manages everything related to initializing the software, the graph configuration maps graph files to their graph IRIs.\nThe graph configuration in the `config.ttl` is an alternative to using `\u003cgraph\u003e.nt.graph` files next to the graphs.\nMake sure you put the correct path to your git repository (`\"../store\"`) and the IRI of your graph (`\u003chttp://example.org/\u003e`) and name of the file holding this graph (`\"example.nt\"`).\n\n```\nconf:store a \u003cYourQuitStore\u003e ;\n    \u003cpathOfGitRepo\u003e \"../store\" ; # Set the path to the repository that contains the files .\n    \u003corigin\u003e \"git:github.com/your/repository.git\" . # Optional a git repo that will be cloned into dir given in line above on startup.\n\n\nconf:example a \u003cGraph\u003e ; # Define a Graph resource for a named graph\n    \u003cgraphUri\u003e \u003chttp://example.org/\u003e ; # Set the IRI of named graph\n    \u003cisVersioned\u003e 1 ; # Defaults to True, future work\n    \u003cgraphFile\u003e \"example.nt\" . # Set the filename\n```\n\n## API\n\nThe Quit-Store comes with three kinds of interfaces, a SPARQL update and query interface, a provenance interface, and a Git management interface.\n\n### SPARQL Update and Query Interface\nThe SPARQL interface support update and select queries and is meant to adhere to the [SPARQL 1.1 Protocol](https://www.w3.org/TR/sparql11-protocol/).\nYou can find the interface to query the current `HEAD` of your repository under `http://your-quit-host/sparql`.\nTo access any branch or commit on the repository you can query the endpoints under `http://your-quit-host/sparql/\u003cbranchname\u003e` resp. `http://your-quit-host/sparql/\u003ccommitid\u003e`.\nSince the software is still under development there might be some missing features or strange behavior.\nIf you are sure that the store does not follow the W3C recommendation please [file an issue](https://github.com/AKSW/QuitStore/issues/new).\n\n#### Examples\n\nExecute a select query with curl\n```\ncurl -d \"select ?s ?p ?o ?g where { graph ?g { ?s ?p ?o} }\" -H \"Content-Type: application/sparql-query\" http://your-quit-host/sparql\ncurl -d \"select ?s ?p ?o ?g where { graph ?g { ?s ?p ?o} }\" -H \"Content-Type: application/sparql-query\" http://your-quit-host/sparql/develop\n```\nIf you are interested in a specific result mime type you can use the content negotiation feature of the interface:\n```\ncurl -d \"select ?s ?p ?o ?g where { graph ?g { ?s ?p ?o} }\" -H \"Content-Type: application/sparql-query\" -H \"Accept: application/sparql-results+json\" http://your-quit-host/sparql\n```\n\nExecute an update query with curl\n\n```\ncurl -d \"insert data { graph \u003chttp://example.org/\u003e { \u003curn:a\u003e \u003curn:b\u003e \u003curn:c\u003e } }\" -H \"Content-Type: application/sparql-update\"  http://your-quit-host/sparql\n```\n\n### Provenance Interface\nTo use the provenance browsing feature you have to enable it with the argument `--feature=provenance`.\nThe provenance browsing feature extracts provenance meta data for the revisions and makes it available through a SPARQL endpoint and the blame interface.\nThe provenance interface is available under the following two URLs:\n\n- `http://your-quit-host/provenance` which is a SPARQL query interface (see above) to query the provenance graph\n- `http://your-quit-host/blame` to get a `git blame` like output per statement in the store\n\n### Git Management Interface\n\nThe git management interface allows access to some operations of quit in conjunction with the underlying git repository.\nYou can access them with your browser at the following paths.\n\n- `/commits`: See commits, messages, committer, and date of commits.\n- `/branch`, `/merge`: allows to manage branches and merge branches with different strategies.\n- `/pull`, `/fetch`, `/push` work similar to the respective git commands. (These operations will only works if you have configured remotes on the repository.)\n\n## Docker\n\nWe provide a Docker image for the Quit Store on the [public docker hub](https://hub.docker.com/r/aksw/quitstore/) as well as on the [github docker registry](https://github.com/AKSW/QuitStore/pkgs/container/quitstore).\nThe image exposes port 8080 by default.\nThe default user within the image is the user `quit` with the user id `1000`.\nFor this user a git configuration with `user.name QuitStore` and `user.email quitstore@example.org` is preset.\nWithout any further configuration, a git repository is initialized within the container in the `/data` directory (owned by the default user `quit`).\n\nTo store the data on the host a local directory or volume is required to store the git repository.\nAn host directory or volume can be linked to the directory `/data`.\nMake sure the quit process running with the user id `1000` within the docker container has write access to this directory.\n\nAlternatively the user id within the container can be set using the [`docker run --user $UID …` option](https://docs.docker.com/engine/reference/commandline/run/).\nIn this case you have to make sure a `user.name` a `user.email` is configure using `git config` within the repository (`.git/config`) or a git config file is mounted to `/.gitconfig` (to `/usr/src/app/.gitconfig` if you are running it with user id `1000`).\n\nExample setup with the default user:\n\n```\nmkdir /store/repo\nsudo chown 1000 /store/repo\nsudo chmod u+w /store/repo\n```\n\nTo run the image execute the following command (maybe you have to replace `docker` with `sudo docker`):\n\n```\ndocker run -it --name containername -p 8080:8080 -v /store/repo:/data aksw/quitstore\n```\n\nThe following example will start the quit store in the background in the detached mode.\n\n```\ndocker run -d --name containername -p 8080:8080 -v /store/repo:/data aksw/quitstore\n```\n\nNow you should be able to access the quit web interface under `http://localhost:8080` and the SPARQL 1.1 interface under `http://localhost:8080/sparql`.\n\nThe default configuration is located in `/etc/quit/config.ttl`, which can also be overwritten using a respective volume or by setting the `QUIT_CONFIGFILE` environment variable.\n\nFurther options which can be set are:\n\n* `QUIT_TARGETDIR` - the target repository directory on which quit should run\n* `QUIT_CONFIGFILE` - the path to the config.ttl (default: `/etc/quit/config.ttl`)\n* `QUIT_LOGFILE` - the path where quit should create its logfile\n* `QUIT_BASEPATH` - the HTTP base path where quit will be served\n* `QUIT_OAUTH_CLIENT_ID` - the GitHub OAuth client id (for OAuth see also the [github docu](https://developer.github.com/apps/building-oauth-apps/authorization-options-for-oauth-apps/))\n* `QUIT_OAUTH_SECRET` - the GitHub OAuth secret\n\n## Run the Tests\n\nYou need to have the quitstore installed from source, see section [Installation from Source](#installation-from-source).\n\n```\npoetry run pytest\n```\n\n## Troubleshooting\n\n### Use on Windows with restricted permissions\n\nOn Windows you might not be able to download the `.exe` file directly.\nIf so, use the `curl` command in the power shell.\n\nWhen you start the QuitStore (e.g. with `quit.exe -t .`) it will try to open a port that is available from outside, which will require permission by the administrator user.\nTo open the port only locally you should start the QuitStore with:\n\n```\nquit.exe -t . -h localhost\n```\n\nThe default port is `5000` (`http://localhost:5000/`).\n\n## Migrate from old Versions\n\n### Update to 2018-11-20 from 2018-10-29 and older\n\nIf you are migrating from an NQuads based repository, as used in older versions of the QuitStore (release 2018-10-29 and older), to an NTriples based repository (release 2018-11-20 and newer) you can use the following commands to migrate the graphs.\nYou should know that it is possible to have multiple graphs in one NQuads file, which is not possible for NTriples files.\nThus, you should make sure to have only one graph per file.\nYou may execute the steps for each NQuads file and replace `graphfile.nq` according to your filenames.\n\n```\nsed \"s/\u003c[^\u003c\u003e]*\u003e .$/./g\" graphfile.nq | LC_ALL=C sort -u \u003e graphfile.nt\nmv graphfile.nq.graph graphfile.nt.graph\ngit rm graphfile.nq\ngit add graphfile.nq.graph graphfile.nt graphfile.nt.graph\ngit commit -m \"Migrate from nq to nt\"\n```\n\n## License\n\nCopyright (C) 2017-2022 Norman Radtke \u003chttp://aksw.org/NormanRadtke\u003e, Natanael Arndt \u003chttp://aksw.org/NatanaelArndt\u003e, and contributors\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program; if not, see \u003chttp://www.gnu.org/licenses\u003e.\nPlease see [LICENSE](LICENSE) for further information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAKSW%2FQuitStore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAKSW%2FQuitStore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAKSW%2FQuitStore/lists"}