diff --git a/.github/workflows/heat-stack.yml b/.github/workflows/heat-stack.yml index 2cdd20d5..4a552a8b 100644 --- a/.github/workflows/heat-stack.yml +++ b/.github/workflows/heat-stack.yml @@ -10,7 +10,7 @@ on: workflow_dispatch: env: - rules-engine-working-directory: rules-engine + rules-engine-working-directory: python heat-stack-working-directory: heat-stack defaults: diff --git a/.vscode/settings.json b/.vscode/settings.json index 09409736..34438b2b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "python.testing.pytestArgs": [ - "rules-engine" + "python" ], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true diff --git a/README.md b/README.md index ffdf3246..de19d2b5 100644 --- a/README.md +++ b/README.md @@ -29,4 +29,4 @@ To install the front end, see this [README.md](https://github.com/codeforboston/ ### Documentation For the Heat Stack (Javascript) portion read: [README.md](https://github.com/codeforboston/home-energy-analysis-tool/blob/main/heat-stack/README.md) -For the Rules Engine (Python) portion read: [README.md](https://github.com/codeforboston/home-energy-analysis-tool/blob/main/rules-engine/README.md) +For the Rules Engine (Python) portion read: [README.md](https://github.com/codeforboston/home-energy-analysis-tool/blob/main/python/README.md) diff --git a/heat-stack/app/root_original.tsx b/heat-stack/app/root_original.tsx index dab771ee..320ef5e8 100644 --- a/heat-stack/app/root_original.tsx +++ b/heat-stack/app/root_original.tsx @@ -64,7 +64,7 @@ // import type { Weather } from './WeatherExample.d.ts' // import * as pyodideModule from 'pyodide' -// import engine from '../../rules-engine/src/rules_engine/engine.py' +// import engine from '../../python/src/rules_engine/engine.py' // const getPyodide = async () => { // // public folder: diff --git a/heat-stack/app/routes/_heat+/single.tsx b/heat-stack/app/routes/_heat+/single.tsx index 8b1b9ab3..4b3a4c4f 100644 --- a/heat-stack/app/routes/_heat+/single.tsx +++ b/heat-stack/app/routes/_heat+/single.tsx @@ -162,7 +162,7 @@ export async function action({ request, params }: ActionFunctionArgs) { const pyodide: any = await getPyodide() return pyodide } - // consider running https://github.com/codeforboston/home-energy-analysis-tool/blob/main/rules-engine/tests/test_rules_engine/test_engine.py + // consider running https://github.com/codeforboston/home-energy-analysis-tool/blob/main/python/tests/test_rules_engine/test_engine.py const pyodide: any = await runPythonScript() ////////////////////// diff --git a/heat-stack/app/utils/pyodide.test.ts b/heat-stack/app/utils/pyodide.test.ts index 1dff3364..04c9e18b 100644 --- a/heat-stack/app/utils/pyodide.test.ts +++ b/heat-stack/app/utils/pyodide.test.ts @@ -6,7 +6,7 @@ import WeatherUtil from "#app/utils/WeatherUtil"; /* For this to pass, you must run - `pushd ../rules-engine && python3 -m venv venv && source venv/bin/activate && pip install -q build && python3 -m build && popd` */ + `pushd ../python && python3 -m venv venv && source venv/bin/activate && pip install -q build && python3 -m build && popd` */ /* Referenced https://github.com/epicweb-dev/full-stack-testing/blob/main/exercises/04.unit-test/02.solution.spies/app/utils/misc.error-message.test.ts of https://www.epicweb.dev/workshops/web-application-testing*/ // test('pyodide loads', async () => { @@ -60,12 +60,12 @@ import WeatherUtil from "#app/utils/WeatherUtil"; // // await micropip.install(['annotated-types']) // await pyodide.loadPackage( -// '../rules-engine/dist/rules_engine-0.0.1-py3-none-any.whl', +// '../python/dist/rules_engine-0.0.1-py3-none-any.whl', // ) // return pyodide // } -// // consider running https://github.com/codeforboston/home-energy-analysis-tool/blob/main/rules-engine/tests/test_rules_engine/test_engine.py +// // consider running https://github.com/codeforboston/home-energy-analysis-tool/blob/main/python/tests/test_rules_engine/test_engine.py // const pyodide: any = await runPythonScript() // const result = await pyodide.runPythonAsync(` // from rules_engine import engine @@ -127,19 +127,19 @@ test('pyodide solves climate change', async () => { // await micropip.install(['annotated-types']) await pyodide.loadPackage( - '../rules-engine/dist/rules_engine-0.0.1-py3-none-any.whl', + '../python/dist/rules_engine-0.0.1-py3-none-any.whl', ) return pyodide } - // consider running https://github.com/codeforboston/home-energy-analysis-tool/blob/main/rules-engine/tests/test_rules_engine/test_engine.py + // consider running https://github.com/codeforboston/home-energy-analysis-tool/blob/main/python/tests/test_rules_engine/test_engine.py const pyodide: any = await runPythonScript() const GU = new GeocodeUtil(); const WU = new WeatherUtil(); // 1) parser.parse_gas_bill(data: str, company: NaturalGasCompany) - // https://github.com/codeforboston/home-energy-analysis-tool/blob/main/rules-engine/src/rules_engine/parser.py#L60 + // https://github.com/codeforboston/home-energy-analysis-tool/blob/main/python/src/rules_engine/parser.py#L60 /* 2) get_outputs_natural_gas( summary_input: SummaryInput, @@ -147,12 +147,12 @@ test('pyodide solves climate change', async () => { natural_gas_billing_input: NaturalGasBillingInput, ) -> RulesEngineResult - https://github.com/codeforboston/home-energy-analysis-tool/blob/main/rules-engine/src/rules_engine/engine.py#L59 + https://github.com/codeforboston/home-energy-analysis-tool/blob/main/python/src/rules_engine/engine.py#L59 */ /** * TODO: - * - Match up our types with rules engine types at https://github.com/codeforboston/home-energy-analysis-tool/blob/main/rules-engine/src/rules_engine/pydantic_models.py#L57 + * - Match up our types with rules engine types at https://github.com/codeforboston/home-energy-analysis-tool/blob/main/python/src/rules_engine/pydantic_models.py#L57 * - Use those to create summary_input (in the same file) * - Use those to create temperature_input (in the same file) * - Use those to create natural_gas_billing_input (in the same file) @@ -169,7 +169,7 @@ test('pyodide solves climate change', async () => { console.log("weather data",TIWD); - // https://github.com/codeforboston/home-energy-analysis-tool/tree/main/rules-engine/tests/test_rules_engine/cases/examples/quateman + // https://github.com/codeforboston/home-energy-analysis-tool/tree/main/python/tests/test_rules_engine/cases/examples/quateman const exampleNationalGridCSV = `Name,FIRST LAST,,,,, Address,"100 STREET AVE, BOSTON MA 02130",,,,, Account Number,1111111111,,,,, @@ -337,19 +337,19 @@ test('pyodide solves climate change', async () => { // // await micropip.install(['annotated-types']) // await pyodide.loadPackage( -// '../rules-engine/dist/rules_engine-0.0.1-py3-none-any.whl', +// '../python/dist/rules_engine-0.0.1-py3-none-any.whl', // ) // return pyodide // } -// // consider running https://github.com/codeforboston/home-energy-analysis-tool/blob/main/rules-engine/tests/test_rules_engine/test_engine.py +// // consider running https://github.com/codeforboston/home-energy-analysis-tool/blob/main/python/tests/test_rules_engine/test_engine.py // const pyodide: any = await runPythonScript() // const GU = new GeocodeUtil(); // const WU = new WeatherUtil(); // // 1) parser.parse_gas_bill(data: str, company: NaturalGasCompany) -// // https://github.com/codeforboston/home-energy-analysis-tool/blob/main/rules-engine/src/rules_engine/parser.py#L60 +// // https://github.com/codeforboston/home-energy-analysis-tool/blob/main/python/src/rules_engine/parser.py#L60 // /* 2) get_outputs_natural_gas( // summary_input: SummaryInput, @@ -357,12 +357,12 @@ test('pyodide solves climate change', async () => { // natural_gas_billing_input: NaturalGasBillingInput, // ) -> RulesEngineResult -// https://github.com/codeforboston/home-energy-analysis-tool/blob/main/rules-engine/src/rules_engine/engine.py#L59 +// https://github.com/codeforboston/home-energy-analysis-tool/blob/main/python/src/rules_engine/engine.py#L59 // */ // /** // * TODO: -// * - Match up our types with rules engine types at https://github.com/codeforboston/home-energy-analysis-tool/blob/main/rules-engine/src/rules_engine/pydantic_models.py#L57 +// * - Match up our types with rules engine types at https://github.com/codeforboston/home-energy-analysis-tool/blob/main/python/src/rules_engine/pydantic_models.py#L57 // * - Use those to create summary_input (in the same file) // * - Use those to create temperature_input (in the same file) // * - Use those to create natural_gas_billing_input (in the same file) @@ -377,7 +377,7 @@ test('pyodide solves climate change', async () => { // const TIWD = await WU.getThatWeathaData(x, y, "2024-03-20", "2024-04-20"); // console.log("weather data",TIWD); -// // https://github.com/codeforboston/home-energy-analysis-tool/tree/main/rules-engine/tests/test_rules_engine/cases/examples/quateman +// // https://github.com/codeforboston/home-energy-analysis-tool/tree/main/python/tests/test_rules_engine/cases/examples/quateman // const exampleNationalGridCSV = `Name,FIRST LAST,,,,, // Address,"100 STREET AVE, BOSTON MA 02130",,,,, // Account Number,1111111111,,,,, diff --git a/heat-stack/package.json b/heat-stack/package.json index 2f7eb5e0..1f4ede24 100644 --- a/heat-stack/package.json +++ b/heat-stack/package.json @@ -21,8 +21,8 @@ "setup": "npm run build && prisma generate && prisma migrate deploy && prisma db seed && playwright install", "start": "cross-env NODE_ENV=production node .", "start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .", - "test": "cd ../rules-engine && python3 -m venv venv && . venv/bin/activate && pip install -q build && python3 -m build && cd ../heat-stack && vitest && rm -rf ../rules-engine/dist ", - "buildpy": "cd ../rules-engine && python3 -m venv venv && . venv/bin/activate && pip install -q build && python3 -m build && cp dist/rules_engine-0.0.1-py3-none-any.whl ../heat-stack/public/pyodide-env", + "test": "cd ../python && python3 -m venv venv && . venv/bin/activate && pip install -q build && python3 -m build && cd ../heat-stack && vitest && rm -rf ../python/dist ", + "buildpy": "cd ../python && python3 -m venv venv && . venv/bin/activate && pip install -q build && python3 -m build && cp dist/rules_engine-0.0.1-py3-none-any.whl ../heat-stack/public/pyodide-env", "coverage": "vitest run --coverage", "test:e2e": "npm run test:e2e:dev --silent", "test:e2e:dev": "playwright test --ui", diff --git a/rules-engine/.gitignore b/python/.gitignore similarity index 100% rename from rules-engine/.gitignore rename to python/.gitignore diff --git a/rules-engine/Makefile b/python/Makefile similarity index 100% rename from rules-engine/Makefile rename to python/Makefile diff --git a/rules-engine/README.md b/python/README.md similarity index 100% rename from rules-engine/README.md rename to python/README.md diff --git a/rules-engine/pyproject.toml b/python/pyproject.toml similarity index 100% rename from rules-engine/pyproject.toml rename to python/pyproject.toml diff --git a/rules-engine/requirements-dev.txt b/python/requirements-dev.txt similarity index 100% rename from rules-engine/requirements-dev.txt rename to python/requirements-dev.txt diff --git a/rules-engine/requirements.txt b/python/requirements.txt similarity index 100% rename from rules-engine/requirements.txt rename to python/requirements.txt diff --git a/rules-engine/src/data/merged_structure_temps.csv b/python/src/data/merged_structure_temps.csv similarity index 100% rename from rules-engine/src/data/merged_structure_temps.csv rename to python/src/data/merged_structure_temps.csv diff --git a/rules-engine/src/rules_engine/__init__.py b/python/src/rules_engine/__init__.py similarity index 100% rename from rules-engine/src/rules_engine/__init__.py rename to python/src/rules_engine/__init__.py diff --git a/rules-engine/src/rules_engine/engine.py b/python/src/rules_engine/engine.py similarity index 100% rename from rules-engine/src/rules_engine/engine.py rename to python/src/rules_engine/engine.py diff --git a/rules-engine/src/rules_engine/helpers.py b/python/src/rules_engine/helpers.py similarity index 100% rename from rules-engine/src/rules_engine/helpers.py rename to python/src/rules_engine/helpers.py diff --git a/rules-engine/src/rules_engine/parser.py b/python/src/rules_engine/parser.py similarity index 100% rename from rules-engine/src/rules_engine/parser.py rename to python/src/rules_engine/parser.py diff --git a/rules-engine/src/rules_engine/pydantic_models.py b/python/src/rules_engine/pydantic_models.py similarity index 100% rename from rules-engine/src/rules_engine/pydantic_models.py rename to python/src/rules_engine/pydantic_models.py diff --git a/python/src/rules_engine/refactor.md b/python/src/rules_engine/refactor.md new file mode 100644 index 00000000..a103f0e5 --- /dev/null +++ b/python/src/rules_engine/refactor.md @@ -0,0 +1,166 @@ +Qs: +- stand_by_losses + +home variables used +``` + avg_ua + balance_point + non_heating_usage + stdev_pct + balance_point_graph +``` + +1. Remove temporary_rules_engine.py +2. Rename rules-engine to "python" +3. Rename NormalizedBillingRecordBase class to BillingInput +4. Rename BillingPeriod to ProcessedBill and billing_period to processed_bill +5. Combine get_outputs_normalized and convert_to_intermediate_billing_record and get rid of NormalizedBillingRecord. There is only one place NormalizedBillingRecord is used and combining code +gets rid of the need for the class. +- Change +``` + billing_periods: list[NormalizedBillingPeriodRecordBase] = [] + + for input_val in natural_gas_billing_input.records: + billing_periods.append( + NormalizedBillingPeriodRecordBase( + period_start_date=input_val.period_start_date, + period_end_date=input_val.period_end_date, + usage=input_val.usage_therms, + inclusion_override=bool(input_val.inclusion_override), + ) + ) + + return get_outputs_normalized( + summary_input, None, temperature_input, billing_periods + ) + + def get_outputs_normalized + loops through billing_periods and does a bunch of stuff + +``` +to +``` + inputBill = + NormalizedBillingPeriodRecordBase( + period_start_date=input_val.period_start_date, + period_end_date=input_val.period_end_date, + usage=input_val.usage_therms, + analysis_type_override=input_val.inclusion_override, + inclusion_override=True, + ) + ) + avg_temps = derive_avg_temps(temparature_input) + default_analysis_type = derive_default_analysis_type + ( fuel_type, + inputBill.start_date, + inputBill.end_date + ) + processedBill = ProcessedBill( + input = inputBill, + avg_temps = avg_temps, + default_analysis_type = default_analysis_type + // usage not needed, it is part of inputBill + ) +``` +6. Home - Call home.calculate from home.init or move the code from home.init into home.calculate. Otherwise, the fact that Home.init does calculations is hidden. Code looks like this: +``` +home=Home(args) # does some calculations +home.calculate() # does some calculations +``` +This would change to either +``` +home=Home(args) +``` +or +``` +home=Home.calculate(args) +``` +7. Home - change to functional programming paradigm where you provide inputs and outputs + - Change + `_calculate_avg_summer_usage()` => `avg_summer_usage = _get_avg_summer_usage(summer_bills)` + - Change + `_calculate_avg_non_heating_usage ()` => +to +``` +avg_non_heating_usage = _get_avg_non_heating_usage ( + fuel_type, + avg_summer_usage, + dhw_input.estimated_water_heating_efficiency, + dhw_input.number_of_occupants, + stand_by_losses, + heating_system_efficiency +) +``` +================== +- change +`for billing_period in billing_periods ...` => +to +``` +for billing_period in billing_periods + { bills_summer, bills_winter, bills_shoulder } + =_categorize_bills_by_season (billing_periods) +``` +================== +- Change +``` +calculate_dhw_usage() +``` +to +``` + dhw_usage = _calculate_dhw_usage ( + estimated_water_heating_efficiency, + dhw_input.number_of_occupants, + stand_by_losses, + heating_system_efficiency + ) +``` +================== +- Change +`self.initialize_ua(billing_period)` => `_set_ua(billing_period,avg_non_heating_usage)` + +- Change?? Parameters are never set +``` +def calculate( + self, + initial_balance_point_sensitivity: float = 0.5, + stdev_pct_max: float = 0.10, + max_stdev_pct_diff: float = 0.01, + next_balance_point_sensitivity: float = 0.5, + ) +``` +=> +``` +def calculate ( + + initial_balance_point_sensitivity: float = 0.5, + stdev_pct_max: float = 0.10, + max_stdev_pct_diff: float = 0.01, + next_balance_point_sensitivity: float = 0.5, +``` +================== +- calculate method +`self._calculate_avg_non_heating_usage` - duplicated. Remove one of the calls +================== + +- Change +``` +self._calculate_balance_point_and_ua( + initial_balance_point_sensitivity, + stdev_pct_max, + max_stdev_pct_diff, + next_balance_point_sensitivity, + ) +``` => +``` +{ balance_point, stdev_pct + balance_point_graph } = + _get_graph (initial_balance_point_sensitivity, + stdev_pct_max, + max_stdev_pct_diff, + next_balance_point_sensitivity, + bills_winter) +``` +================== + + + diff --git a/rules-engine/tests/test_rules_engine/__init__.py b/python/tests/test_rules_engine/__init__.py similarity index 100% rename from rules-engine/tests/test_rules_engine/__init__.py rename to python/tests/test_rules_engine/__init__.py diff --git a/rules-engine/tests/test_rules_engine/cases/examples/README.md b/python/tests/test_rules_engine/cases/examples/README.md similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/README.md rename to python/tests/test_rules_engine/cases/examples/README.md diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/cowen/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/fuel_oil/cowen/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/cowen/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/fuel_oil/cowen/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/cowen/oil-propane.csv b/python/tests/test_rules_engine/cases/examples/fuel_oil/cowen/oil-propane.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/cowen/oil-propane.csv rename to python/tests/test_rules_engine/cases/examples/fuel_oil/cowen/oil-propane.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/cowen/summary.json b/python/tests/test_rules_engine/cases/examples/fuel_oil/cowen/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/cowen/summary.json rename to python/tests/test_rules_engine/cases/examples/fuel_oil/cowen/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/example-2/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/fuel_oil/example-2/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/example-2/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/fuel_oil/example-2/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/example-2/oil-propane.csv b/python/tests/test_rules_engine/cases/examples/fuel_oil/example-2/oil-propane.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/example-2/oil-propane.csv rename to python/tests/test_rules_engine/cases/examples/fuel_oil/example-2/oil-propane.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/example-2/summary.json b/python/tests/test_rules_engine/cases/examples/fuel_oil/example-2/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/example-2/summary.json rename to python/tests/test_rules_engine/cases/examples/fuel_oil/example-2/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/gelfand/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/fuel_oil/gelfand/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/gelfand/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/fuel_oil/gelfand/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/gelfand/oil-propane.csv b/python/tests/test_rules_engine/cases/examples/fuel_oil/gelfand/oil-propane.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/gelfand/oil-propane.csv rename to python/tests/test_rules_engine/cases/examples/fuel_oil/gelfand/oil-propane.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/gelfand/summary.json b/python/tests/test_rules_engine/cases/examples/fuel_oil/gelfand/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/gelfand/summary.json rename to python/tests/test_rules_engine/cases/examples/fuel_oil/gelfand/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/harris/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/fuel_oil/harris/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/harris/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/fuel_oil/harris/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/harris/oil-propane.csv b/python/tests/test_rules_engine/cases/examples/fuel_oil/harris/oil-propane.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/harris/oil-propane.csv rename to python/tests/test_rules_engine/cases/examples/fuel_oil/harris/oil-propane.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/harris/summary.json b/python/tests/test_rules_engine/cases/examples/fuel_oil/harris/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/harris/summary.json rename to python/tests/test_rules_engine/cases/examples/fuel_oil/harris/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/karle/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/fuel_oil/karle/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/karle/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/fuel_oil/karle/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/karle/oil-propane.csv b/python/tests/test_rules_engine/cases/examples/fuel_oil/karle/oil-propane.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/karle/oil-propane.csv rename to python/tests/test_rules_engine/cases/examples/fuel_oil/karle/oil-propane.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/karle/summary.json b/python/tests/test_rules_engine/cases/examples/fuel_oil/karle/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/fuel_oil/karle/summary.json rename to python/tests/test_rules_engine/cases/examples/fuel_oil/karle/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/breslow/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/natural_gas/breslow/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/breslow/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/natural_gas/breslow/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/breslow/natural-gas.csv b/python/tests/test_rules_engine/cases/examples/natural_gas/breslow/natural-gas.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/breslow/natural-gas.csv rename to python/tests/test_rules_engine/cases/examples/natural_gas/breslow/natural-gas.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/breslow/summary.json b/python/tests/test_rules_engine/cases/examples/natural_gas/breslow/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/breslow/summary.json rename to python/tests/test_rules_engine/cases/examples/natural_gas/breslow/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/cali/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/natural_gas/cali/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/cali/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/natural_gas/cali/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/cali/natural-gas.csv b/python/tests/test_rules_engine/cases/examples/natural_gas/cali/natural-gas.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/cali/natural-gas.csv rename to python/tests/test_rules_engine/cases/examples/natural_gas/cali/natural-gas.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/cali/summary.json b/python/tests/test_rules_engine/cases/examples/natural_gas/cali/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/cali/summary.json rename to python/tests/test_rules_engine/cases/examples/natural_gas/cali/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/example-1/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/natural_gas/example-1/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/example-1/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/natural_gas/example-1/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/example-1/natural-gas.csv b/python/tests/test_rules_engine/cases/examples/natural_gas/example-1/natural-gas.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/example-1/natural-gas.csv rename to python/tests/test_rules_engine/cases/examples/natural_gas/example-1/natural-gas.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/example-1/summary.json b/python/tests/test_rules_engine/cases/examples/natural_gas/example-1/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/example-1/summary.json rename to python/tests/test_rules_engine/cases/examples/natural_gas/example-1/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/example-4/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/natural_gas/example-4/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/example-4/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/natural_gas/example-4/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/example-4/natural-gas.csv b/python/tests/test_rules_engine/cases/examples/natural_gas/example-4/natural-gas.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/example-4/natural-gas.csv rename to python/tests/test_rules_engine/cases/examples/natural_gas/example-4/natural-gas.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/example-4/summary.json b/python/tests/test_rules_engine/cases/examples/natural_gas/example-4/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/example-4/summary.json rename to python/tests/test_rules_engine/cases/examples/natural_gas/example-4/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/feldman/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/natural_gas/feldman/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/feldman/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/natural_gas/feldman/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/feldman/natural-gas-eversource.csv b/python/tests/test_rules_engine/cases/examples/natural_gas/feldman/natural-gas-eversource.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/feldman/natural-gas-eversource.csv rename to python/tests/test_rules_engine/cases/examples/natural_gas/feldman/natural-gas-eversource.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/feldman/natural-gas.csv b/python/tests/test_rules_engine/cases/examples/natural_gas/feldman/natural-gas.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/feldman/natural-gas.csv rename to python/tests/test_rules_engine/cases/examples/natural_gas/feldman/natural-gas.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/feldman/summary.json b/python/tests/test_rules_engine/cases/examples/natural_gas/feldman/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/feldman/summary.json rename to python/tests/test_rules_engine/cases/examples/natural_gas/feldman/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/lewitus/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/natural_gas/lewitus/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/lewitus/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/natural_gas/lewitus/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/lewitus/natural-gas.csv b/python/tests/test_rules_engine/cases/examples/natural_gas/lewitus/natural-gas.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/lewitus/natural-gas.csv rename to python/tests/test_rules_engine/cases/examples/natural_gas/lewitus/natural-gas.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/lewitus/summary.json b/python/tests/test_rules_engine/cases/examples/natural_gas/lewitus/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/lewitus/summary.json rename to python/tests/test_rules_engine/cases/examples/natural_gas/lewitus/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/quateman/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/natural_gas/quateman/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/quateman/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/natural_gas/quateman/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/quateman/natural-gas-national-grid.csv b/python/tests/test_rules_engine/cases/examples/natural_gas/quateman/natural-gas-national-grid.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/quateman/natural-gas-national-grid.csv rename to python/tests/test_rules_engine/cases/examples/natural_gas/quateman/natural-gas-national-grid.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/quateman/natural-gas.csv b/python/tests/test_rules_engine/cases/examples/natural_gas/quateman/natural-gas.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/quateman/natural-gas.csv rename to python/tests/test_rules_engine/cases/examples/natural_gas/quateman/natural-gas.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/quateman/summary.json b/python/tests/test_rules_engine/cases/examples/natural_gas/quateman/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/quateman/summary.json rename to python/tests/test_rules_engine/cases/examples/natural_gas/quateman/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/shen/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/natural_gas/shen/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/shen/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/natural_gas/shen/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/shen/natural-gas.csv b/python/tests/test_rules_engine/cases/examples/natural_gas/shen/natural-gas.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/shen/natural-gas.csv rename to python/tests/test_rules_engine/cases/examples/natural_gas/shen/natural-gas.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/shen/summary.json b/python/tests/test_rules_engine/cases/examples/natural_gas/shen/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/shen/summary.json rename to python/tests/test_rules_engine/cases/examples/natural_gas/shen/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/vitti/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/natural_gas/vitti/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/vitti/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/natural_gas/vitti/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/vitti/natural-gas.csv b/python/tests/test_rules_engine/cases/examples/natural_gas/vitti/natural-gas.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/vitti/natural-gas.csv rename to python/tests/test_rules_engine/cases/examples/natural_gas/vitti/natural-gas.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/vitti/summary.json b/python/tests/test_rules_engine/cases/examples/natural_gas/vitti/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/vitti/summary.json rename to python/tests/test_rules_engine/cases/examples/natural_gas/vitti/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/yellepeddi/Heat Load Analysis Beta 7.xlsx b/python/tests/test_rules_engine/cases/examples/natural_gas/yellepeddi/Heat Load Analysis Beta 7.xlsx similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/yellepeddi/Heat Load Analysis Beta 7.xlsx rename to python/tests/test_rules_engine/cases/examples/natural_gas/yellepeddi/Heat Load Analysis Beta 7.xlsx diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/yellepeddi/natural-gas.csv b/python/tests/test_rules_engine/cases/examples/natural_gas/yellepeddi/natural-gas.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/yellepeddi/natural-gas.csv rename to python/tests/test_rules_engine/cases/examples/natural_gas/yellepeddi/natural-gas.csv diff --git a/rules-engine/tests/test_rules_engine/cases/examples/natural_gas/yellepeddi/summary.json b/python/tests/test_rules_engine/cases/examples/natural_gas/yellepeddi/summary.json similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/natural_gas/yellepeddi/summary.json rename to python/tests/test_rules_engine/cases/examples/natural_gas/yellepeddi/summary.json diff --git a/rules-engine/tests/test_rules_engine/cases/examples/temperature-data.csv b/python/tests/test_rules_engine/cases/examples/temperature-data.csv similarity index 100% rename from rules-engine/tests/test_rules_engine/cases/examples/temperature-data.csv rename to python/tests/test_rules_engine/cases/examples/temperature-data.csv diff --git a/rules-engine/tests/test_rules_engine/generate_example_data.py b/python/tests/test_rules_engine/generate_example_data.py similarity index 100% rename from rules-engine/tests/test_rules_engine/generate_example_data.py rename to python/tests/test_rules_engine/generate_example_data.py diff --git a/rules-engine/tests/test_rules_engine/test-res.json b/python/tests/test_rules_engine/test-res.json similarity index 100% rename from rules-engine/tests/test_rules_engine/test-res.json rename to python/tests/test_rules_engine/test-res.json diff --git a/rules-engine/tests/test_rules_engine/test_engine.py b/python/tests/test_rules_engine/test_engine.py similarity index 100% rename from rules-engine/tests/test_rules_engine/test_engine.py rename to python/tests/test_rules_engine/test_engine.py diff --git a/rules-engine/tests/test_rules_engine/test_fuel_oil.py b/python/tests/test_rules_engine/test_fuel_oil.py similarity index 100% rename from rules-engine/tests/test_rules_engine/test_fuel_oil.py rename to python/tests/test_rules_engine/test_fuel_oil.py diff --git a/rules-engine/tests/test_rules_engine/test_natural_gas.py b/python/tests/test_rules_engine/test_natural_gas.py similarity index 100% rename from rules-engine/tests/test_rules_engine/test_natural_gas.py rename to python/tests/test_rules_engine/test_natural_gas.py diff --git a/rules-engine/tests/test_rules_engine/test_parser.py b/python/tests/test_rules_engine/test_parser.py similarity index 100% rename from rules-engine/tests/test_rules_engine/test_parser.py rename to python/tests/test_rules_engine/test_parser.py diff --git a/rules-engine/tests/test_rules_engine/test_pydantic_models.py b/python/tests/test_rules_engine/test_pydantic_models.py similarity index 100% rename from rules-engine/tests/test_rules_engine/test_pydantic_models.py rename to python/tests/test_rules_engine/test_pydantic_models.py diff --git a/rules-engine/tests/test_rules_engine/test_utils.py b/python/tests/test_rules_engine/test_utils.py similarity index 100% rename from rules-engine/tests/test_rules_engine/test_utils.py rename to python/tests/test_rules_engine/test_utils.py