Package: gitlab2prov
Welcome togitlab2prov! 👋gitlab2provis a Python library and command line tool that extracts provenance information from GitLab projects.Thegitlab2provdata model has been designed according toW3C PROVspecification.
The model documentation can be foundhere.️🏗️ ️InstallationPlease note that this tool requires Git to be installed on your machine.Clone the project and install usingpip:pipinstall.Or install the latest release fromPyPi:pipinstallgitlab2provTo installgitlab2provwith all extra dependencies require the[dev]extras:pipinstall.[dev]# clone repo, install with extraspipinstallgitlab2prov[dev]# PyPi, install with extras⚡ Getting startedgitlab2provneeds apersonal access tokento clone git repositories and to authenticate with the GitLab API.
Followthis guideto create an access token with the requiredscopes.🚀‍ Usagegitlab2provcan be configured using the command line interface or by providing a configuration file in.yamlformat.Command Line UsageThe command line interface consists of commands that can be chained together like a unix pipeline.Usage: gitlab2prov [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

  Extract provenance information from GitLab projects.

Options:
  --version        Show the version and exit.
  --verbose        Enable logging to 'gitlab2prov.log'.
  --config FILE    Read config from file.
  --validate FILE  Validate config file and exit.
  --help           Show this message and exit.

Commands:
  combine                  Combine multiple graphs into one.
  extract                  Extract provenance information for one or more...
  load                     Load provenance files.
  merge-duplicated-agents  Merge duplicated agents based on a name to...
  pseudonymize             Pseudonymize a provenance graph.
  save                     Save provenance information to a file.
  stats                    Print statistics such as node counts and...Configuration Filesgitlab2provsupports configuration files in.yamlformat that are functionally equivalent to command line invocations.To read configuration details from a file instead of specifying on the command line, use the--configoption:# initiate a run using a config filegitlab2prov --config config/example.yamlYou can validate your config file using the provided JSON-Schemagitlab2prov/config/schema.jsonthat comes packaged with every installation:# check config file for syntactical errorsgitlab2prov --validate config/example.yamlConfig file example:-extract:url:["https://gitlab.com/example/foo"]token:tokenA-extract:url:["https://gitlab.com/example/bar"]token:tokenB-load:input:[example.rdf]-pseudonymize:-combine:-save:output:combinedformat:[json,rdf,xml,dot]-stats:fine:trueexplain:trueformatter:tableThe config file example is functionally equivalent to this command line invocation:gitlab2prov extract -u https://gitlab.com/example/foo -t tokenFoo \
            extract -u https://gitlab.com/example/bar -t tokenBar \
            load -i example.rdf                                   \
            pseudonymize                                          \
            combine                                               \
            save -o combined -f json -f rdf -f xml -f dot         \
            stats --fine --explain --formatter table🎨 Provenance Output Formatsgitlab2provsupports output formats that theprovlibrary provides:PROV-NPROV-O(RDF)PROV-XMLPROV-JSONGraphviz(DOT)🤝 ContributingContributions and pull requests are welcome!For major changes, please open an issue first to discuss what you would like to change.✨ How to citeIf you use GitLab2PROV in a scientific publication, we would appreciate citations to the following paper:Schreiber, A., de Boer, C. and von Kurnatowski, L. (2021).GitLab2PROV—Provenance of Software Projects hosted on GitLab. 13th International Workshop on Theory and Practice of Provenance (TaPP 2021), USENIX AssociationBibtex entry:@InProceedings{SchreiberBoerKurnatowski2021,author={Andreas Schreiber and Claas de~Boer and Lynn von~Kurnatowski},booktitle={13th International Workshop on Theory and Practice of Provenance (TaPP 2021)},title={{GitLab2PROV}{\textemdash}Provenance of Software Projects hosted on GitLab},year={2021},month=jul,publisher={{USENIX} Association},url={https://www.usenix.org/conference/tapp2021/presentation/schreiber},}You can also cite specific releases published on Zenodo:✏️ ReferencesInfluencial Software forgitlab2provMartin Stoffers: "Gitlab2Graph", v1.0.0, October 13. 2019,GitHub Link, DOI 10.5281/zenodo.3469385Quentin Pradet: "How do you rate limit calls with aiohttp?",GitHub Gist, MIT LICENSEInfluencial Papers forgitlab2prov:De Nies, T., Magliacane, S., Verborgh, R., Coppens, S., Groth, P., Mannens, E., and Van de Walle, R. (2013).Git2PROV: Exposing Version Control System Content as W3C PROV. InPoster and Demo Proceedings of the 12th International Semantic Web Conference(Vol. 1035, pp. 125–128).Packer, H. S., Chapman, A., and Carr, L. (2019).GitHub2PROV: provenance for supporting software project management. In11th International Workshop on Theory and Practice of Provenance (TaPP 2019).Papers that refer togitlab2prov:Andreas Schreiber, Claas de Boer (2020).Modelling Knowledge about Software Processes using Provenance Graphs and its Application to Git-based VersionControl Systems. InICSEW'20: Proceedings of the IEEE/ACM 42nd Conference on Software Engineering Workshops(pp. 358–359).Tim Sonnekalb, Thomas S. Heinze, Lynn von Kurnatowski, Andreas Schreiber, Jesus M. Gonzalez-Barahona, and Heather Packer (2020).Towards automated, provenance-driven security audit for git-based repositories: applied to germany's corona-warn-app: vision paper. InProceedings of the 3rd ACM SIGSOFT International Workshop on Software Security from Design to Deployment(pp. 15–18).Andreas Schreiber (2020).Visualization of contributions to open-source projects. InProceedings of the 13th International Symposium on Visual Information Communication and Interaction. ACM, USA.📜 Dependenciesgitlab2provdepends on several open source packages that are made freely available under their respective licenses.PackageLicenseGitPythonclickpython-gitlabprovjsonschemaruamel.yamlpydot📝 LicenseThis project isMITlicensed.Copyright © 2019 German Aerospace Center (DLR) and individual contributors.