https://github.com/tedivm/dapperdata
An opinionated formatter for configuration files
https://github.com/tedivm/dapperdata
formatter json python yaml
Last synced: 2 months ago
JSON representation
An opinionated formatter for configuration files
- Host: GitHub
- URL: https://github.com/tedivm/dapperdata
- Owner: tedivm
- License: mit
- Created: 2023-01-29T02:53:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-11T23:34:25.000Z (almost 3 years ago)
- Last Synced: 2024-05-01T21:37:38.432Z (about 2 years ago)
- Topics: formatter, json, python, yaml
- Language: Python
- Homepage: https://pypi.org/project/dapperdata/
- Size: 33.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DapperData
DapperData is an opinionated formatter for YAML and JSON files.
It has two options- fix files in place, or just yell about files that fail.
## Usage
### Install
```bash
pip install dapperdata
```
### Fix All Files in Place
If you want to fix all of the files in your current directory, recursively, run this command-
```bash
dapperdata pretty . --no-dry-run
```
### Test Files without Changing
You can use dapperdata to run a test in CI to confirm that all of the files already match the preferred styling.
```bash
dapperdata pretty .
```
This will return an list of all files to change, and will return a status code of 1 if any changes are needed. If no changes are needed the success status code (0) is returned.
## Configuration
### pyproject.toml
```toml
[tool.dapperdata]
exclude_paths = [".venv", "tests", ".git", ".vscode"]
```
### Environment Variables
```bash
DAPPERDATA_EXCLUDE_PATHS='[".venv", "tests", ".git", ".vscode"]'
```
## Excluded Files
If a `.gitignore` file is present the directories in it will be excluded from scans.