epinterface 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- epinterface-1.0.0/.editorconfig +5 -0
- epinterface-1.0.0/.github/actions/setup-python-env/action.yml +34 -0
- epinterface-1.0.0/.github/workflows/main.yml +92 -0
- epinterface-1.0.0/.github/workflows/on-release-main.yml +66 -0
- epinterface-1.0.0/.github/workflows/validate-codecov-config.yml +15 -0
- epinterface-1.0.0/.gitignore +156 -0
- epinterface-1.0.0/.pre-commit-config.yaml +32 -0
- epinterface-1.0.0/.prettierignore +1 -0
- epinterface-1.0.0/.python-version +1 -0
- epinterface-1.0.0/.vscode/settings.json +19 -0
- epinterface-1.0.0/CONTRIBUTING.md +115 -0
- epinterface-1.0.0/LICENSE +21 -0
- epinterface-1.0.0/Makefile +76 -0
- epinterface-1.0.0/PKG-INFO +70 -0
- epinterface-1.0.0/README.md +49 -0
- epinterface-1.0.0/codecov.yaml +9 -0
- epinterface-1.0.0/docs/cli.md +9 -0
- epinterface-1.0.0/docs/index.md +8 -0
- epinterface-1.0.0/docs/modules/actions.md +5 -0
- epinterface-1.0.0/docs/modules/builder.md +3 -0
- epinterface-1.0.0/docs/modules/climate-studio.md +3 -0
- epinterface-1.0.0/docs/modules/geometry.md +5 -0
- epinterface-1.0.0/docs/modules/interface.md +5 -0
- epinterface-1.0.0/docs/modules/sbem/components.md +29 -0
- epinterface-1.0.0/docs/modules/sbem/composer.md +1 -0
- epinterface-1.0.0/docs/modules/sbem/index.md +1 -0
- epinterface-1.0.0/docs/modules/weather.md +3 -0
- epinterface-1.0.0/epinterface/__init__.py +1 -0
- epinterface-1.0.0/epinterface/actions.py +382 -0
- epinterface-1.0.0/epinterface/builder.py +310 -0
- epinterface-1.0.0/epinterface/cli.py +284 -0
- epinterface-1.0.0/epinterface/climate_studio/__init__.py +1 -0
- epinterface-1.0.0/epinterface/climate_studio/builder.py +634 -0
- epinterface-1.0.0/epinterface/climate_studio/interface.py +2159 -0
- epinterface-1.0.0/epinterface/constants/__init__.py +73 -0
- epinterface-1.0.0/epinterface/data/Minimal.idf +164 -0
- epinterface-1.0.0/epinterface/data/USA_MA_Boston-Logan.Intl.AP.725090_TMYx.2009-2023.ddy +3353 -0
- epinterface-1.0.0/epinterface/data/USA_MA_Boston-Logan.Intl.AP.725090_TMYx.2009-2023.epw +8768 -0
- epinterface-1.0.0/epinterface/data/USA_MA_Boston-Logan.Intl.AP.725090_TMYx.2009-2023.zip +0 -0
- epinterface-1.0.0/epinterface/data/__init__.py +18 -0
- epinterface-1.0.0/epinterface/data/res_schedules.parquet +0 -0
- epinterface-1.0.0/epinterface/ddy_injector_bayes.py +330 -0
- epinterface-1.0.0/epinterface/ddy_interface_bayes.py +330 -0
- epinterface-1.0.0/epinterface/geometry.py +724 -0
- epinterface-1.0.0/epinterface/interface.py +1080 -0
- epinterface-1.0.0/epinterface/py.typed +0 -0
- epinterface-1.0.0/epinterface/sbem/__init__.py +1 -0
- epinterface-1.0.0/epinterface/sbem/annotations.py +57 -0
- epinterface-1.0.0/epinterface/sbem/builder.py +1350 -0
- epinterface-1.0.0/epinterface/sbem/common.py +38 -0
- epinterface-1.0.0/epinterface/sbem/components/__init__.py +1 -0
- epinterface-1.0.0/epinterface/sbem/components/composer.py +388 -0
- epinterface-1.0.0/epinterface/sbem/components/envelope.py +367 -0
- epinterface-1.0.0/epinterface/sbem/components/materials.py +144 -0
- epinterface-1.0.0/epinterface/sbem/components/operations.py +342 -0
- epinterface-1.0.0/epinterface/sbem/components/schedules.py +716 -0
- epinterface-1.0.0/epinterface/sbem/components/space_use.py +270 -0
- epinterface-1.0.0/epinterface/sbem/components/systems.py +270 -0
- epinterface-1.0.0/epinterface/sbem/components/zones.py +25 -0
- epinterface-1.0.0/epinterface/sbem/exceptions.py +101 -0
- epinterface-1.0.0/epinterface/sbem/fields/__init__.py +1 -0
- epinterface-1.0.0/epinterface/sbem/fields/spec.py +95 -0
- epinterface-1.0.0/epinterface/sbem/flat_model.py +2210 -0
- epinterface-1.0.0/epinterface/sbem/interface.py +590 -0
- epinterface-1.0.0/epinterface/sbem/model_graph_structure.md +31 -0
- epinterface-1.0.0/epinterface/sbem/prisma/client.py +650 -0
- epinterface-1.0.0/epinterface/sbem/prisma/migrations/20250309133033_create_initial_schema/migration.sql +443 -0
- epinterface-1.0.0/epinterface/sbem/prisma/migrations/20250310162045_switch_to_using_one_week_per_month/migration.sql +61 -0
- epinterface-1.0.0/epinterface/sbem/prisma/migrations/20250317202733_change_names_ventilation/migration.sql +30 -0
- epinterface-1.0.0/epinterface/sbem/prisma/migrations/20250325185158_add_mutually_exclusive_ventilation_techtypes/migration.sql +32 -0
- epinterface-1.0.0/epinterface/sbem/prisma/migrations/20250326141941_reduce_naming_complexity_ventilation/migration.sql +37 -0
- epinterface-1.0.0/epinterface/sbem/prisma/migrations/20250331141910_add_support_for_attic_and_basement_constructions/migration.sql +74 -0
- epinterface-1.0.0/epinterface/sbem/prisma/migrations/20250919152559_decouple_basement_infiltration/migration.sql +31 -0
- epinterface-1.0.0/epinterface/sbem/prisma/migrations/migration_lock.toml +3 -0
- epinterface-1.0.0/epinterface/sbem/prisma/partial_types.py +196 -0
- epinterface-1.0.0/epinterface/sbem/prisma/schema.prisma +582 -0
- epinterface-1.0.0/epinterface/sbem/prisma/seed_fns.py +732 -0
- epinterface-1.0.0/epinterface/sbem/utils.py +74 -0
- epinterface-1.0.0/epinterface/weather.py +138 -0
- epinterface-1.0.0/mkdocs.yml +78 -0
- epinterface-1.0.0/notebooks/everett_lib.json +17310 -0
- epinterface-1.0.0/notebooks/everett_lib_v2.ipynb +1070 -0
- epinterface-1.0.0/notebooks/everett_retrofit_actions.ipynb +183 -0
- epinterface-1.0.0/notebooks/everett_retrofits.yaml +162 -0
- epinterface-1.0.0/notebooks/idf-demo.ipynb +1096 -0
- epinterface-1.0.0/notebooks/idf-demo.py +930 -0
- epinterface-1.0.0/notebooks/view-geo.ipynb +174 -0
- epinterface-1.0.0/pyproject.toml +132 -0
- epinterface-1.0.0/scripts/gridsim.py +93 -0
- epinterface-1.0.0/tests/conftest.py +98 -0
- epinterface-1.0.0/tests/data/20251001_Template_MAWebApp.xlsx +0 -0
- epinterface-1.0.0/tests/data/USA_MA_Chicopee-Westover.Metro.AP.744910_TMYx.2009-2023.zip +0 -0
- epinterface-1.0.0/tests/data/component-map-ma.yml +169 -0
- epinterface-1.0.0/tests/data/components-ma.db +0 -0
- epinterface-1.0.0/tests/data/old/0318_Template_MAWebApp.xlsx +0 -0
- epinterface-1.0.0/tests/data/old/Template_MAWebApp.xlsx +0 -0
- epinterface-1.0.0/tests/data/old/component-map-ma.yml +159 -0
- epinterface-1.0.0/tests/data/old/components-ma-old.db +0 -0
- epinterface-1.0.0/tests/data/old/components-ma.db +0 -0
- epinterface-1.0.0/tests/data/old/components-ma.db Kopie +0 -0
- epinterface-1.0.0/tests/data/old/components-ma.db Kopie 2 +0 -0
- epinterface-1.0.0/tests/data/old/components-ma.db Kopie 3 +0 -0
- epinterface-1.0.0/tests/data/old/semantic-fields-ma.yml +106 -0
- epinterface-1.0.0/tests/data/semantic-fields-ma.yml +106 -0
- epinterface-1.0.0/tests/data/test_lib.json +17310 -0
- epinterface-1.0.0/tests/data/tester_lib.xlsx +0 -0
- epinterface-1.0.0/tests/test_actions.py +531 -0
- epinterface-1.0.0/tests/test_components/test_builder.py +46 -0
- epinterface-1.0.0/tests/test_components/test_component_lib.py +54 -0
- epinterface-1.0.0/tests/test_components/test_envelope_comps.py +74 -0
- epinterface-1.0.0/tests/test_components/test_operations.py +45 -0
- epinterface-1.0.0/tests/test_components/test_space_use_comps.py +320 -0
- epinterface-1.0.0/tests/test_composer.py +932 -0
- epinterface-1.0.0/tests/test_db.py +388 -0
- epinterface-1.0.0/tests/test_example.py +6 -0
- epinterface-1.0.0/tests/test_geometry.py +638 -0
- epinterface-1.0.0/tests/test_weather.py +170 -0
- epinterface-1.0.0/tox.ini +17 -0
- epinterface-1.0.0/uv.lock +3571 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: "Setup Python Environment"
|
|
2
|
+
description: "Set up Python environment for the given Python version"
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
python-version:
|
|
6
|
+
description: "Python version to use"
|
|
7
|
+
required: true
|
|
8
|
+
default: "3.12"
|
|
9
|
+
uv-version:
|
|
10
|
+
description: "uv version to use"
|
|
11
|
+
required: true
|
|
12
|
+
default: "0.6.14"
|
|
13
|
+
|
|
14
|
+
runs:
|
|
15
|
+
using: "composite"
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: ${{ inputs.python-version }}
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v2
|
|
23
|
+
with:
|
|
24
|
+
version: ${{ inputs.uv-version }}
|
|
25
|
+
enable-cache: "true"
|
|
26
|
+
cache-suffix: ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Install Python dependencies
|
|
29
|
+
run: uv sync --frozen --all-extras --all-groups
|
|
30
|
+
shell: bash
|
|
31
|
+
|
|
32
|
+
- name: Install Prisma
|
|
33
|
+
run: make prisma-generate
|
|
34
|
+
shell: bash
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
name: Main
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
quality:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Check out
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- uses: actions/cache@v4
|
|
18
|
+
with:
|
|
19
|
+
path: ~/.cache/pre-commit
|
|
20
|
+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
21
|
+
|
|
22
|
+
- name: Set up the environment
|
|
23
|
+
uses: ./.github/actions/setup-python-env
|
|
24
|
+
|
|
25
|
+
# - name: Generate Prisma client
|
|
26
|
+
# run: make prisma-generate
|
|
27
|
+
|
|
28
|
+
- name: Run checks
|
|
29
|
+
run: make check
|
|
30
|
+
|
|
31
|
+
tests-and-type-check:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
strategy:
|
|
34
|
+
matrix:
|
|
35
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
36
|
+
energyplus-version: [22.2.0] # later, add 9.4.0
|
|
37
|
+
include:
|
|
38
|
+
- runs-on: ubuntu-latest
|
|
39
|
+
compiler: gcc
|
|
40
|
+
- energyplus-version: 22.2.0
|
|
41
|
+
energyplus-sha: c249759bad
|
|
42
|
+
energyplus-install: 22-2-0
|
|
43
|
+
energyplus-tag: v22.2.0
|
|
44
|
+
fail-fast: false
|
|
45
|
+
defaults:
|
|
46
|
+
run:
|
|
47
|
+
shell: bash
|
|
48
|
+
steps:
|
|
49
|
+
- name: Check out
|
|
50
|
+
uses: actions/checkout@v4
|
|
51
|
+
|
|
52
|
+
- name: Set up the environment
|
|
53
|
+
uses: ./.github/actions/setup-python-env
|
|
54
|
+
with:
|
|
55
|
+
python-version: ${{ matrix.python-version }}
|
|
56
|
+
|
|
57
|
+
# - name: Generate Prisma client
|
|
58
|
+
# run: make prisma-generate
|
|
59
|
+
|
|
60
|
+
- name: Check typing
|
|
61
|
+
run: uv run pyright
|
|
62
|
+
|
|
63
|
+
- name: Install EnergyPlus
|
|
64
|
+
uses: Elementa-Engineering/install-energyplus@v1
|
|
65
|
+
with:
|
|
66
|
+
energyplus-version: ${{ matrix.energyplus-version }}
|
|
67
|
+
energyplus-sha: ${{ matrix.energyplus-sha }}
|
|
68
|
+
energyplus-install: ${{ matrix.energyplus-install }}
|
|
69
|
+
|
|
70
|
+
- name: Run tests
|
|
71
|
+
run: uv run pytest tests --cov --cov-config=pyproject.toml --cov-report=xml
|
|
72
|
+
|
|
73
|
+
- name: Upload coverage reports to Codecov with GitHub Action on Python 3.12
|
|
74
|
+
uses: codecov/codecov-action@v4
|
|
75
|
+
if: ${{ matrix.python-version == '3.12' }}
|
|
76
|
+
with:
|
|
77
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
78
|
+
|
|
79
|
+
check-docs:
|
|
80
|
+
runs-on: ubuntu-latest
|
|
81
|
+
steps:
|
|
82
|
+
- name: Check out
|
|
83
|
+
uses: actions/checkout@v4
|
|
84
|
+
|
|
85
|
+
- name: Set up the environment
|
|
86
|
+
uses: ./.github/actions/setup-python-env
|
|
87
|
+
|
|
88
|
+
# - name: Generate Prisma client
|
|
89
|
+
# run: make prisma-generate
|
|
90
|
+
|
|
91
|
+
- name: Check if documentation can be built
|
|
92
|
+
run: uv run mkdocs build -s
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: release-main
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
set-version:
|
|
10
|
+
runs-on: ubuntu-24.04
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Export tag
|
|
15
|
+
id: vars
|
|
16
|
+
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
|
|
17
|
+
if: ${{ github.event_name == 'release' }}
|
|
18
|
+
|
|
19
|
+
- name: Update project version
|
|
20
|
+
run: |
|
|
21
|
+
sed -i "s/^version = \".*\"/version = \"$RELEASE_VERSION\"/" pyproject.toml
|
|
22
|
+
env:
|
|
23
|
+
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
|
|
24
|
+
if: ${{ github.event_name == 'release' }}
|
|
25
|
+
|
|
26
|
+
- name: Upload updated pyproject.toml
|
|
27
|
+
uses: actions/upload-artifact@v4
|
|
28
|
+
with:
|
|
29
|
+
name: pyproject-toml
|
|
30
|
+
path: pyproject.toml
|
|
31
|
+
|
|
32
|
+
publish:
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
needs: [set-version]
|
|
35
|
+
steps:
|
|
36
|
+
- name: Check out
|
|
37
|
+
uses: actions/checkout@v4
|
|
38
|
+
|
|
39
|
+
- name: Set up the environment
|
|
40
|
+
uses: ./.github/actions/setup-python-env
|
|
41
|
+
|
|
42
|
+
- name: Download updated pyproject.toml
|
|
43
|
+
uses: actions/download-artifact@v4
|
|
44
|
+
with:
|
|
45
|
+
name: pyproject-toml
|
|
46
|
+
|
|
47
|
+
- name: Build package
|
|
48
|
+
run: uv build
|
|
49
|
+
|
|
50
|
+
- name: Publish package
|
|
51
|
+
run: uv publish
|
|
52
|
+
env:
|
|
53
|
+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
54
|
+
|
|
55
|
+
deploy-docs:
|
|
56
|
+
needs: publish
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
steps:
|
|
59
|
+
- name: Check out
|
|
60
|
+
uses: actions/checkout@v4
|
|
61
|
+
|
|
62
|
+
- name: Set up the environment
|
|
63
|
+
uses: ./.github/actions/setup-python-env
|
|
64
|
+
|
|
65
|
+
- name: Deploy documentation
|
|
66
|
+
run: uv run mkdocs gh-deploy --force
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: validate-codecov-config
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths: [codecov.yaml]
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
validate-codecov-config:
|
|
11
|
+
runs-on: ubuntu-22.04
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- name: Validate codecov configuration
|
|
15
|
+
run: curl -sSL --fail-with-body --data-binary @codecov.yaml https://codecov.io/validate
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
docs/source
|
|
2
|
+
|
|
3
|
+
# From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
|
|
4
|
+
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
*.py,cover
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
90
|
+
__pypackages__/
|
|
91
|
+
|
|
92
|
+
# Celery stuff
|
|
93
|
+
celerybeat-schedule
|
|
94
|
+
celerybeat.pid
|
|
95
|
+
|
|
96
|
+
# SageMath parsed files
|
|
97
|
+
*.sage.py
|
|
98
|
+
|
|
99
|
+
# Environments
|
|
100
|
+
.env
|
|
101
|
+
.venv
|
|
102
|
+
env/
|
|
103
|
+
venv/
|
|
104
|
+
ENV/
|
|
105
|
+
env.bak/
|
|
106
|
+
venv.bak/
|
|
107
|
+
|
|
108
|
+
# Spyder project settings
|
|
109
|
+
.spyderproject
|
|
110
|
+
.spyproject
|
|
111
|
+
|
|
112
|
+
# Rope project settings
|
|
113
|
+
.ropeproject
|
|
114
|
+
|
|
115
|
+
# mkdocs documentation
|
|
116
|
+
/site
|
|
117
|
+
|
|
118
|
+
# mypy
|
|
119
|
+
.mypy_cache/
|
|
120
|
+
.dmypy.json
|
|
121
|
+
dmypy.json
|
|
122
|
+
|
|
123
|
+
# Pyre type checker
|
|
124
|
+
.pyre/
|
|
125
|
+
|
|
126
|
+
# pytype static type analyzer
|
|
127
|
+
.pytype/
|
|
128
|
+
|
|
129
|
+
# Cython debug symbols
|
|
130
|
+
cython_debug/
|
|
131
|
+
|
|
132
|
+
# Vscode config files
|
|
133
|
+
# .vscode/
|
|
134
|
+
|
|
135
|
+
# PyCharm
|
|
136
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
137
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
138
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
139
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
140
|
+
#.idea/
|
|
141
|
+
|
|
142
|
+
notebooks/cache/
|
|
143
|
+
epinterface/data/cache/
|
|
144
|
+
epinterface/data/cs-materials/
|
|
145
|
+
epinterface/data/Everett_templates_CS_export/
|
|
146
|
+
epinterface/data/Everett_templates_CS_export.zip
|
|
147
|
+
|
|
148
|
+
epinterface/data/20241007 Templates Update/
|
|
149
|
+
notebooks/test.idf
|
|
150
|
+
|
|
151
|
+
epinterface/sbem/prisma/**/*.db
|
|
152
|
+
**/*.db.bak
|
|
153
|
+
epinterface/sbem/prisma/**/*.db-journal
|
|
154
|
+
prisma_minimal/
|
|
155
|
+
|
|
156
|
+
.DS_Store
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: "v5.0.0"
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-case-conflict
|
|
6
|
+
- id: check-merge-conflict
|
|
7
|
+
- id: check-toml
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
# - id: check-json
|
|
10
|
+
# exclude: ^.devcontainer/devcontainer.json
|
|
11
|
+
# - id: pretty-format-json
|
|
12
|
+
# exclude: ^.devcontainer/devcontainer.json
|
|
13
|
+
# args: [--autofix, --no-sort-keys]
|
|
14
|
+
- id: end-of-file-fixer
|
|
15
|
+
- id: trailing-whitespace
|
|
16
|
+
|
|
17
|
+
- repo: https://github.com/RobertCraigie/pyright-python
|
|
18
|
+
rev: v1.1.382
|
|
19
|
+
hooks:
|
|
20
|
+
- id: pyright
|
|
21
|
+
|
|
22
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
23
|
+
rev: "v0.11.5"
|
|
24
|
+
hooks:
|
|
25
|
+
- id: ruff
|
|
26
|
+
args: [--exit-non-zero-on-fix, --show-fixes]
|
|
27
|
+
- id: ruff-format
|
|
28
|
+
|
|
29
|
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
30
|
+
rev: "v3.0.3"
|
|
31
|
+
hooks:
|
|
32
|
+
- id: prettier
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
docs/cli.md
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"python.analysis.typeCheckingMode": "standard",
|
|
3
|
+
"[python]": {
|
|
4
|
+
"editor.formatOnSave": true,
|
|
5
|
+
"editor.defaultFormatter": "charliermarsh.ruff",
|
|
6
|
+
"editor.codeActionsOnSave": {
|
|
7
|
+
"source.organizeImports": "explicit",
|
|
8
|
+
"source.fixAll": "explicit"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"notebook.formatOnSave.enabled": true,
|
|
12
|
+
"notebook.codeActionsOnSave": {
|
|
13
|
+
"notebook.source.fixAll": "explicit",
|
|
14
|
+
"notebook.source.organizeImports": "explicit"
|
|
15
|
+
},
|
|
16
|
+
"ruff.lineLength": 88,
|
|
17
|
+
"python.analysis.autoImportCompletions": true,
|
|
18
|
+
"editor.rulers": [88]
|
|
19
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Contributing to `epinterface`
|
|
2
|
+
|
|
3
|
+
Contributions are welcome, and they are greatly appreciated!
|
|
4
|
+
Every little bit helps, and credit will always be given.
|
|
5
|
+
|
|
6
|
+
You can contribute in many ways:
|
|
7
|
+
|
|
8
|
+
# Types of Contributions
|
|
9
|
+
|
|
10
|
+
## Report Bugs
|
|
11
|
+
|
|
12
|
+
Report bugs at https://github.com/szvsw/epinterface/issues
|
|
13
|
+
|
|
14
|
+
If you are reporting a bug, please include:
|
|
15
|
+
|
|
16
|
+
- Your operating system name and version.
|
|
17
|
+
- Any details about your local setup that might be helpful in troubleshooting.
|
|
18
|
+
- Detailed steps to reproduce the bug.
|
|
19
|
+
|
|
20
|
+
## Fix Bugs
|
|
21
|
+
|
|
22
|
+
Look through the GitHub issues for bugs.
|
|
23
|
+
Anything tagged with "bug" and "help wanted" is open to whoever wants to implement a fix for it.
|
|
24
|
+
|
|
25
|
+
## Implement Features
|
|
26
|
+
|
|
27
|
+
Look through the GitHub issues for features.
|
|
28
|
+
Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
|
|
29
|
+
|
|
30
|
+
## Write Documentation
|
|
31
|
+
|
|
32
|
+
Cookiecutter PyPackage could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
|
|
33
|
+
|
|
34
|
+
## Submit Feedback
|
|
35
|
+
|
|
36
|
+
The best way to send feedback is to file an issue at https://github.com/szvsw/epinterface/issues.
|
|
37
|
+
|
|
38
|
+
If you are proposing a new feature:
|
|
39
|
+
|
|
40
|
+
- Explain in detail how it would work.
|
|
41
|
+
- Keep the scope as narrow as possible, to make it easier to implement.
|
|
42
|
+
- Remember that this is a volunteer-driven project, and that contributions
|
|
43
|
+
are welcome :)
|
|
44
|
+
|
|
45
|
+
# Get Started!
|
|
46
|
+
|
|
47
|
+
Ready to contribute? Here's how to set up `epinterface` for local development.
|
|
48
|
+
Please note this documentation assumes you already have `uv` and `Git` installed and ready to go.
|
|
49
|
+
|
|
50
|
+
1. Fork the `epinterface` repo on GitHub.
|
|
51
|
+
|
|
52
|
+
2. Clone your fork locally:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
cd <directory_in_which_repo_should_be_created>
|
|
56
|
+
git clone git@github.com:YOUR_NAME/epinterface.git
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
3. Now we need to install the environment. Navigate into the directory
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
cd epinterface
|
|
63
|
+
make install
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
4. Create a branch for local development:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
git checkout -b name-of-your-bugfix-or-feature
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Now you can make your changes locally.
|
|
73
|
+
|
|
74
|
+
5. Don't forget to add test cases for your added functionality to the `tests` directory.
|
|
75
|
+
|
|
76
|
+
6. When you're done making changes, check that your changes pass the formatting tests.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
make check
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Now, validate that all unit tests are passing:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
make test
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
7. Before raising a pull request you should also run tox.
|
|
89
|
+
This will run the tests across different versions of Python:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
tox
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
This requires you to have multiple versions of python installed.
|
|
96
|
+
This step is also triggered in the CI/CD pipeline, so you could also choose to skip this step locally.
|
|
97
|
+
|
|
98
|
+
8. Commit your changes and push your branch to GitHub:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
git add .
|
|
102
|
+
git commit -m "Your detailed description of your changes."
|
|
103
|
+
git push origin name-of-your-bugfix-or-feature
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
9. Submit a pull request through the GitHub website.
|
|
107
|
+
|
|
108
|
+
# Pull Request Guidelines
|
|
109
|
+
|
|
110
|
+
Before you submit a pull request, check that it meets these guidelines:
|
|
111
|
+
|
|
112
|
+
1. The pull request should include tests.
|
|
113
|
+
|
|
114
|
+
2. If the pull request adds functionality, the docs should be updated.
|
|
115
|
+
Put your new functionality into a function with a docstring, and add the feature to the list in `README.md`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Sam Wolk
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
.PHONY: install
|
|
2
|
+
install: ## Install the virtual environment and install the pre-commit hooks
|
|
3
|
+
@echo "🚀 Creating virtual environment using uv"
|
|
4
|
+
@uv sync --all-extras --all-groups
|
|
5
|
+
@uv run pre-commit install
|
|
6
|
+
@make prisma-generate
|
|
7
|
+
|
|
8
|
+
.PHONY: clean-env
|
|
9
|
+
clean-env: ## Clean the uv environment
|
|
10
|
+
@echo "🚀 Removing .venv directory created by uv (if exists)"
|
|
11
|
+
@rm -rf .venv
|
|
12
|
+
|
|
13
|
+
.PHONY: check
|
|
14
|
+
check: ## Run code quality tools.
|
|
15
|
+
@echo "🚀 Checking lock file consistency with 'pyproject.toml'"
|
|
16
|
+
@uv lock --locked
|
|
17
|
+
@echo "🚀 Linting code: Running pre-commit"
|
|
18
|
+
@uv run pre-commit run -a
|
|
19
|
+
@echo "🚀 Static type checking: Running pyright"
|
|
20
|
+
@uv run pyright
|
|
21
|
+
|
|
22
|
+
.PHONY: test
|
|
23
|
+
test: ## Test the code with pytest
|
|
24
|
+
@echo "🚀 Testing code: Running pytest"
|
|
25
|
+
@uv run pytest --cov --cov-config=pyproject.toml --cov-report=xml
|
|
26
|
+
|
|
27
|
+
.PHONY: build
|
|
28
|
+
build: clean-build ## Build wheel file
|
|
29
|
+
@echo "🚀 Creating wheel file"
|
|
30
|
+
@uvx --from build pyproject-build --installer uv
|
|
31
|
+
|
|
32
|
+
.PHONY: clean-build
|
|
33
|
+
clean-build: ## Clean build artifacts
|
|
34
|
+
@echo "🚀 Removing build artifacts"
|
|
35
|
+
@uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"
|
|
36
|
+
|
|
37
|
+
.PHONY: publish
|
|
38
|
+
publish: ## Publish a release to PyPI.
|
|
39
|
+
@echo "🚀 Publishing."
|
|
40
|
+
@uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
|
|
41
|
+
|
|
42
|
+
.PHONY: build-and-publish
|
|
43
|
+
build-and-publish: build publish ## Build and publish.
|
|
44
|
+
|
|
45
|
+
.PHONY: docs-test
|
|
46
|
+
docs-test: ## Test if documentation can be built without warnings or errors
|
|
47
|
+
@uv run mkdocs build -s
|
|
48
|
+
|
|
49
|
+
.PHONY: docs
|
|
50
|
+
docs: ## Build and serve the documentation
|
|
51
|
+
@uv run mkdocs serve
|
|
52
|
+
|
|
53
|
+
.PHONY: docs-deploy
|
|
54
|
+
docs-deploy: ## Build and serve the documentation
|
|
55
|
+
@uv run mkdocs gh-deploy
|
|
56
|
+
|
|
57
|
+
.PHONY: prisma-push
|
|
58
|
+
prisma-push: ## Push the prisma schema to the database
|
|
59
|
+
@uv run prisma db push --schema=epinterface/sbem/prisma/schema.prisma --skip-generate
|
|
60
|
+
@make prisma-generate
|
|
61
|
+
|
|
62
|
+
.PHONY: prisma-generate
|
|
63
|
+
prisma-generate: ## Generate the prisma client
|
|
64
|
+
@uv run prisma py generate --schema=epinterface/sbem/prisma/schema.prisma --partials epinterface/sbem/prisma/partial_types.py
|
|
65
|
+
|
|
66
|
+
.PHONY: prisma-migrate
|
|
67
|
+
prisma-migrate: ## Migrate the prisma database
|
|
68
|
+
@uv run prisma migrate dev --schema=epinterface/sbem/prisma/schema.prisma --skip-generate
|
|
69
|
+
@make prisma-generate
|
|
70
|
+
|
|
71
|
+
.PHONY: help
|
|
72
|
+
help:
|
|
73
|
+
@uv run python -c "import re; \
|
|
74
|
+
[[print(f'\033[36m{m[0]:<20}\033[0m {m[1]}') for m in re.findall(r'^([a-zA-Z_-]+):.*?## (.*)$$', open(makefile).read(), re.M)] for makefile in ('$(MAKEFILE_LIST)').strip().split()]"
|
|
75
|
+
|
|
76
|
+
.DEFAULT_GOAL := help
|