Readme.md

ALTRepoDiffChecker

See Readme_ru.md in Russian.

A simple CLI utility for comparing 2 branches using the AltRepo API. The utility is based on the ALTRepoAPILib library, which performs the main work.

Working with the utility

Cloning the repository:

git clone https://gitflic.ru/project/armatik/altrepodiffchecker.git

Go to the directory of the cloned repository:

cd altrepodiffchecker

Install the necessary libraries:

pip3 install -r requirements.txt

Launching the utility:

python3 src/main.py

Then follow the instructions in the terminal.

Branch names can be obtained from packages.altlinux.org

The name of the architectures can be obtained from the page packages.altlinux.org/en/sisyphus/about/

Working with the library

Cloning the repository:

git clone https://gitflic.ru/project/armatik/altrepodiffchecker.git

The file containing all the library functions is located on the path altrepodiffchecker/src/ALTRepoAPILib.py, and dependencies in altrepodiffchecker/requirements.txt

Getting the differences of two branches in JSON format

To get the differences of two branches in JSON format, use the reps_difference method.

Usage example:

with open("template.json", 'w') as file:
    file.write(reps_difference(repo_one_name, repo_two_name, archs, print_status))

Where:

repo_one_name and repo_two_name are the names of the branches to be compared. Example of sisyphus and p10.

archs is an array of names of architectures for which a comparison will be made. Example ['x86_64', 'noarch', 'i586'].

print_status is a variable of type bool, if True, the status of request execution will be output to the terminal.

Structure of the returned JSON:

{
    "First_Branch": "string",
    "Second_Branch": "string",
    "Archs": [
          "arch1(type: string)"
    ],
    "arch1": {
        "Package_only_in_one_count": 0,
        "Package_only_in_one": [
            {
                "name": "string",
                "epoch": 0,
                "version": "string",
                "release": "string",
                "arch": "string",
                "disttag": "string",
                "buildtime": 0,
                "source": "string"
            }
        ],
        "Package_only_in_two_count": 0,
        "Package_only_in_two": [
            {
                "name": "string",
                "epoch": 0,
                "version": "string",
                "release": "string",
                "arch": "string",
                "disttag": "string",
                "buildtime": 0,
                "source": "string"
            }
        ],
        "Package_newest_in_one_count": 0,
        "Package_newest_in_one": [
            {
                "name": "string",
                "epoch": 0,
                "version": "string",
                "release": "string",
                "arch": "string",
                "disttag": "string",
                "buildtime": 0,
                "source": "string"
            }
        ]
    }
}

Developed by: Semen Fomchenkov GitFlic, Telegram, e-mail

Описание

Опишите проект

Конвейеры
0 успешных
0 с ошибкой