Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add info om data validation in readme #47

Merged
merged 1 commit into from
May 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,25 @@ definitions.
## Contributing

See CONTRIBUTING.md for more details on how to contribute.
This library is maintained by NRK and has focus on Broadcast devices.
This library is maintained by NRK and has focus on Broadcast devices.

## Data Validation / Commit Quality Checks

There are two ways this repo focuses on keeping quality device-type definitions:

- **Pre-Commit Checks** - Optional, but **highly recommended**, for helping to identify simple issues before committing. (trailing-whitespace, end-of-file-fixer, check-yaml, yamlfmt, yamllint)
- Installation
- Virtual Environment Route
- It is recommended to create a virtual env for your repo (`python3 -m venv venv`)
- Install the required pip packages (`pip install -r requirements.txt`)
- Continue to the "Install `pre-commit` Hooks"
- `pre-commit` Only Route
- [Install pre-commit](https://pre-commit.com/#install) (`pip install pre-commit`)
- Install `pre-commit` Hooks
- To install the pre-commit script: `pre-commit install`
- Usage & Useful `pre-commit` Commands
- After staging your files with `git`, to run the pre-commit script on changed files: `pre-commit run`
- To run the pre-commit script on all files: `pre-commit run --all`
- To uninstall the pre-commit script: `pre-commit uninstall`
- Learn more about [pre-commit](https://pre-commit.com/)
- **GitHub Actions** - Automatically run before a PR can be merged. Repeats yamllint & validates against NetBox Device-Type Schema.
Loading