- devbox
- Python (3.12.2)
- pip
Install the devbox CLI tool if you haven't already. You can install it using the following command:
curl -fsSL https://get.jetpack.io/devbox | bash
git clone [email protected]:anevis/json-to-markdown.git
cd json-to-markdown-converter
devbox shell
From within devbox shell
pip install -r requirements.txt
From outside devbox shell
devbox run install
The functionality can be used in the command line or in Python code.
To use the functionality in Python code, you can import the MDConverter
class from the yaml_to_markdown.md_converter
module.
The md_converter.py
file contains the MDConverter
class, which is used by the convert
function to perform the conversion.
To use the functionality from the command line, you can run the convert.py
script in the yaml_to_markdown
directory.
This file contains the convert
function, which takes a JSON or YAML file and converts it to Markdown.
Tests for the project are located in the *_test.py
files.
These tests use the Pytest and Mock libraries to test the functionality of the convert
function and the MDConverter
class.
You can run the tests with the following command:
From within devbox shell
pytest src/
From outside devbox shell
devbox run test
With Coverage, the coverage report will be generated in the coverage.xml
file.
devbox run test-cov
The project uses the Black and Flake8 libraries for code formatting and linting. You can run the following commands to format and lint the code:
From within devbox shell
black src/
flake8 src/
From outside devbox shell
devbox run format
devbox run lint
You can use devbox run format-check
to check if the code is formatted correctly without making any changes.
We welcome contributions to this project. Please feel free to submit a pull request or open an issue on GitHub.
This project is licensed under the MIT License - see the LICENSE file for details.