Skip to content

sva24/python-project-50

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hexlet tests and linter status:

Actions Status Github Actions Status

Code Climate maintainability and test coverage:

Maintainability Test Coverage

🖥️ Вычислитель отличий

Вычислитель отличий – программа, которая определяет разницу между двумя структурами данных.

Возможности утилиты:

Поддержка разных входных форматов: yaml, json Генерация отчета в виде plain text, stylish и json

🔨 Минимальные требования

python >=3.10
pytest-cov >= 5.0.0
pyyaml >= 6.0.1

🛠️ Установка

git clone https://github.com/sva24/python-project-50.git
cd python-project-50
make install
make build
make package-install

💡 Запуск утилиты:

  • gendiff -h Запускает справку по утилите:

usage: gendiff.cmd [-h] [-f FORMAT] first_file second_file

Compares two configuration files and shows a difference.

positional arguments: first_file second_file

options: -h, --help show this help message and exit -f FORMAT, --format FORMAT set format of output

  • gendiff file1.json file2.json Запускает сравнение двух файлов. Форматер по умолчанию указан 'stylish'.

  • gendiff -f plain file1.json file2.json Запускает сравнение двух файлов с форматером 'plain'. Отражает ситуацию, словно мы объединили второй объект с первым.

  • gendiff -f json file1.json file2.json Запускает сравнение двух файлов с форматером 'json'. Выводит сравнение в формате JSON.

📺 Запись демонстрации работы программы:

Плоские файлы JSON

asciicast

Плоские файлы YAML

asciicast

Файлы JSON и YAML с вложенной структурой

asciicast

Плоский формат plain

asciicast

Формат JSON

asciicast

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors