Giter Site home page Giter Site logo

package-comparison's Introduction

Task

У нас есть публичный REST API для нашей базы данных: https://rdb.altlinux.org/api/

У него есть метод /export/branch_binary_packages/{branch} в качестве бранча можно использовать sisyphus и p10 Нужно сделать модуль python и cli утилиту linux (использующую этот модуль на python), которая:

  1. получает списки бинарных пакетов ветки sisyphus и p10
  2. делает сравнение полученных списков пакетов и выводит JSON (структуру нужно придумать), в котором будет отображено:
  • все пакеты, которые есть в p10 но нет в sisyphus
  • все пакеты, которые есть в sisyphus но их нет в p10
  • все пакеты, version-release которых больше в sisyphus чем в p10

Это нужно сделать для каждой из поддерживаемых веткой архитектур (поле arch в ответе). Процесс разработки нужно оформить в виде git репозитория с историей всех изменений с самого первого этапа (без переписывания коммитов) и выложить, например, на github Утилита должна запускаться под операционной системой Linux (проверяться будет на ALT Linux, версии 10), к ней должно быть README на английском языке, содержащее инструкцию по запуску. Сравнение version-release согласно правилам версионирования rpm пакетов. Cайт работающий на базе этого API - https://packages.altlinux.org/ru/sisyphus/.

Project Deployment

Download the project

  git clone [email protected]:A-V-tor/package-comparison.git

or

  git clone https://github.com/A-V-tor/package-comparison.git
  cd package-comparison

Install dependencies

  pip install poetry

There are ready-made sources in the dist directory, but they require Python 3.11 You can change it to a manual version in the pyproject.toml file

Build the utility

  1. poetry build # if you changed the configuration file pyproject.toml
  2. python -m pip install dist/package_comparison-0.1.0-py3-none-any.whl

Run script

Usage: basalt-start [OPTIONS] BRANCH BRANCH2

  basalt-start sisyphus p10

The result of the work is the following structure

  {
    'first_branch_difference': first_branch_difference, # many packages unique to the first branch set[Package]
    'second_branch_difference': second_branch_difference, # many packages unique to the second branch set[Package]
    'version_release_difference': version_release_difference, # many packages whose version is higher in the first branch compared to the second set[Package]
    'error': error_packages, # error counter when comparing versions
  }

An example of the finished utility

Mac OS

asciicast

Ubuntu 22.04

asciicast

ALT 10

asciicast

package-comparison's People

Contributors

a-v-tor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.