Metadata-Version: 2.1
Name: repomaestro
Version: 2.0.0
Summary: Code repositories conductor
Home-page: https://github.com/cliffano/repomaestro
License: Apache-2.0
Keywords: repomaestro,...
Author: Cliffano Subagio
Author-email: cliffano@gmail.com
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: Jinja2 (>=3.1.6,<4.0.0)
Requires-Dist: PyGithub (>=2.6.1,<3.0.0)
Requires-Dist: PyYAML (>=6.0.2,<7.0.0)
Requires-Dist: click (>=8.1.8,<9.0.0)
Requires-Dist: conflog (>=2.0.1,<3.0.0)
Project-URL: Documentation, https://github.com/cliffano/repomaestro
Project-URL: Repository, https://github.com/cliffano/repomaestro
Description-Content-Type: text/markdown

<img align="right" src="https://raw.github.com/cliffano/repomaestro/main/avatar.jpg" alt="Avatar"/>

[![Build Status](https://github.com/cliffano/repomaestro/workflows/CI/badge.svg)](https://github.com/cliffano/repomaestro/actions?query=workflow%3ACI)
[![Security Status](https://snyk.io/test/github/cliffano/repomaestro/badge.svg)](https://snyk.io/test/github/cliffano/repomaestro)
[![Dependencies Status](https://img.shields.io/librariesio/release/pypi/repomaestro)](https://libraries.io/pypi/repomaestro)
[![Published Version](https://img.shields.io/pypi/v/repomaestro.svg)](https://pypi.python.org/pypi/repomaestro)
<br/>

Repo Maestro
------------

Repo Maestro is a code repositories configuration file manager.

It fetches repositories data from GitHub, stored in a Repo Maestro configuration file, and then generates output files using Jinja2 templates rendered with the repositories data.

Installation
------------

    pip3 install repomaestro

Usage
-----

Initialise a Repo Maestro configuration file with GitHub repositories data:

    GITHUB_TOKEN=<github_token> repomaestro init --conf-file .repomaestro.yaml --github-id cliffano

Please note that the fetched GitHub repositories data are based on the ones accessible using the provided `GITHUB_TOKEN`, which can include repositories owned by multiple users and orgs.

When `--github-ids` flag is provided, only the repositories owned by the specified user or org will be included in Repo Maestro configuration file.

Generate output file based on a Jinja2 template:

    repomaestro gen --conf-file path/to/.repomaestro.yaml --template-file path/to/some-template.j2 --out-file path/to/some-output.json

Show help guide:

    repomaestro --help

### Templates

Template parameters:

| Parameter | Description |
|-----------|-------------|
| `repos` | Repositories data with repository name as key and a map of repository properties `git_url`, `homepage`, `keywords`, and `ssh_url` as values. |

The `repos` parameter can then be used in Jinja2 templates like this:

```jinja2
{
  "repos": {
    {% for repo_name, repo_data in repos.items() %}
    "{{ repo_name }}": {
      "git_url": "{{ repo_data.git_url }}",
      "homepage": "{{ repo_data.homepage }}",
      "keywords": {{ repo_data.keywords }}
    }{% if not loop.last %},{% endif %}
    {% endfor %}
  }
}
```

Colophon
--------

[Developer's Guide](https://cliffano.github.io/developers_guide.html#python)

Build reports:

* [Lint report](https://cliffano.github.io/repomaestro/lint/pylint/index.html)
* [Code complexity report](https://cliffano.github.io/repomaestro/complexity/wily/index.html)
* [Unit tests report](https://cliffano.github.io/repomaestro/test/pytest/index.html)
* [Test coverage report](https://cliffano.github.io/repomaestro/coverage/coverage/index.html)
* [Integration tests report](https://cliffano.github.io/repomaestro/test-integration/pytest/index.html)
* [API Documentation](https://cliffano.github.io/repomaestro/doc/sphinx/index.html)

