lattice


Namelattice JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/bigladder/lattice
SummaryA framework for developing data models, including schema development and documentation.
upload_time2022-12-21 16:48:31
maintainer
docs_urlNone
authorBig Ladder Software
requires_python>=3.7,<4.0
licenseBSD-3
keywords data-modeling schema lattice
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Release](https://img.shields.io/pypi/v/lattice.svg)](https://pypi.python.org/pypi/lattice)

[![Build and Test](https://github.com/bigladder/lattice/actions/workflows/build-and-test.yaml/badge.svg)](https://github.com/bigladder/lattice/actions/workflows/build-and-test.yaml)

[![Web Documentation](https://github.com/bigladder/lattice/actions/workflows/release.yaml/badge.svg)](https://github.com/bigladder/lattice/actions/workflows/release.yaml)

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](https://go.dev/), [Hugo](https://gohugo.io/installation/), and [Node.js](https://nodejs.org/en/download/)). 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:

- [Go](https://go.dev/)
- [Hugo](https://gohugo.io/installation/)
- [Node.js](https://nodejs.org/en/download/)

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 by `build_output_directory_name` (below). It includes intermediate meta-schema(s), JSON Schema(s), generated markdown files, and the generated web documentation. The default is `root_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 the `generate_meta_schemas`, `validate_schemas`, `generate_json_schemas`, and `validate_example_files` methods. The default is `True`.

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](https://github.com/IBPSA-USA/climate-information) (uses lattice)
- [ASHRAE Standard 205](https://github.com/open205/schema-205) (transitioning to lattice)
- [ASHRAE Standard 229](https://github.com/open229/ruleset-model-description-schema) (does not use lattice...yet)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bigladder/lattice",
    "name": "lattice",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "data-modeling,schema,lattice",
    "author": "Big Ladder Software",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/37/af/eed5c741b4a051a2a79c63c2314dc179b3edd7220ff614273bb6c2ce57c3/lattice-0.1.4.tar.gz",
    "platform": null,
    "description": "[![Release](https://img.shields.io/pypi/v/lattice.svg)](https://pypi.python.org/pypi/lattice)\n\n[![Build and Test](https://github.com/bigladder/lattice/actions/workflows/build-and-test.yaml/badge.svg)](https://github.com/bigladder/lattice/actions/workflows/build-and-test.yaml)\n\n[![Web Documentation](https://github.com/bigladder/lattice/actions/workflows/release.yaml/badge.svg)](https://github.com/bigladder/lattice/actions/workflows/release.yaml)\n\nLattice\n===========\n\nA 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:\n\n- Data model validation: Ensures the YAML schema source files are well-formed.\n- Schema generation: Translates the YAML schema source files into equivalent JSON Schema.\n- Data file validation: Validates data files against the generated JSON Schema and additional validation requirements not supported by JSON Schema (e.g., reference checking).\n- Data model documentation: Generates web documentation of the data model from the YAML schema source files and templated markdown files (requires [Go](https://go.dev/), [Hugo](https://gohugo.io/installation/), and [Node.js](https://nodejs.org/en/download/)). This web documentation can be automatically deployed to GitHub pages.\n\nFuture additions under development include:\n\n- Generation of PDF documentation of the data model.\n- Generation of C/C++ source code for processing compliant data files.\n\n\nInstalling\n----------\n\nTo install Lattice, simply:\n\n`pip install lattice`\n\nTo generate data model documentation, you'll also need to install:\n\n- [Go](https://go.dev/)\n- [Hugo](https://gohugo.io/installation/)\n- [Node.js](https://nodejs.org/en/download/)\n\nExample Usage\n-------------\n\n_lattice_ is Python package defining the `Lattice` class. Lattice relies on a predetermined structure of subdirectories:\n\n- **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.\n- **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.\n- **examples** (optional): Example data files compliant with the data model.\n\nThe `Lattice` class is instantiated with the following parameters:\n\n- `root_directory`: This is the directory containing the source subdirectories.The default is the current working directory.\n\n- `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 by `build_output_directory_name` (below). It includes intermediate meta-schema(s), JSON Schema(s), generated markdown files, and the generated web documentation. The default is `root_directory`.\n\n- `build_output_directory_name`: The name of the lattice output content directory. The default is `\".lattice/\"`.\n\n- `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 the `generate_meta_schemas`, `validate_schemas`, `generate_json_schemas`, and `validate_example_files` methods. The default is `True`.\n\nThe repository's *examples* directory contains sample data models exemplifying different model options, such as Data Group Templates or scoped references.\n\nMore complete examples of projects using the ASHRAE Standard 232P framework include:\n\n- [IBPSA-USA Climate Information](https://github.com/IBPSA-USA/climate-information) (uses lattice)\n- [ASHRAE Standard 205](https://github.com/open205/schema-205) (transitioning to lattice)\n- [ASHRAE Standard 229](https://github.com/open229/ruleset-model-description-schema) (does not use lattice...yet)\n\n",
    "bugtrack_url": null,
    "license": "BSD-3",
    "summary": "A framework for developing data models, including schema development and documentation.",
    "version": "0.1.4",
    "split_keywords": [
        "data-modeling",
        "schema",
        "lattice"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "75af9d5ae593dd54aaa81117f1a9cd55",
                "sha256": "5755e7eaee1d83cb5960487df7c65e0136917b5bf2d3f076d4df8c3d6fc7ae9b"
            },
            "downloads": -1,
            "filename": "lattice-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "75af9d5ae593dd54aaa81117f1a9cd55",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 39286,
            "upload_time": "2022-12-21T16:48:29",
            "upload_time_iso_8601": "2022-12-21T16:48:29.985951Z",
            "url": "https://files.pythonhosted.org/packages/f4/35/d95b9c3e73c64c97532b29e2238154ea1dff79a171395a954a204f5d3b2b/lattice-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "b82a547bd90df95ba725900b1710b290",
                "sha256": "56a0bdfcd6d25756428b4ffbe3101b098ef8aed486e0a47d0bb51458716c9bd1"
            },
            "downloads": -1,
            "filename": "lattice-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "b82a547bd90df95ba725900b1710b290",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 33919,
            "upload_time": "2022-12-21T16:48:31",
            "upload_time_iso_8601": "2022-12-21T16:48:31.231230Z",
            "url": "https://files.pythonhosted.org/packages/37/af/eed5c741b4a051a2a79c63c2314dc179b3edd7220ff614273bb6c2ce57c3/lattice-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-21 16:48:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "bigladder",
    "github_project": "lattice",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "lattice"
}
        
Elapsed time: 0.04558s