gitlab2prov

🔍️ Extract provenance information (W3C PROV) from GitLab projects.

https://github.com/dlr-sc/gitlab2prov

Science Score: 85.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README
  • Academic publication links
    Links to: acm.org, zenodo.org
  • Committers with academic emails
    3 of 4 committers (75.0%) from academic institutions
  • Institutional organization owner
    Organization dlr-sc has institutional domain (www.dlr.de)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.5%) to scientific vocabulary

Keywords

extract-provenance-information git gitlab graphs knowledge-graph prov-generation provenance python software-analytics w3c-prov
Last synced: 4 months ago · JSON representation ·

Repository

🔍️ Extract provenance information (W3C PROV) from GitLab projects.

Basic Info
  • Host: GitHub
  • Owner: DLR-SC
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 2.61 MB
Statistics
  • Stars: 16
  • Watchers: 7
  • Forks: 3
  • Open Issues: 8
  • Releases: 15
Topics
extract-provenance-information git gitlab graphs knowledge-graph prov-generation provenance python software-analytics w3c-prov
Created about 6 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

Welcome to gitlab2prov! 👋

License: MIT Badge: Made with Python Badge: PyPi Version Badge: PyPi Downloads Monthly Twitter: DLR Software Badge: Open in VSCode Badge: DOI Badge: W3C PROV Badge: Citation File Format Inside

gitlab2prov is a Python library and command line tool that extracts provenance information from GitLab projects.


The gitlab2prov data model has been designed according to W3C PROV specification. The model documentation can be found here.

️🏗️ ️Installation

Please note that this tool requires Git to be installed on your machine.

Clone the project and install using pip: bash pip install .

Or install the latest release from PyPi: bash pip install gitlab2prov

To install gitlab2prov with all extra dependencies require the [dev] extras: bash pip install .[dev] # clone repo, install with extras pip install gitlab2prov[dev] # PyPi, install with extras

⚡ Getting started

gitlab2prov needs a personal access token to clone git repositories and to authenticate with the GitLab API. Follow this guide to create an access token with the required scopes.

🚀‍ Usage

gitlab2prov can be configured using the command line interface or by providing a configuration file in .yaml format.

Command Line Usage

The 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 Files

gitlab2prov supports configuration files in .yaml format that are functionally equivalent to command line invocations.

To read configuration details from a file instead of specifying on the command line, use the --config option: ```ini

initiate a run using a config file

gitlab2prov --config config/example.yaml You can validate your config file using the provided JSON-Schema `gitlab2prov/config/schema.json` that comes packaged with every installation: ini

check config file for syntactical errors

gitlab2prov --validate config/example.yaml ```

Config file example:

yaml - 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: combined format: [json, rdf, xml, dot] - stats: fine: true explain: true formatter: table

The 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 Formats

gitlab2prov supports output formats that the prov library provides: * PROV-N * PROV-O (RDF) * PROV-XML * PROV-JSON * Graphviz (DOT)

🤝 Contributing

Contributions and pull requests are welcome!
For major changes, please open an issue first to discuss what you would like to change.

✨ How to cite

If you use GitLab2PROV in a scientific publication, we would appreciate citations to the following paper:

Bibtex entry:

BibTeX @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: DOI

✏️ References

Influencial Software for gitlab2prov * Martin Stoffers: "Gitlab2Graph", v1.0.0, October 13. 2019, GitHub Link, DOI 10.5281/zenodo.3469385

  • Quentin Pradet: "How do you rate limit calls with aiohttp?", GitHub Gist, MIT LICENSE

Influencial Papers for gitlab2prov:

Papers that refer to gitlab2prov:

📜 Dependencies

gitlab2prov depends on several open source packages that are made freely available under their respective licenses.

| Package | License | | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | GitPython | License | | click | License | | python-gitlab | License: LGPL v3 | | prov | License: MIT | | jsonschema | License: MIT | | ruamel.yaml | License: MIT | | pydot | License: MIT |

📝 License

This project is MIT licensed.
Copyright © 2019 German Aerospace Center (DLR) and individual contributors.

Owner

  • Name: DLR Institute for Software Technology
  • Login: DLR-SC
  • Kind: organization
  • Email: opensource@dlr.de
  • Location: Cologne, Berlin, Braunschweig, Oberpfaffenhofen, Bremen

German Aerospace Center (DLR)

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use GitLab2PROV in your research, please cite it using these metadata."
title: GitLab2PROV
abstract: "gitlab2prov is a Python library and command line tool that extracts provenance information from GitLab projects."
type: software
authors: 
  - family-names: "de Boer"
    given-names: Claas
    affiliation: "German Aerospace Center (DLR)"
    orcid: "https://orcid.org/0000-0002-1841-8099"
  - family-names: Schreiber
    given-names: Andreas
    affiliation: "German Aerospace Center (DLR)"
    orcid: "https://orcid.org/0000-0001-5750-5649"
version: "2.2.0"
date-released: "2023-09-05"
license: MIT
repository-code: "https://github.com/DLR-SC/gitlab2prov"
references:
  - authors: 
    - family-names: Schreiber
      given-names: Andreas
      affiliation: "German Aerospace Center (DLR)"
      orcid: "https://orcid.org/0000-0001-5750-5649"
    - family-names: "de Boer"
      given-names: Claas
      affiliation: "German Aerospace Center (DLR)"
      orcid: "https://orcid.org/0000-0002-1841-8099"
    - family-names: "von Kurnatowski"
      given-names: Lynn
      affiliation: "German Aerospace Center (DLR)"
      orcid: "https://orcid.org/0000-0001-5144-702X"
    title: "GitLab2PROV—Provenance of Software Projects hosted on GitLab"
    type: conference-paper
    conference:
      name: "13th  International  Workshop  on  Theory  and  Practice  of  Provenance  (TaPP  2021)"
    year: 2021
    month: 7
keywords: 
  - provenance
  - git
  - "software-analytics"
  - gitlab
  - "w3c-prov"

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 622
  • Total Committers: 4
  • Avg Commits per committer: 155.5
  • Development Distribution Score (DDS): 0.127
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
cdboer c****r@c****e 543
Andreas Schreiber a****r@d****e 72
de Boer, Claas c****r@d****e 6
Daniel Mohr d****r@d****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 5 months ago

All Time
  • Total issues: 87
  • Total pull requests: 13
  • Average time to close issues: 6 months
  • Average time to close pull requests: about 19 hours
  • Total issue authors: 9
  • Total pull request authors: 2
  • Average comments per issue: 1.46
  • Average comments per pull request: 0.23
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • cdboer (60)
  • onyame (17)
  • LuigiaCristiano (3)
  • akshaykagarwal (2)
  • schlauch (1)
  • sdruskat (1)
  • hecking (1)
  • daniel-mohr (1)
  • muelldlr (1)
Pull Request Authors
  • cdboer (12)
  • daniel-mohr (1)
Top Labels
Issue Labels
bug (27) feature (21) enhancement (13) documentation (6) question (5) model (5) deployment (4) SE Checklist (3) good first issue (3) refactoring (2) github (2)
Pull Request Labels
model (1) feature (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 89 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 12
  • Total maintainers: 1
pypi.org: gitlab2prov

Extract provenance information (W3C PROV) from GitLab projects.

  • Documentation: https://gitlab2prov.readthedocs.io/
  • License: MIT License Copyright (c) 2019 German Aerospace Center (DLR) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 2.2.0
    published over 2 years ago
  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 89 Last month
Rankings
Dependent packages count: 10.0%
Stargazers count: 15.2%
Forks count: 16.8%
Average: 20.0%
Dependent repos count: 21.7%
Downloads: 36.2%
Maintainers (1)
Last synced: 5 months ago

Dependencies

docs/requirements.txt pypi
  • prov *
.github/workflows/cffconvert.yml actions
  • actions/checkout v3 composite
  • citation-file-format/cffconvert-github-action 2.0.0 composite
.github/workflows/python-publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/pythonapp.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
pyproject.toml pypi
  • click *
  • git-python *
  • jsonschema *
  • prov >=2.0.0
  • pydot >=1.2.0
  • python-gitlab *
  • ruamel.yaml *