Welcome to darca-embeddings’s documentation!

Project Overview

darca-yaml

A lightweight YAML utility library with validation support using Cerberus, designed for simplicity and composability in structured Python projects.

Build Status Deploy Status Codecov Black code style License PyPi GitHub Pages

Overview

darca-yaml provides utilities for:

  • 📖 Loading and saving YAML files

  • ✅ Validating YAML content with Cerberus

  • 🔗 Integrated exception handling (darca-exception)

  • 📄 File handling via darca-file-utils

  • 🧪 100% test coverage with Pytest and CI integration

Installation

pip install darca-yaml

Usage

from darca_yaml.yaml_utils import YamlUtils

schema = {"name": {"type": "string"}, "enabled": {"type": "boolean"}}

data = YamlUtils.load_yaml_file("config.yaml")
YamlUtils.validate_yaml(data, schema)
YamlUtils.save_yaml_file("output.yaml", data, validate=True, schema=schema)

Development Setup

Clone the repo and install dependencies:

git clone https://github.com/roelkist/darca-yaml
cd darca-yaml
make install

Run checks before committing:

make check

Run individual targets (faster iteration):

make format
make test
make precommit
make docs

Contribution Guide

We welcome contributions via pull requests to main. Please see the CONTRIBUTING.rst file for detailed instructions.

License

MIT

Getting Started

Community & Contribution

Contributing to darca-yaml

We’re glad you’re interested in contributing to darca-yaml 🧪📦 We follow a structured approach that ensures stability, consistency, and quality.

Getting Started

  1. Clone this repository:

    git clone https://github.com/roelkist/darca-yaml
    cd darca-yaml
    
  2. Create a feature branch:

    git checkout -b feature/my-cool-update
    
  3. Install all dependencies (including dev + docs):

    make install
    
  4. Write your changes, ensuring: - You follow the existing structure and formatting - You include/update tests to maintain 100% test coverage - You write/update docstrings and examples

  5. Run all checks before committing:

    make check
    

    This will run: - Code formatters (Black + isort) - Pre-commit validations - Tests with coverage report - Docs build

  6. Commit and push your branch:

    git push origin feature/my-cool-update
    
  7. Open a Pull Request to main.

    • Add a clear description of what you changed and why

    • Link related issues if applicable

    • CI will automatically validate your PR

Templates

  • ✅ Feature Requests: use the GitHub issue template

  • 🐞 Bug Reports: include reproduction steps and logs

  • 📚 Doc Improvements: feel free to submit directly via PR!

CI/CD Notes

  • make ci is used in GitHub Actions to perform the full validation suite

  • All individual make targets can be run locally for quicker dev cycles

License

By contributing, you agree that your contributions will be licensed under the same license as the project: MIT

Thank you 🙌