Lattice
A Python package that provides support for a schema-based building data model framework, currently under development as ASHRAE Standard 232P, where schema are described in compliant YAML source files. Lattice performs:
- Data model validation: Ensures the YAML schema source files are well-formed.
- Schema generation: Translates the YAML schema source files into equivalent JSON Schema.
- Data file validation: Validates data files against the generated JSON Schema and additional validation requirements not supported by JSON Schema (e.g., reference checking).
- Data model documentation: Generates web documentation of the data model from the YAML schema source files and templated markdown files (requires Go, Hugo, and Node.js). This web documentation can be automatically deployed to GitHub pages.
Future additions under development include:
- Generation of PDF documentation of the data model.
- Generation of C/C++ source code for processing compliant data files.
Installing
To install Lattice, simply:
pip install lattice
To generate data model documentation, you'll also need to install:
Example Usage
lattice is Python package defining the Lattice class. Lattice relies on a predetermined structure of subdirectories:
- schema (optional): Contains YAML source schema files describing the data model. Alternatively, if YAML source schema files are not provided in a "schema" directory, they must be in the root directory.
- docs (optional): Contains markdown templates that are used to render model documentation. An optional subdirectory of "docs" called "web" contains additional content required for generating the web documentation including configuration settings, graphics, and supplementary content.
- examples (optional): Example data files compliant with the data model.
The Lattice class is instantiated with the following parameters:
-
root_directory: This is the directory containing the source subdirectories.The default is the current working directory. -
build_directory: This is the path to the directory where the content related to lattice is stored. The content itself will be located in a subdirectory determined bybuild_output_directory_name(below). It includes intermediate meta-schema(s), JSON Schema(s), generated markdown files, and the generated web documentation. The default isroot_directory. -
build_output_directory_name: The name of the lattice output content directory. The default is".lattice/". -
build_validation: A boolean indicator to automatically generate meta-schema, validate the data model, generate the schemas and validate the example data files upon instantiation. If false, these tasks must be executed after instantiation using thegenerate_meta_schemas,validate_schemas,generate_json_schemas, andvalidate_example_filesmethods. The default isTrue.
The repository's examples directory contains sample data models exemplifying different model options, such as Data Group Templates or scoped references.
More complete examples of projects using the ASHRAE Standard 232P framework include:
- IBPSA-USA Climate Information (uses lattice)
- ASHRAE Standard 205 (transitioning to lattice)
- ASHRAE Standard 229 (does not use lattice...yet)
Metadata
Release files for lattice 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lattice-0.1.4.tar.gz | 33.9 kB | Without provenance | Details for lattice-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lattice-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for lattice-0.1.4-py3-none-any.whl |
Total release size: 73.2 kB
Release files / lattice-0.1.4.tar.gz
| Download URL | lattice-0.1.4.tar.gz |
|---|---|
| Size | 33.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56a0bdfcd6d25756428b4ffbe3101b098ef8aed486e0a47d0bb51458716c9bd1
|
|
BLAKE2b-256 checksum How to use checksums |
37afeed5c741b4a051a2a79c63c2314dc179b3edd7220ff614273bb6c2ce57c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.9.16 Linux/5.15.0-1024-azure
|
Release files / lattice-0.1.4-py3-none-any.whl
| Download URL | lattice-0.1.4-py3-none-any.whl |
|---|---|
| Size | 39.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5755e7eaee1d83cb5960487df7c65e0136917b5bf2d3f076d4df8c3d6fc7ae9b
|
|
BLAKE2b-256 checksum How to use checksums |
f435d95b9c3e73c64c97532b29e2238154ea1dff79a171395a954a204f5d3b2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.9.16 Linux/5.15.0-1024-azure
|
Security for lattice 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.