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.0.1.tar.gz (53.4 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.0.1-py3-none-any.whl (55.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rpdvalidator-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0996caa84681ca80a94fbe2251de9f66385b85c7e2826fc3b6178f06dd16a181
MD5 1221ebd35f46b8117603ecb4f58285bc
BLAKE2b-256 211d589292fd775dee6d2f72d75c5cf3ac7d43eae5c01b6b5daa443bc68cb7f4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for rpdvalidator-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 de8d4f5cf9ed9b7f80df61efb87ce1296cb941969bf3dd6018c22409e83696c0
MD5 0129ab15402ba1fc418b0d89d96f5405
BLAKE2b-256 dd954c05e8cb5539e96aa8ee2704a16e873408b7ed605430ddf55c82eb1cb148

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