diff --git a/.github/workflows/pre-commit-ci.yml b/.github/workflows/pre-commit-ci.yml new file mode 100644 index 0000000..2e2d356 --- /dev/null +++ b/.github/workflows/pre-commit-ci.yml @@ -0,0 +1,31 @@ +# This workflow runs pre-commit hooks on pushes and pull requests to main +# to enforce coding style. To ensure correct configuration, please refer to: +# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_precommit.html +name: Run pre-commit hooks + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + pre-commit-ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install dependencies + run: | + sudo apt-get update + python -m pip install --upgrade pip + pip install .[dev] + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - uses: pre-commit/action@v3.0.1 + with: + extra_args: --all-files --verbose diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..fdf9900 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,67 @@ +repos: + + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.12.1 + hooks: + - id: validate-pyproject + + - repo: https://github.com/rhysd/actionlint + rev: v1.6.26 + hooks: + - id: actionlint + + - repo: https://github.com/sirosen/check-jsonschema + rev: 0.27.3 + hooks: + - id: check-github-actions + - id: check-github-workflows + - id: check-readthedocs + + - repo: https://github.com/pappasam/toml-sort + rev: v0.23.1 + hooks: + - id: toml-sort-fix + stages: ["pre-commit"] + + - repo: meta + hooks: + - id: check-useless-excludes + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.5.5 + hooks: + - id: ruff + args: [--fix, --exit-non-zero-on-fix, --show-fixes] + - id: ruff-format + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: check-added-large-files + args: ['--maxkb=500'] + - id: check-ast + - id: check-builtin-literals + - id: check-case-conflict + - id: check-json + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-toml + - id: check-vcs-permalinks + - id: check-xml + - id: check-yaml + args: [--unsafe] + - id: debug-statements + - id: destroyed-symlinks + - id: end-of-file-fixer + types: [python] + - id: fix-byte-order-marker + - id: mixed-line-ending + - id: name-tests-test + args: [--pytest-test-first] + - id: no-commit-to-branch + stages: + - pre-push + - id: trailing-whitespace + - id: end-of-file-fixer + - id: debug-statements diff --git a/NOTICE b/NOTICE index d7f1f9f..f308bbe 100644 --- a/NOTICE +++ b/NOTICE @@ -6,8 +6,8 @@ ______________________________________________________ NOTICE ______________________________________________________ -This product is a derivative work based on the - NAESB REQ.21 Energy Service Provider Interface Standard +This product is a derivative work based on the + NAESB REQ.21 Energy Service Provider Interface Standard Version 1.0 Copyright 2011 NAESB diff --git a/README.md b/README.md index afcff29..492859b 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,20 @@ Simple steps for development setup: 2. `pip install -e .` builds the [python egg](https://stackoverflow.com/questions/2051192/what-is-a-python-egg) for greenbutton_objects and then installs greenbutton_objects 3. `pip install -r requirements-dev.txt` which installs the libraries required to develop greenbutton_objects -Then, you should be able to run `pytest`, also from any directory, and see the test run successfully. \ No newline at end of file +Then, you should be able to run `pytest`, also from any directory, and see the test run successfully. + +## Pre-commit Checks + +This project uses [pre-commit](https://pre-commit.com/) to run various checks and formatters before each commit. To set it up: + +1. Install pre-commit in your environment: + ``` + pip install pre-commit + ``` + +2. Install the pre-commit hooks: + ``` + pre-commit install + ``` + +Pre-commit checks will automatically run on every commit. diff --git a/TODO b/TODO index 7c3ec70..761b18b 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,9 @@ * Handle IntervalReading blocks without timePeriod entries. Synthesize a timePeriod from MeterReading.readingType.intervalLength. - + * Handle LocalTimeParameters resources - + * Handle ElectricPowerUsageSummary resources * Handle ElectricPowerQualitySummary resources - diff --git a/pyproject.toml b/pyproject.toml index 103e83f..1dc8b77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,8 @@ [build-system] -requires = ["setuptools>=61.0.0", "wheel"] +requires = [ + "setuptools>=61", + "wheel" +] build-backend = "setuptools.build_meta" [project] @@ -7,31 +10,43 @@ name = "greenbutton_objects" version = "2024.7.11" description = "Parse Green Button XML files into Python objects." readme = "README.md" -authors = [{ name = "Phil Gold", email = "phil_g@pobox.com" }, - { name = "Adam Finkle", email = "77808710+AdamFinkle@users.noreply.github.com" }, - { name = "Ethan Strominger", email = "ethanstrominger2@gmail.com" }] -license = { file = "LICENSE" } +authors = [ + {name = "Phil Gold", email = "phil_g@pobox.com"}, + {name = "Adam Finkle", email = "77808710+AdamFinkle@users.noreply.github.com"}, + {name = "Ethan Strominger", email = "ethanstrominger2@gmail.com"} +] +license = {file = "LICENSE"} classifiers = [ - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python", - "Programming Language :: Python :: 3", + "Development Status :: 4 - Beta", + "License :: OSI Approved :: Apache Software License", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3" ] keywords = ["feed", "reader", "tutorial"] requires-python = ">=2.7" [project.optional-dependencies] dev = [ - "black", - "bumpver", - "isort", - "mypy", - "pip-tools", - "pydocstyle", - "pytest" + "black", + "bumpver", + "mypy", + "pip-tools", + "pydocstyle", + "pytest", + "pytest-cov", + "ruff" ] [project.urls] -Homepage = "https://github.com/codeforboston/greenbutton_objects" +"Homepage" = "https://github.com/codeforboston/greenbutton_objects" +"Source Code" = "https://github.com/codeforboston/greenbutton_objects" + +[tool.black] +line-length = 110 +target-version = ["py38"] + [tool.bumpver] current_version = "2024.7.11" version_pattern = "YYYY.MM.DD" @@ -46,9 +61,58 @@ push = true [tool.bumpver.file_patterns] "pyproject.toml" = [ - 'current_version = "{version}"', + 'current_version = "{version}"' ] "README.md" = [ - "{version}", - "{pep440_version}", + "{version}", + "{pep440_version}" +] + +[tool.isort] +profile = "black" +line_length = 110 + +[tool.ruff] +line-length = 110 +target-version = "py38" +preview = true # https://docs.astral.sh/ruff/preview/ + +[tool.ruff.lint] +select = [ + # docstrings + # "D", <-- TODO: There are no docstrings in this project + # pycodestyle + "E", + "W", + # Pyflakes + "F", + # pep8-naming + # "N", <-- TODO: This project not PEP8 Naming compliant yet + # pyupgrade + # "UP", <-- TODO: This project uses outdated string formating + # flake8-bugbear + # "B", <-- TODO: There are potential bugs in this project + # flake8-simplify + "SIM", + # isort + "I" +] +ignore = [ + "UP006", # Allow non standard library generics in type hints + "UP007", # Allow Union in type hints + "SIM114", # Allow if with same arms + "B028", # Allow default warning level + "SIM117", # Allow nested with + "UP015", # Allow redundant open parameters + "UP028" # Allow yield in for loop ] + +[tool.ruff.lint.extend-per-file-ignores] # https://docs.astral.sh/ruff/settings/#extend-per-file-ignores +# Ignore missing __init__.py files in tests. +"tests/*" = ["INP001", "PLR2004"] + +[tool.ruff.lint.mccabe] +max-complexity = 10 + +[tool.ruff.lint.pycodestyle] +max-doc-length = 100 diff --git a/src/greenbutton_objects/enums.py b/src/greenbutton_objects/enums.py index ba3d0f5..74058eb 100644 --- a/src/greenbutton_objects/enums.py +++ b/src/greenbutton_objects/enums.py @@ -1,6 +1,3 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - from enum import Enum diff --git a/src/greenbutton_objects/objects.py b/src/greenbutton_objects/objects.py index 0d8a6d5..cde506a 100644 --- a/src/greenbutton_objects/objects.py +++ b/src/greenbutton_objects/objects.py @@ -1,10 +1,7 @@ -#!/usr/bin/python - import datetime import functools -from greenbutton_objects import enums -from greenbutton_objects import utils +from greenbutton_objects import enums, utils @functools.total_ordering @@ -13,9 +10,7 @@ def __init__(self, entity): self.start = utils.getEntity( entity, "espi:start", - lambda e: datetime.datetime.fromtimestamp(int(e.text)).astimezone( - datetime.timezone.utc - ), + lambda e: datetime.datetime.fromtimestamp(int(e.text)).astimezone(datetime.timezone.utc), ) self.duration = utils.getEntity( entity, "espi:duration", lambda e: datetime.timedelta(seconds=int(e.text)) @@ -39,20 +34,13 @@ def __lt__(self, other): class IntervalReading: def __init__(self, entity, parent): self.intervalBlock = parent - self.cost = utils.getEntity( - entity, "espi:cost", lambda e: int(e.text) / 100000.0 - ) - self.timePeriod = utils.getEntity( - entity, "espi:timePeriod", lambda e: DateTimeInterval(e) - ) + self.cost = utils.getEntity(entity, "espi:cost", lambda e: int(e.text) / 100000.0) + self.timePeriod = utils.getEntity(entity, "espi:timePeriod", lambda e: DateTimeInterval(e)) self._value = utils.getEntity(entity, "espi:value", lambda e: int(e.text)) - self.readingQualities = set( - [ - ReadingQuality(rq, self) - for rq in entity.findall("espi:ReadingQuality", utils.ns) - ] - ) + self.readingQualities = set([ + ReadingQuality(rq, self) for rq in entity.findall("espi:ReadingQuality", utils.ns) + ]) def __repr__(self): return "" % ( @@ -78,12 +66,9 @@ def value(self): self.intervalBlock is not None and self.intervalBlock.meterReading is not None and self.intervalBlock.meterReading.readingType is not None - and self.intervalBlock.meterReading.readingType.powerOfTenMultiplier - is not None + and self.intervalBlock.meterReading.readingType.powerOfTenMultiplier is not None ): - multiplier = ( - 10**self.intervalBlock.meterReading.readingType.powerOfTenMultiplier - ) + multiplier = 10**self.intervalBlock.meterReading.readingType.powerOfTenMultiplier else: multiplier = 1 return self._value * multiplier @@ -124,6 +109,4 @@ def value_symbol(self): class ReadingQuality: def __init__(self, entity, parent): self.intervalReading = parent - self.quality = utils.getEntity( - entity, "espi:quality", lambda e: enums.QualityOfReading(int(e.text)) - ) + self.quality = utils.getEntity(entity, "espi:quality", lambda e: enums.QualityOfReading(int(e.text))) diff --git a/src/greenbutton_objects/parse.py b/src/greenbutton_objects/parse.py index 304c484..2c9af0a 100755 --- a/src/greenbutton_objects/parse.py +++ b/src/greenbutton_objects/parse.py @@ -3,38 +3,29 @@ import sys import xml.etree.ElementTree as ET -from greenbutton_objects import resources -from greenbutton_objects import utils +from greenbutton_objects import resources, utils def parse_feed(filename): tree = ET.parse(filename) usagePoints = [] - for entry in tree.getroot().findall( - "atom:entry/atom:content/espi:UsagePoint/../..", utils.ns - ): + for entry in tree.getroot().findall("atom:entry/atom:content/espi:UsagePoint/../..", utils.ns): up = resources.UsagePoint(entry) usagePoints.append(up) meterReadings = [] - for entry in tree.getroot().findall( - "atom:entry/atom:content/espi:MeterReading/../..", utils.ns - ): + for entry in tree.getroot().findall("atom:entry/atom:content/espi:MeterReading/../..", utils.ns): mr = resources.MeterReading(entry, usagePoints=usagePoints) meterReadings.append(mr) readingTypes = [] - for entry in tree.getroot().findall( - "atom:entry/atom:content/espi:ReadingType/../..", utils.ns - ): + for entry in tree.getroot().findall("atom:entry/atom:content/espi:ReadingType/../..", utils.ns): rt = resources.ReadingType(entry, meterReadings=meterReadings) readingTypes.append(rt) intervalBlocks = [] - for entry in tree.getroot().findall( - "atom:entry/atom:content/espi:IntervalBlock/../..", utils.ns - ): + for entry in tree.getroot().findall("atom:entry/atom:content/espi:IntervalBlock/../..", utils.ns): ib = resources.IntervalBlock(entry, meterReadings=meterReadings) intervalBlocks.append(ib) @@ -50,13 +41,9 @@ def parse_feed_representation(usage_points) -> str: """ result = [] for up in usage_points: - result.append( - "UsagePoint (%s) %s %s:" % (up.title, up.serviceCategory.name, up.status) - ) + result.append("UsagePoint (%s) %s %s:" % (up.title, up.serviceCategory.name, up.status)) for mr in up.meterReadings: - result.append( - " Meter Reading (%s) %s:" % (mr.title, mr.readingType.uom.name) - ) + result.append(" Meter Reading (%s) %s:" % (mr.title, mr.readingType.uom.name)) result.append("\n") for ir in mr.intervalReadings: result.append( @@ -71,10 +58,7 @@ def parse_feed_representation(usage_points) -> str: if ir.cost is not None: result.append("(%s%s)" % (ir.cost_symbol, ir.cost)) if len(ir.readingQualities) > 0: - result.append( - "[%s]" - % ", ".join([rq.quality.name for rq in ir.readingQualities]) - ) + result.append("[%s]" % ", ".join([rq.quality.name for rq in ir.readingQualities])) result.append("\n\n") return "".join(result) diff --git a/src/greenbutton_objects/resources.py b/src/greenbutton_objects/resources.py index f315274..1195988 100644 --- a/src/greenbutton_objects/resources.py +++ b/src/greenbutton_objects/resources.py @@ -1,14 +1,10 @@ -#!/usr/bin/python - import bisect import functools -from greenbutton_objects import utils -from greenbutton_objects import enums -from greenbutton_objects import objects +from greenbutton_objects import enums, objects, utils -class Resource(object): +class Resource: def __init__(self, entry): self.link_self = utils.getLink(entry, "self") self.link_up = utils.getLink(entry, "up") @@ -19,18 +15,14 @@ def __repr__(self): return "<%s (%s)>" % (self.__class__.__name__, self.title or self.link_self) def isParentOf(self, other): - return ( - other.link_self in self.link_related or other.link_up in self.link_related - ) + return other.link_self in self.link_related or other.link_up in self.link_related class UsagePoint(Resource): def __init__(self, entry, meterReadings=[]): super(UsagePoint, self).__init__(entry) obj = entry.find("./atom:content/espi:UsagePoint", utils.ns) - self.roleFlags = utils.getEntity( - obj, "espi:roleFlags", lambda e: int(e.text, 16) - ) + self.roleFlags = utils.getEntity(obj, "espi:roleFlags", lambda e: int(e.text, 16)) self.status = utils.getEntity(obj, "espi:status", lambda e: int(e.text)) self.serviceCategory = utils.getEntity( obj, @@ -74,10 +66,7 @@ def intervalReadings(self): def setReadingType(self, readingType): assert self.isParentOf(readingType) - assert ( - self.readingType is None - or self.readingType.link_self == readingType.link_self - ) + assert self.readingType is None or self.readingType.link_self == readingType.link_self self.readingType = readingType readingType.meterReading = self @@ -98,17 +87,13 @@ def __init__(self, entry, meterReadings=[]): "espi:accumulationBehaviour", lambda e: enums.AccumulationBehaviourType(int(e.text)), ) - self.commodity = utils.getEntity( - obj, "espi:commodity", lambda e: enums.CommodityType(int(e.text)) - ) + self.commodity = utils.getEntity(obj, "espi:commodity", lambda e: enums.CommodityType(int(e.text))) self.consumptionTier = utils.getEntity( obj, "espi:consumptionTier", lambda e: enums.ConsumptionTierType(int(e.text)), ) - self.currency = utils.getEntity( - obj, "espi:currency", lambda e: enums.CurrencyCode(int(e.text)) - ) + self.currency = utils.getEntity(obj, "espi:currency", lambda e: enums.CurrencyCode(int(e.text))) self.dataQualifier = utils.getEntity( obj, "espi:dataQualifier", lambda e: enums.DataQualifierType(int(e.text)) ) @@ -118,27 +103,15 @@ def __init__(self, entry, meterReadings=[]): self.flowDirection = utils.getEntity( obj, "espi:flowDirection", lambda e: enums.FlowDirectionType(int(e.text)) ) - self.intervalLength = utils.getEntity( - obj, "espi:intervalLength", lambda e: int(e.text) - ) - self.kind = utils.getEntity( - obj, "espi:kind", lambda e: enums.KindType(int(e.text)) - ) - self.phase = utils.getEntity( - obj, "espi:phase", lambda e: enums.PhaseCode(int(e.text)) - ) - self.powerOfTenMultiplier = utils.getEntity( - obj, "espi:powerOfTenMultiplier", lambda e: int(e.text) - ) + self.intervalLength = utils.getEntity(obj, "espi:intervalLength", lambda e: int(e.text)) + self.kind = utils.getEntity(obj, "espi:kind", lambda e: enums.KindType(int(e.text))) + self.phase = utils.getEntity(obj, "espi:phase", lambda e: enums.PhaseCode(int(e.text))) + self.powerOfTenMultiplier = utils.getEntity(obj, "espi:powerOfTenMultiplier", lambda e: int(e.text)) self.timeAttribute = utils.getEntity( obj, "espi:timeAttribute", lambda e: enums.TimeAttributeType(int(e.text)) ) - self.tou = utils.getEntity( - obj, "espi:tou", lambda e: enums.TOUType(int(e.text)) - ) - self.uom = utils.getEntity( - obj, "espi:uom", lambda e: enums.UomType(int(e.text)) - ) + self.tou = utils.getEntity(obj, "espi:tou", lambda e: enums.TOUType(int(e.text))) + self.uom = utils.getEntity(obj, "espi:uom", lambda e: enums.UomType(int(e.text))) for mr in meterReadings: if mr.isParentOf(self): @@ -152,15 +125,10 @@ def __init__(self, entry, meterReadings=[]): self.meterReading = None obj = entry.find("./atom:content/espi:IntervalBlock", utils.ns) - self.interval = utils.getEntity( - obj, "espi:interval", lambda e: objects.DateTimeInterval(e) - ) - self.intervalReadings = sorted( - [ - objects.IntervalReading(ir, self) - for ir in obj.findall("espi:IntervalReading", utils.ns) - ] - ) + self.interval = utils.getEntity(obj, "espi:interval", lambda e: objects.DateTimeInterval(e)) + self.intervalReadings = sorted([ + objects.IntervalReading(ir, self) for ir in obj.findall("espi:IntervalReading", utils.ns) + ]) for mr in meterReadings: if mr.isParentOf(self): diff --git a/src/greenbutton_objects/utils.py b/src/greenbutton_objects/utils.py index 1812c4e..0a15a8d 100644 --- a/src/greenbutton_objects/utils.py +++ b/src/greenbutton_objects/utils.py @@ -1,5 +1,3 @@ -#!/usr/bin/python - ns = {"atom": "http://www.w3.org/2005/Atom", "espi": "http://naesb.org/espi"} diff --git a/tests/test_parse/data/electricity/Coastal_Multi_Family_12hr_Jan_1_2011_to_Jan_1_2012_RetailCustomer_3.xml b/tests/test_parse/data/electricity/Coastal_Multi_Family_12hr_Jan_1_2011_to_Jan_1_2012_RetailCustomer_3.xml index 0bc8d65..9276689 100644 --- a/tests/test_parse/data/electricity/Coastal_Multi_Family_12hr_Jan_1_2011_to_Jan_1_2012_RetailCustomer_3.xml +++ b/tests/test_parse/data/electricity/Coastal_Multi_Family_12hr_Jan_1_2011_to_Jan_1_2012_RetailCustomer_3.xml @@ -37,20 +37,20 @@ Copyright (c) 2012,2013 EnergyOS.org Licensed by EnergyOS.org under one or more contributor license agreements. -See the NOTICE file distributed with this work for additional -information regarding copyright ownership. The EnergyOS.org licenses this -file to you under the Apache License, Version 2.0 (the "; License; "); +See the NOTICE file distributed with this work for additional +information regarding copyright ownership. The EnergyOS.org licenses this +file to you under the Apache License, Version 2.0 (the "; License; "); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions and limitations under the License. --> - + urn:uuid:DE33D836-583A-4F1F-A25D-EEEDCFBCA19E Green Button Subscription Feed diff --git a/tests/test_parse/data/electricity/Coastal_Multi_Family_Daily_Jan_1_2011_to_Jan_1_2012_RetailCustomer_4.xml b/tests/test_parse/data/electricity/Coastal_Multi_Family_Daily_Jan_1_2011_to_Jan_1_2012_RetailCustomer_4.xml index ee32b38..9228736 100644 --- a/tests/test_parse/data/electricity/Coastal_Multi_Family_Daily_Jan_1_2011_to_Jan_1_2012_RetailCustomer_4.xml +++ b/tests/test_parse/data/electricity/Coastal_Multi_Family_Daily_Jan_1_2011_to_Jan_1_2012_RetailCustomer_4.xml @@ -37,20 +37,20 @@ Copyright (c) 2012,2013 EnergyOS.org Licensed by EnergyOS.org under one or more contributor license agreements. -See the NOTICE file distributed with this work for additional -information regarding copyright ownership. The EnergyOS.org licenses this -file to you under the Apache License, Version 2.0 (the "; License; "); +See the NOTICE file distributed with this work for additional +information regarding copyright ownership. The EnergyOS.org licenses this +file to you under the Apache License, Version 2.0 (the "; License; "); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions and limitations under the License. --> - + urn:uuid:F19FC26A-F686-473B-AC83-19498C73CE6C Green Button Subscription Feed diff --git a/tests/test_parse/data/electricity/Coastal_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_5.xml b/tests/test_parse/data/electricity/Coastal_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_5.xml index 6c670a7..6e395d7 100644 --- a/tests/test_parse/data/electricity/Coastal_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_5.xml +++ b/tests/test_parse/data/electricity/Coastal_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_5.xml @@ -37,20 +37,20 @@ Copyright (c) 2012,2013 EnergyOS.org Licensed by EnergyOS.org under one or more contributor license agreements. -See the NOTICE file distributed with this work for additional -information regarding copyright ownership. The EnergyOS.org licenses this -file to you under the Apache License, Version 2.0 (the "; License; "); +See the NOTICE file distributed with this work for additional +information regarding copyright ownership. The EnergyOS.org licenses this +file to you under the Apache License, Version 2.0 (the "; License; "); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions and limitations under the License. --> - + urn:uuid:A99FA463-D8C4-430C-BA17-845A0BD2B47E Green Button Subscription Feed diff --git a/tests/test_parse/data/electricity/Desert_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_6.xml b/tests/test_parse/data/electricity/Desert_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_6.xml index 2de8366..fe997a8 100644 --- a/tests/test_parse/data/electricity/Desert_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_6.xml +++ b/tests/test_parse/data/electricity/Desert_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_6.xml @@ -37,20 +37,20 @@ Copyright (c) 2012,2013 EnergyOS.org Licensed by EnergyOS.org under one or more contributor license agreements. -See the NOTICE file distributed with this work for additional -information regarding copyright ownership. The EnergyOS.org licenses this -file to you under the Apache License, Version 2.0 (the "; License; "); +See the NOTICE file distributed with this work for additional +information regarding copyright ownership. The EnergyOS.org licenses this +file to you under the Apache License, Version 2.0 (the "; License; "); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions and limitations under the License. --> - + urn:uuid:CBFE70B0-8C77-40E1-88F4-71C9A2194918 Green Button Subscription Feed diff --git a/tests/test_parse/data/electricity/Desert_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_7.xml b/tests/test_parse/data/electricity/Desert_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_7.xml index dd2a87e..e89d9d6 100644 --- a/tests/test_parse/data/electricity/Desert_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_7.xml +++ b/tests/test_parse/data/electricity/Desert_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_7.xml @@ -37,20 +37,20 @@ Copyright (c) 2012,2013 EnergyOS.org Licensed by EnergyOS.org under one or more contributor license agreements. -See the NOTICE file distributed with this work for additional -information regarding copyright ownership. The EnergyOS.org licenses this -file to you under the Apache License, Version 2.0 (the "; License; "); +See the NOTICE file distributed with this work for additional +information regarding copyright ownership. The EnergyOS.org licenses this +file to you under the Apache License, Version 2.0 (the "; License; "); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions and limitations under the License. --> - + urn:uuid:E23E8870-5F5F-4EE9-BC92-39115DFB2AB3 Green Button Subscription Feed diff --git a/tests/test_parse/data/electricity/Inland_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_8.xml b/tests/test_parse/data/electricity/Inland_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_8.xml index d9b2370..73958f3 100644 --- a/tests/test_parse/data/electricity/Inland_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_8.xml +++ b/tests/test_parse/data/electricity/Inland_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_8.xml @@ -37,20 +37,20 @@ Copyright (c) 2012,2013 EnergyOS.org Licensed by EnergyOS.org under one or more contributor license agreements. -See the NOTICE file distributed with this work for additional -information regarding copyright ownership. The EnergyOS.org licenses this -file to you under the Apache License, Version 2.0 (the "; License; "); +See the NOTICE file distributed with this work for additional +information regarding copyright ownership. The EnergyOS.org licenses this +file to you under the Apache License, Version 2.0 (the "; License; "); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions and limitations under the License. --> - + urn:uuid:9E6FEA24-D374-4E42-BB88-0E7F4AEAE0C0 Green Button Subscription Feed diff --git a/tests/test_parse/data/electricity/Inland_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_9.xml b/tests/test_parse/data/electricity/Inland_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_9.xml index fa3242b..9f85da7 100644 --- a/tests/test_parse/data/electricity/Inland_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_9.xml +++ b/tests/test_parse/data/electricity/Inland_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_9.xml @@ -37,20 +37,20 @@ Copyright (c) 2012,2013 EnergyOS.org Licensed by EnergyOS.org under one or more contributor license agreements. -See the NOTICE file distributed with this work for additional -information regarding copyright ownership. The EnergyOS.org licenses this -file to you under the Apache License, Version 2.0 (the "; License; "); +See the NOTICE file distributed with this work for additional +information regarding copyright ownership. The EnergyOS.org licenses this +file to you under the Apache License, Version 2.0 (the "; License; "); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions and limitations under the License. --> - + urn:uuid:72A15B51-CD0C-4CB7-AB2F-E003EBD6CE6A Green Button Subscription Feed diff --git a/tests/test_parse/data/electricity/Mountain_Multi_family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_10.xml b/tests/test_parse/data/electricity/Mountain_Multi_family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_10.xml index 453eb73..70615cd 100644 --- a/tests/test_parse/data/electricity/Mountain_Multi_family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_10.xml +++ b/tests/test_parse/data/electricity/Mountain_Multi_family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_10.xml @@ -37,20 +37,20 @@ Copyright (c) 2012,2013 EnergyOS.org Licensed by EnergyOS.org under one or more contributor license agreements. -See the NOTICE file distributed with this work for additional -information regarding copyright ownership. The EnergyOS.org licenses this -file to you under the Apache License, Version 2.0 (the "; License; "); +See the NOTICE file distributed with this work for additional +information regarding copyright ownership. The EnergyOS.org licenses this +file to you under the Apache License, Version 2.0 (the "; License; "); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions and limitations under the License. --> - + urn:uuid:7492E40B-83FA-485E-9A1C-273AAFAC6953 Green Button Subscription Feed diff --git a/tests/test_parse/data/electricity/TestGBDataHourlyNineDaysBinnedDaily.xml b/tests/test_parse/data/electricity/TestGBDataHourlyNineDaysBinnedDaily.xml index db4ec6f..9153f3f 100644 --- a/tests/test_parse/data/electricity/TestGBDataHourlyNineDaysBinnedDaily.xml +++ b/tests/test_parse/data/electricity/TestGBDataHourlyNineDaysBinnedDaily.xml @@ -37,20 +37,20 @@ Copyright (c) 2012,2013 EnergyOS.org Licensed by EnergyOS.org under one or more contributor license agreements. -See the NOTICE file distributed with this work for additional -information regarding copyright ownership. The EnergyOS.org licenses this -file to you under the Apache License, Version 2.0 (the "; License; "); +See the NOTICE file distributed with this work for additional +information regarding copyright ownership. The EnergyOS.org licenses this +file to you under the Apache License, Version 2.0 (the "; License; "); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions and limitations under the License. --> - + urn:uuid:6D8BE83A-4B44-414C-B828-20809ACF30D1 Green Button Subscription Feed diff --git a/tests/test_parse/data/electricity/TestGBDataOneYearDailyBinnedMonthly.xml b/tests/test_parse/data/electricity/TestGBDataOneYearDailyBinnedMonthly.xml index 4bfcd7d..2c862d3 100644 --- a/tests/test_parse/data/electricity/TestGBDataOneYearDailyBinnedMonthly.xml +++ b/tests/test_parse/data/electricity/TestGBDataOneYearDailyBinnedMonthly.xml @@ -37,20 +37,20 @@ Copyright (c) 2012,2013 EnergyOS.org Licensed by EnergyOS.org under one or more contributor license agreements. -See the NOTICE file distributed with this work for additional -information regarding copyright ownership. The EnergyOS.org licenses this -file to you under the Apache License, Version 2.0 (the "; License; "); +See the NOTICE file distributed with this work for additional +information regarding copyright ownership. The EnergyOS.org licenses this +file to you under the Apache License, Version 2.0 (the "; License; "); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions and limitations under the License. --> - + urn:uuid:1DA5F5DD-312B-4896-B910-098F59C73965 Green Button Subscription Feed diff --git a/tests/test_parse/data/natural_gas/ngma_natural_gas_billing_billing_data_Service 1_1_2021-05-26_to_2024-04-25.xml b/tests/test_parse/data/natural_gas/ngma_natural_gas_billing_billing_data_Service 1_1_2021-05-26_to_2024-04-25.xml index 153b0e2..fae343f 100644 --- a/tests/test_parse/data/natural_gas/ngma_natural_gas_billing_billing_data_Service 1_1_2021-05-26_to_2024-04-25.xml +++ b/tests/test_parse/data/natural_gas/ngma_natural_gas_billing_billing_data_Service 1_1_2021-05-26_to_2024-04-25.xml @@ -344,4 +344,4 @@ - \ No newline at end of file + diff --git a/tests/test_parse/expected_results/electricity/Coastal_Multi_Family_12hr_Jan_1_2011_to_Jan_1_2012_RetailCustomer_3.txt b/tests/test_parse/expected_results/electricity/Coastal_Multi_Family_12hr_Jan_1_2011_to_Jan_1_2012_RetailCustomer_3.txt index 6697831..6b85d7e 100644 --- a/tests/test_parse/expected_results/electricity/Coastal_Multi_Family_12hr_Jan_1_2011_to_Jan_1_2012_RetailCustomer_3.txt +++ b/tests/test_parse/expected_results/electricity/Coastal_Multi_Family_12hr_Jan_1_2011_to_Jan_1_2012_RetailCustomer_3.txt @@ -17518,4 +17518,3 @@ UsagePoint (Coastal Multi-Family 12hr) electricity None: Meter Reading (Hourly 2012-01-01 06:00:00+00:00, 1:00:00: 559 Wh 2012-01-01 07:00:00+00:00, 1:00:00: 482 Wh - diff --git a/tests/test_parse/expected_results/electricity/Coastal_Multi_Family_Daily_Jan_1_2011_to_Jan_1_2012_RetailCustomer_4.txt b/tests/test_parse/expected_results/electricity/Coastal_Multi_Family_Daily_Jan_1_2011_to_Jan_1_2012_RetailCustomer_4.txt index 8a082e2..913a73f 100644 --- a/tests/test_parse/expected_results/electricity/Coastal_Multi_Family_Daily_Jan_1_2011_to_Jan_1_2012_RetailCustomer_4.txt +++ b/tests/test_parse/expected_results/electricity/Coastal_Multi_Family_Daily_Jan_1_2011_to_Jan_1_2012_RetailCustomer_4.txt @@ -17518,4 +17518,3 @@ UsagePoint (Coastal Multi-Family Daily) electricity None: Meter Reading (Hourly 2012-01-01 06:00:00+00:00, 1:00:00: 559 Wh 2012-01-01 07:00:00+00:00, 1:00:00: 482 Wh - diff --git a/tests/test_parse/expected_results/electricity/Coastal_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_5.txt b/tests/test_parse/expected_results/electricity/Coastal_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_5.txt index fada02d..88b0830 100644 --- a/tests/test_parse/expected_results/electricity/Coastal_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_5.txt +++ b/tests/test_parse/expected_results/electricity/Coastal_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_5.txt @@ -17518,4 +17518,3 @@ UsagePoint (Coastal Multi-Family) electricity None: Meter Reading (Hourly Elect 2012-01-01 06:00:00+00:00, 1:00:00: 559 Wh 2012-01-01 07:00:00+00:00, 1:00:00: 482 Wh - diff --git a/tests/test_parse/expected_results/electricity/Desert_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_6.txt b/tests/test_parse/expected_results/electricity/Desert_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_6.txt index 7780036..ce624a6 100644 --- a/tests/test_parse/expected_results/electricity/Desert_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_6.txt +++ b/tests/test_parse/expected_results/electricity/Desert_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_6.txt @@ -17518,4 +17518,3 @@ UsagePoint (Desert Multi-Family) electricity None: Meter Reading (Hourly Electr 2012-01-01 06:00:00+00:00, 1:00:00: 580 Wh 2012-01-01 07:00:00+00:00, 1:00:00: 597 Wh - diff --git a/tests/test_parse/expected_results/electricity/Desert_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_7.txt b/tests/test_parse/expected_results/electricity/Desert_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_7.txt index d3d31dd..8b895c1 100644 --- a/tests/test_parse/expected_results/electricity/Desert_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_7.txt +++ b/tests/test_parse/expected_results/electricity/Desert_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_7.txt @@ -17518,4 +17518,3 @@ UsagePoint (Desert Single-Family) electricity None: Meter Reading (Hourly Elect 2012-01-01 06:00:00+00:00, 1:00:00: 1571 Wh 2012-01-01 07:00:00+00:00, 1:00:00: 1584 Wh - diff --git a/tests/test_parse/expected_results/electricity/Inland_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_8.txt b/tests/test_parse/expected_results/electricity/Inland_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_8.txt index afaac76..965230a 100644 --- a/tests/test_parse/expected_results/electricity/Inland_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_8.txt +++ b/tests/test_parse/expected_results/electricity/Inland_Multi_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_8.txt @@ -17518,4 +17518,3 @@ UsagePoint (Inland Multi-Family) electricity None: Meter Reading (Hourly Electr 2012-01-01 06:00:00+00:00, 1:00:00: 628 Wh 2012-01-01 07:00:00+00:00, 1:00:00: 591 Wh - diff --git a/tests/test_parse/expected_results/electricity/Inland_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_9.txt b/tests/test_parse/expected_results/electricity/Inland_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_9.txt index b84e794..e5b5705 100644 --- a/tests/test_parse/expected_results/electricity/Inland_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_9.txt +++ b/tests/test_parse/expected_results/electricity/Inland_Single_Family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_9.txt @@ -17518,4 +17518,3 @@ UsagePoint (Inland Single-Family) electricity None: Meter Reading (Hourly Elect 2012-01-01 06:00:00+00:00, 1:00:00: 1153 Wh 2012-01-01 07:00:00+00:00, 1:00:00: 1034 Wh - diff --git a/tests/test_parse/expected_results/electricity/Mountain_Multi_family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_10.txt b/tests/test_parse/expected_results/electricity/Mountain_Multi_family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_10.txt index fbbf0ab..8fcc1b9 100644 --- a/tests/test_parse/expected_results/electricity/Mountain_Multi_family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_10.txt +++ b/tests/test_parse/expected_results/electricity/Mountain_Multi_family_Jan_1_2011_to_Jan_1_2012_RetailCustomer_10.txt @@ -17518,4 +17518,3 @@ UsagePoint (Mountain Multi-family) electricity None: Meter Reading (Hourly Elec 2012-01-01 06:00:00+00:00, 1:00:00: 937 Wh 2012-01-01 07:00:00+00:00, 1:00:00: 844 Wh - diff --git a/tests/test_parse/expected_results/electricity/TestGBDataHourlyNineDaysBinnedDaily.txt b/tests/test_parse/expected_results/electricity/TestGBDataHourlyNineDaysBinnedDaily.txt index 2557a19..7847af0 100644 --- a/tests/test_parse/expected_results/electricity/TestGBDataHourlyNineDaysBinnedDaily.txt +++ b/tests/test_parse/expected_results/electricity/TestGBDataHourlyNineDaysBinnedDaily.txt @@ -430,4 +430,3 @@ UsagePoint (Green Button Sample Data File) electricity None: Meter Reading (Mon 2014-01-10 03:00:00+00:00, 1:00:00: 819 Wh($0.04914) 2014-01-10 04:00:00+00:00, 1:00:00: 273 Wh($0.00819) - diff --git a/tests/test_parse/expected_results/electricity/TestGBDataOneYearDailyBinnedMonthly.txt b/tests/test_parse/expected_results/electricity/TestGBDataOneYearDailyBinnedMonthly.txt index 8420143..9059a04 100644 --- a/tests/test_parse/expected_results/electricity/TestGBDataOneYearDailyBinnedMonthly.txt +++ b/tests/test_parse/expected_results/electricity/TestGBDataOneYearDailyBinnedMonthly.txt @@ -886,4 +886,3 @@ UsagePoint (Green Button Sample Data File) electricity None: Meter Reading (Mon 2014-03-19 04:00:00+00:00, 1 day, 0:00:00: 21021 Wh($2.56347) 2014-03-20 04:00:00+00:00, 1 day, 0:00:00: 21021 Wh($2.56347) - diff --git a/tests/test_parse/expected_results/electricity/cc_customer_11.txt b/tests/test_parse/expected_results/electricity/cc_customer_11.txt index 6976d31..82519ce 100644 --- a/tests/test_parse/expected_results/electricity/cc_customer_11.txt +++ b/tests/test_parse/expected_results/electricity/cc_customer_11.txt @@ -210812,4 +210812,3 @@ UsagePoint (Customer 11) electricity None: Meter Reading (Five Minute Electrici 2012-12-31 23:55:00+00:00, 0:05:00: 161075 Wh 2013-01-01 00:00:00+00:00, 0:05:00: 151634 Wh - diff --git a/tests/test_parse/expected_results/electricity/cc_customer_12.txt b/tests/test_parse/expected_results/electricity/cc_customer_12.txt index 667aa1d..1e47027 100644 --- a/tests/test_parse/expected_results/electricity/cc_customer_12.txt +++ b/tests/test_parse/expected_results/electricity/cc_customer_12.txt @@ -210812,4 +210812,3 @@ UsagePoint (Customer 12) electricity None: Meter Reading (Five Minute Electrici 2012-12-31 23:55:00+00:00, 0:05:00: 161271 Wh 2013-01-01 00:00:00+00:00, 0:05:00: 151818 Wh - diff --git a/tests/test_parse/expected_results/electricity/cc_customer_13.txt b/tests/test_parse/expected_results/electricity/cc_customer_13.txt index 3a6ed88..145a2ec 100644 --- a/tests/test_parse/expected_results/electricity/cc_customer_13.txt +++ b/tests/test_parse/expected_results/electricity/cc_customer_13.txt @@ -210812,4 +210812,3 @@ UsagePoint (Customer 13) electricity None: Meter Reading (Five Minute Electrici 2012-12-31 23:55:00+00:00, 0:05:00: 27553 Wh 2013-01-01 00:00:00+00:00, 0:05:00: 27553 Wh - diff --git a/tests/test_parse/expected_results/natural_gas/ngma_natural_gas_billing_billing_data_Service 1_1_2021-05-26_to_2024-04-25.txt b/tests/test_parse/expected_results/natural_gas/ngma_natural_gas_billing_billing_data_Service 1_1_2021-05-26_to_2024-04-25.txt index 99ab045..caf7d64 100644 --- a/tests/test_parse/expected_results/natural_gas/ngma_natural_gas_billing_billing_data_Service 1_1_2021-05-26_to_2024-04-25.txt +++ b/tests/test_parse/expected_results/natural_gas/ngma_natural_gas_billing_billing_data_Service 1_1_2021-05-26_to_2024-04-25.txt @@ -68,4 +68,3 @@ UsagePoint (1 MAIN ST, ANYTOWN ME 12345) naturalGas None: Meter Reading (None) 2024-02-24 00:00:00+00:00, 31 days, 23:00:00: 133.0 thm($310.4) 2024-03-27 00:00:00+00:00, 30 days, 0:00:00: 91.0 thm($213.14) - diff --git a/tests/test_parse/test_parse.py b/tests/test_parse/test_parse.py index 52f2966..db259a2 100644 --- a/tests/test_parse/test_parse.py +++ b/tests/test_parse/test_parse.py @@ -58,9 +58,7 @@ def verify(energy_source): parsed_feed = parse.parse_feed(data_path / energy_source / data_file_name) parsed_feed_representation = parse.parse_feed_representation(parsed_feed) result_file_name = data_file_name.strip("xml") + "txt" - expected_results_file = ( - expected_results_path / energy_source / result_file_name - ) + expected_results_file = expected_results_path / energy_source / result_file_name with open(expected_results_file) as f: assert f.read() == parsed_feed_representation @@ -69,4 +67,4 @@ def verify(energy_source): if __name__ == "__main__": - save_expected_results() \ No newline at end of file + save_expected_results()