{"id":18591861,"url":"https://github.com/sdsc-ordes/gimie","last_synced_at":"2025-04-10T15:31:51.680Z","repository":{"id":65353110,"uuid":"575353541","full_name":"sdsc-ordes/gimie","owner":"sdsc-ordes","description":"Extract linked metadata from repositories","archived":false,"fork":false,"pushed_at":"2023-12-20T15:16:30.000Z","size":2957,"stargazers_count":4,"open_issues_count":12,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-12-24T11:05:05.912Z","etag":null,"topics":["cli","fair-data","git","library","linked-open-data","metadata-extraction","scientific-software"],"latest_commit_sha":null,"homepage":"https://sdsc-ordes.github.io/gimie/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sdsc-ordes.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-12-07T10:19:30.000Z","updated_at":"2024-01-09T11:47:30.811Z","dependencies_parsed_at":null,"dependency_job_id":"f4da918f-d2b7-4a2b-b2df-83651c843314","html_url":"https://github.com/sdsc-ordes/gimie","commit_stats":{"total_commits":118,"total_committers":5,"mean_commits":23.6,"dds":0.6949152542372881,"last_synced_commit":"6532616ceb536fc4fdf3ed23b9ee95f295d5ea2f"},"previous_names":["sdsc-ordes/gimie","sdsc-ord/gimie"],"tags_count":15,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fgimie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fgimie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fgimie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fgimie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdsc-ordes","download_url":"https://codeload.github.com/sdsc-ordes/gimie/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243465,"owners_count":21071054,"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":["cli","fair-data","git","library","linked-open-data","metadata-extraction","scientific-software"],"created_at":"2024-11-07T01:05:16.805Z","updated_at":"2025-04-10T15:31:51.671Z","avatar_url":"https://github.com/sdsc-ordes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![gimie](docs/logo.svg)](https://github.com/sdsc-ordes/gimie)\n\n[![PyPI version](https://badge.fury.io/py/gimie.svg)](https://badge.fury.io/py/gimie) [![Python Poetry Test](https://github.com/sdsc-ordes/gimie/actions/workflows/poetry-pytest.yml/badge.svg)](https://github.com/sdsc-ordes/gimie/actions/workflows/poetry-pytest.yml) [![docs](https://github.com/sdsc-ordes/gimie/actions/workflows/sphinx-docs.yml/badge.svg)](https://sdsc-ordes.github.io/gimie) [![Coverage Status](https://coveralls.io/repos/github/sdsc-ordes/gimie/badge.svg?branch=main)](https://coveralls.io/github/sdsc-ordes/gimie?branch=main)\n\nGimie (GIt Meta Information Extractor) is a python library and command line tool to extract structured metadata from git repositories.\n\n\n## Context\nScientific code repositories contain valuable metadata which can be used to enrich existing catalogues, platforms or databases. This tool aims to easily extract structured metadata from a generic git repositories. It can extract extract metadata from the Git provider (GitHub or GitLab) or from the git index itself.\n\n----------------------------------------------------------------------\n\nUsing Gimie: easy peasy, it's a 3 step process.\n\n## 1: Installation\n\nTo install the stable version on PyPI:\n\n```shell\npip install gimie\n```\n\nTo install the dev version from github:\n\n```shell\npip install git+https://github.com/sdsc-ordes/gimie.git@main#egg=gimie\n```\n\nGimie is also available as a docker container hosted on the [Github container registry](https://github.com/sdsc-ordes/gimie/pkgs/container/gimie):\n\n```shell\ndocker pull ghcr.io/sdsc-ordes/gimie:latest\n\n# The access token can be provided as an environment variable\ndocker run -e GITHUB_TOKEN=$GITHUB_TOKEN ghcr.io/sdsc-ordes/gimie:latest gimie data \u003crepo\u003e\n```\n\n## 2 : Set your credentials\n\nIn order to access the github api, you need to provide a github token with the `read:org` scope.\n\n### A. Create access tokens\n\nNew to access tokens? Or don't know how to get your Github / Gitlab token ?\n\nHave no fear, see\n[here for Github tokens](https://docs.github.com/en/enterprise-server@3.4/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) and [here for Gitlab tokens](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html).\n(Note: tokens are as precious as passwords! Treat them as such.)\n\n### B. Set your access tokens via the Terminal\n\nGimie will use your access tokens to gather information for you. If you want info about a Github repo, Gimie needs your Github token; if you want info about a Gitlab Project then Gimie needs your Gitlab token.\n\nAdd your tokens one by one in your terminal:\nyour Github token:\n```bash\nexport GITHUB_TOKEN=\n```\nand/or your Gitlab token:\n```bash\nexport GITLAB_TOKEN=\n```\n\n## 3: GIMIE info ! Run Gimie\n\n### As a command line tool\n\n```shell\ngimie data https://github.com/numpy/numpy\n```\n(want a Gitlab project instead? Just replace the URL in the command line)\n\n### As a python library\n\n```python\nfrom gimie.project import Project\nproj = Project(\"https://github.com/numpy/numpy\")\n\n# To retrieve the rdflib.Graph object\ng = proj.extract()\n\n# To retrieve the serialized graph\ng_in_ttl = g.serialize(format='ttl')\nprint(g_in_ttl)\n```\nFor more advanced use see [the documentation](https://sdsc-ordes.github.io/gimie/intro/usage_python.html).\n## Outputs\n\nThe default output is [Turtle](https://www.w3.org/TR/turtle/), a textual syntax for [RDF](https://en.wikipedia.org/wiki/Resource_Description_Framework) data model. We follow the schema recommended by [codemeta](https://codemeta.github.io/).\nSupported formats are turtle, json-ld and n-triples (by specifying the `--format` argument in your call i.e. `gimie data https://github.com/numpy/numpy --format 'ttl'`).\n\nWith no specifications, Gimie will print results in the terminal. Want to save Gimie output to a file? Add your file path to the end : `gimie data https://github.com/numpy/numpy \u003e path_to_output/gimie_output.ttl`\n\n----------------------------------------------------------------------\n\n## Contributing\n\nAll contributions are welcome. New functions and classes should have associated tests and docstrings following the [numpy style guide](https://numpydoc.readthedocs.io/en/latest/format.html).\n\nThe code formatting standard we use is [black](https://github.com/psf/black), with `--line-length=79` to follow [PEP8](https://peps.python.org/pep-0008/) recommendations. We use [pytest](https://docs.pytest.org/en/7.2.x/) as our testing framework. This project uses [pyproject.toml](https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/) to define package information, requirements and tooling configuration.\n\n### For development:\n\nactivate a conda or virtual environment with Python 3.8 or higher\n\n```shell\ngit clone https://github.com/sdsc-ordes/gimie \u0026\u0026 cd gimie\nmake install\n```\n\nrun tests:\n\n```shell\nmake test\n```\n\nrun checks:\n\n```shell\nmake check\n```\nfor an easier use Github/Gitlab APIs, place your access tokens in the `.env` file: (and don't worry, the `.gitignore` will ignore them when you push to GitHub)\n\n```\ncp .env.dist .env\n```\n\nbuild documentation:\n\n```shell\nmake doc\n```\n\n## Releases and Publishing on Pypi\n\nReleases are done via github release\n\n- a release will trigger a github workflow to publish the package on Pypi\n- Make sure to update to a new version in `pyproject.toml` and `conf.py` before making the release\n- It is possible to test the publishing on Pypi.test by running a manual workflow: go to github actions and run the Workflow: 'Publish on Pypi Test'\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdsc-ordes%2Fgimie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdsc-ordes%2Fgimie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdsc-ordes%2Fgimie/lists"}