This is the 2nd training project of "Python Developer" specialization.
The app compares two files (JSON or YAML) and shows the difference between them.
- Implemented data abstraction and tree data structures processing
- Practiced TDD through Pytest and parameterized fixtures
- Implemented 3 different output options
This project was built using these tools:
Tool | Description |
---|---|
Poetry | Python dependency management and packaging |
Pytest | Python testing framework |
Flake8 | Linter to check the style of the code |
Code Climate | Checks code quality standards on every commit |
GitHub Actions | Continuous Integration (CI) |
- gendiff path/to/file_1 path/to/file_2 - shows the difference in nested text format
- gendiff --format plain path/to/file_1 path/to/file_2 - shows the difference in plain text format
- gendiff --format json path/to/file_1 path/to/file_2 - shows the difference in JSON format
Example output (in plain text format):
Property 'follow' was removed
Property 'timeout' was updated. From 50 to [complex value]
Property 'verbose' was added with value: True
Example output (in nested text format):
{
- follow: False
- timeout: 50
+ timeout: {
host: hexlet
proxy: myprox
}
+ verbose: True
}
You can install the application using the following commands:
- make install - to install the required dependencies
- make package-install - to install the application itself
Show how the application interacts with a user:
- Flat JSON comparison
- Package works with command line: https://asciinema.org/a/gFNosekyuViKk5rnLD43ta4dk
- Package works as library: https://asciinema.org/a/sj3WHIVbtESrCKfRGz8h3X9OT
- Flat YAML comparison
- Nested comparison
- Plain format output
- JSON format output