Skip to content

lytic11-web/python-project-50

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hexlet tests and linter status:

Actions Status Quality Gate Status Python CI Coverage Maintainability Rating

Description

This project is a difference generator (diff) for configuration files (JSON, YAML). It supports multiple output formats: stylish, plain, and json.

Built with

Tool Description
uv An extremely fast Python package and project manager, written in Rust
pytest A mature full-featured Python testing tool
ruff An extremely fast Python linter and code formatter, written in Rust

Installation

Clone the repository

git clone https://github.com/lytic11-web/python-project-50.git
cd python-project-50

Install dependencies

make install

Usage

gendiff [--format FORMAT] filepath1 filepath2

Options

 --format, -f - output format (stylish, plain, json). Default: stylish

Examples

Stylish format (default)

uv run gendiff tests/test_data/nested/file1.json tests/test_data/nested/file2.json

Plain format

uv run gendiff --format plain tests/test_data/nested/file1.json tests/test_data/nested/file2.json

JSON format

uv run gendiff --format json tests/test_data/flat/file1.json tests/test_data/flat/file2.json

Supported formats

Output formats:

  • stylish - formatted output with indentation (default)
  • plain - flat text format with change descriptions
  • json - structured JSON output

Input file formats:

  • JSON (.json)
  • YAML (.yml, .yaml)

Running tests

# Run all tests
make test

# Run tests with coverage
make test-coverage

# Run linter
make lint

# Run all checks (tests + lint)
make check

# Format code
make format

# Build package
make build

License

This project is part of the Hexlet Python Developer course.

Demo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published