Skip to main content

A Python tool for validating RPD files according to a specified version of the ASHRAE 229 schema.

Project description

RECI-RPDValidator

RECI-RPDValidator is a Python utility designed to validate Ruleset Project Description (RPD) files against requirements established by the ASHRAE 229 schema. It supports multiple schema versions, ensuring compatibility and compliance across various releases.

By default, the utility validates RPD files against version 0.1.0 of the ASHRAE 229 schema. If the validation fails, a detailed report of all errors encountered will be provided.

This project is an adaptation of a feature included in the Ruleset Checking Tool, created by PNNL. We have made modifications including explicit support of multiple versions of the schema, and enhance the validation error messages. All credit for the original work goes to PNNL. For more details, visit https://github.com/pnnl/ruleset-checking-tool.

This project uses jsonpath-ng, which is licensed under the Apache License 2.0.


Features

  • Validate RPD files for compliance with the ASHRAE 229 schema.
  • Support for multiple schema versions.
  • Clear and comprehensive error reporting for failed validations.

Installation

Requirements:

  • Python 3
  • jsonpath-ng
  • jsonschema
  • referencing

To install, you can use the command:

pip install rpdvalidator

Usage

Command-Line Utility

RECI-RPDValidator provides a straightforward command-line interface for validating RPD files. Use the following command to validate an RPD file:

validateRPD rpd-filename.json

Specifying a Schema Version
To validate an RPD file against a specific schema version, use the --version flag:

validateRPD rpd-filename.json --version 0.2.0

If no version is specified, the utility defaults to schema version 0.1.0.

Python

You can also use the utility as a Python module. Here's an example of how to validate an RPD file:

from rpdvalidator import validate_rpd

rpd_file = "path/to/rpd-filename.json"
validate_rpd(rpd_file)

Specifying a Schema Version
To validate an RPD file against a specific schema version, provide the version as an argument:

from rpdvalidator import validate_rpd

rpd_file = "path/to/rpd-filename.json"
schema_version = "0.2.0"
validate_rpd(rpd_file, schema_version)

Output

  • passed: Boolean indicating if the RPD file is valid.
  • errors: A list of errors found during validation.

Disclaimer Notice

  • Acknowledgment: This material is based upon work supported by the U.S. Department of Energy’s Office of Energy Efficiency and Renewable Energy (EERE) under the Building Technologies Office - DE-FOA-0002813 - Bipartisan Infrastructure Law Resilient and Efficient Codes Implementation.
  • Award Number: DE-EE0010949
  • Abridged Disclaimer: The views expressed herein do not necessarily represent the view of the U.S. Department of Energy or the United States Government.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rpdvalidator-1.1.1.tar.gz (765.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rpdvalidator-1.1.1-py3-none-any.whl (811.2 kB view details)

Uploaded Python 3

File details

Details for the file rpdvalidator-1.1.1.tar.gz.

File metadata

  • Download URL: rpdvalidator-1.1.1.tar.gz
  • Upload date:
  • Size: 765.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for rpdvalidator-1.1.1.tar.gz
Algorithm Hash digest
SHA256 39ef874c0a6e6616020f84ee6f970dbcfa2919865d17e66c56b00430ba8bb2f5
MD5 553a5b49931c9760a63697d5bd4e9f9e
BLAKE2b-256 95329b67c51774a77e7b82cfc9f12ce2cb885979c6b0be709e013f69846a5eaf

See more details on using hashes here.

File details

Details for the file rpdvalidator-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: rpdvalidator-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 811.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for rpdvalidator-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b71d39a1b0ab9a9677792ff7f028b4e922d6bb4f435cb99ba6742af21561a691
MD5 9682dd3fe3e3ad990b643db0dfd4904a
BLAKE2b-256 ba096b44ec8827a2995dcae0ec847af2d0b216249180b76edcdd025d783bd418

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page