Skip to content

Commit d4d0f60

Browse files
committed
Added support for Python 3.13
1 parent 780e7fe commit d4d0f60

File tree

10 files changed

+276
-400
lines changed

10 files changed

+276
-400
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: [ ubuntu-latest ]
13-
python-version: [ "3.9", "3.12" ]
12+
os: [ubuntu-latest]
13+
python-version: ["3.9", "3.13"]
1414
runs-on: ${{ matrix.os }}
1515
steps:
1616
- uses: actions/checkout@v4
@@ -21,33 +21,22 @@ jobs:
2121
- name: Install poetry
2222
uses: abatilo/actions-poetry@v3
2323
with:
24-
poetry-version: 1.8.3
25-
- name: Setup Python
24+
poetry-version: 1.8.4
25+
- name: Install dependencies with Poetry
2626
run: |
2727
pip install --upgrade pip
2828
poetry install
29-
- name: Run tests
29+
- name: Run pytest
3030
run: |
3131
poetry run pytest
32-
formatting:
33-
name: Pre-commit checks
32+
pre-commit:
3433
runs-on: ubuntu-latest
3534
steps:
36-
- name: Checkout code
37-
uses: actions/checkout@v4
38-
- name: Install Python
39-
uses: actions/setup-python@v5
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-python@v5
4037
with:
41-
python-version: "3.12"
38+
python-version: "3.13"
4239
- name: Run pre-commit
4340
uses: pre-commit/[email protected]
4441
with:
4542
extra_args: --all-files
46-
- name: Install poetry
47-
uses: abatilo/actions-poetry@v3
48-
with:
49-
poetry-version: 1.8.3
50-
- name: type check
51-
run: |
52-
poetry install
53-
poetry run mypy .

.pre-commit-config.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
hooks:
55
- id: trailing-whitespace
66
- id: check-added-large-files
7-
args: [ '--maxkb=2000' ]
7+
args: ["--maxkb=2000"]
88
- id: check-ast
99
- id: check-json
1010
- id: check-merge-conflict
@@ -14,17 +14,21 @@ repos:
1414
- id: end-of-file-fixer
1515
- id: mixed-line-ending
1616
- id: pretty-format-json
17-
args: [ '--autofix', '--no-sort-keys' ]
17+
args: ["--autofix", "--no-sort-keys"]
18+
- repo: https://github.com/pre-commit/mirrors-prettier
19+
rev: v4.0.0-alpha.8
20+
hooks:
21+
- id: prettier
22+
types_or: [markdown, yaml]
1823
- repo: https://github.com/pre-commit/mirrors-mypy
19-
rev: v1.11.2
24+
rev: v1.12.1
2025
hooks:
2126
- id: mypy
22-
args: [ "--install-types", "--non-interactive", "--ignore-missing-imports" ]
2327
- repo: https://github.com/astral-sh/ruff-pre-commit
24-
rev: v0.6.7
28+
rev: v0.7.0
2529
hooks:
2630
# Run the linter
2731
- id: ruff
28-
args: [ --fix, --exit-non-zero-on-fix, --output-format=full ]
32+
args: [--fix, --exit-non-zero-on-fix, --output-format=full]
2933
# Run the formatter
3034
- id: ruff-format

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## Version 0.2.2
4+
5+
- Added explicit support for Python v3.13
6+
37
## Version 0.2.1
48

59
- Replaced flake8 and other tools with Ruff, applied Ruff fixes

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
BuildingSync®, Copyright (c) 2015-2022, Alliance for Sustainable Energy, LLC, and other contributors.
1+
BuildingSync®, Copyright (c) 2015, 2024 Alliance for Sustainable Energy, LLC, and other contributors.
22

33
All rights reserved.
44

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The pre-importer will identify assets defined in the `asset_definitions.json` fi
3636
There are various methods of calculating assets:
3737

3838
1. `sqft`. The sqft method will calculate a 'primary' and 'secondary' value for the asset based on the area it serves.
39-
This is calculated from the floor areas defined in each `Section` element. `Conditioned` floor area values will be
39+
This is calculated from the floor areas defined in each `Section` element. `Conditioned` floor area values will be
4040
used if present; `Gross` otherwise.
4141

4242
1. `num`. The num method will sum up all assets of the specified type and return a single overall number.
@@ -100,7 +100,7 @@ There are currently 5 types of assets that can be extracted:
100100
1. sqft: Sqft assets take into account the floor area served by a specific asset and returns 'Primary' and 'Secondary'
101101
values. For example: Primary HVAC System and Secondary HVAC System.
102102

103-
1. avg_sqft: Avg_sqft assets compute a weighted average to get the an average asset value. For example: Average Heating
103+
1. avg_sqft: Avg_sqft assets compute a weighted average to get the an average asset value. For example: Average Heating
104104
Setpoint.
105105

106106
1. num: Num assets count the total number of the specified asset found. For example, Total number of lighting systems.
@@ -110,11 +110,11 @@ There are currently 5 types of assets that can be extracted:
110110

111111
1. custom: For asset that need particular handling, such as Heating Efficiency. The current assets that have custom
112112
methods are:
113-
- Heating System Efficiency
114-
- Cooling System Efficiency
115-
- Lighting System Efficiency
116-
- Water Heater Efficiency
117-
- Heating Fuel Type
113+
- Heating System Efficiency
114+
- Cooling System Efficiency
115+
- Lighting System Efficiency
116+
- Water Heater Efficiency
117+
- Heating Fuel Type
118118

119119
The schema for the assets definition JSON file is in `schemas/asset_definitions_schema.json`.
120120

@@ -174,7 +174,7 @@ will be saved to `tests\output\cts_output.xlsx`.
174174

175175
### Pre-commit
176176

177-
This project uses `pre-commit <https://pre-commit.com/>`_ to ensure code consistency.
177+
This project uses `pre-commit <https://pre-commit.com/>`\_ to ensure code consistency.
178178
To enable pre-commit on every commit run the following from the command line from within the git checkout of the
179179
BuildingSync-asset-extractor
180180

0 commit comments

Comments
 (0)