Skip to content

Installation

Weili Xu edited this page Jun 14, 2024 · 2 revisions

Installation Guide for PNNL-RCT

This section covers two methods for installing the PNNL-RCT: installing from source code via GitHub, installing via pip and installing directly using poetry.

Method 1: Installing from Source Code (GitHub)

To install the application from its source code, follow these steps:

Prerequisites

  • Ensure you have Python 3.10 installed on your system. You can download it from python.org.
  • Make sure Git is installed. You can download it from git-scm.com.
  • Ensure poetry is installed. You can install it by following the instructions on the Poetry website.
  • Optionally, set up a virtual environment to avoid conflicts with other Python packages.

Steps

  1. Clone the Repository: Open a terminal or command prompt and navigate to the directory where you want to clone the repository. Then run the following command:
git clone https://github.com/pnnl/ruleset-checking-tool.git
  1. Navigate to the Project Directory:
cd ruleset-checking-tool
  1. **Install Dependencies Using Poetry: Run the following command to install the project dependencies
poetry install
  1. Activate the Poetry Environemtn:
poetry shell
  1. Run the first project evaluation with demo RPD files:
rct229 evaluate -rs ashrae9012019 -f examples\chicago_demo\baseline_model.json -f examples\chicago_demo\proposed_model.json -f examples\chicago_demo\user_model.json -r ASHRAE9012019DetailReport

Method 2: Installing via Pip

To install the application using pip, following these steps:

Prerequisites

  • Ensure you have Python 3.10 installed on your system. You can download it from python.org.
  • Optionally, set up a virtual environment to avoid conflicts with other Python packages.

Steps

  1. **Create a Virtual Environment (Optional but Recommended):
python -m venv venv

Activate the virtual environment:

  • Windows:
.\venv\Scripts\activate
  • Mac/Linux:
source venv/bin/activate
  1. Install the Application
pip install ruleset-checking-tool
  1. Verify the Installation:
pip show ruleset-checking-tool

This command will display the information about the installed package, including its version.

Method 3: Installing via Poetry

To install the application directly using poetry, follow these steps:

Prerequisites

  • Ensure you have Python 3.10 installed on your system. You can download it from python.org.
  • Ensure poetry is installed. You can install it by following the instructions on the Poetry website.

Steps:

  1. Add the ruleset-checking-tool Package: Run the following command to add the ruleset-checking-tool package using poetry:
poetry add ruleset-checking-tool
  1. Activate the Poetry Environment:
poetry shell
  1. Verify the Installation: After the installation completes, you can verify it by checking the installed package version using pip:
pip show ruleset-checking-tool

This command will display information about the installed package, including its version.

Conclusion

You have now successfully installed the PNNL-RCT using one of the three methods. Refer to the usage instructions provided in the repository or package documentation for further details on how to use the application.