From 95a4f41ba1666396aaa9ec63000a916743705261 Mon Sep 17 00:00:00 2001 From: mcflugen Date: Fri, 18 Oct 2024 10:50:10 -0600 Subject: [PATCH 1/6] add file-contents-sorter hook --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 553ebb7..b85586d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,6 +46,13 @@ repos: - id: forbid-new-submodules - id: mixed-line-ending - id: trailing-whitespace + - id: file-contents-sorter + files: | + (?x)^( + .*requirements(-\w+)?.(in|txt)| + requirements/.*\.txt| + .gitignore + ) - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.8.0 From 04b527fbb4c91ac8f0036ed4667745c8305529a3 Mon Sep 17 00:00:00 2001 From: mcflugen Date: Fri, 18 Oct 2024 11:00:33 -0600 Subject: [PATCH 2/6] sort requirements files --- requirements-testing.txt | 6 +++--- requirements.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements-testing.txt b/requirements-testing.txt index fc11c86..d817a46 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -1,7 +1,7 @@ +black +bmi-tester coveralls +isort pytest pytest-cov -black -isort ruff -bmi-tester diff --git a/requirements.txt b/requirements.txt index 7105f42..2fc64c1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ +bmipy numpy -scipy pyyaml -bmipy +scipy From 7ee1c593c11a09b1b1dc5326526691f665a24cd3 Mon Sep 17 00:00:00 2001 From: mcflugen Date: Mon, 29 Jan 2024 19:05:15 -0700 Subject: [PATCH 3/6] sort and clean up the .gitignore file --- .gitignore | 55 ++++-------------------------------------------------- 1 file changed, 4 insertions(+), 51 deletions(-) diff --git a/.gitignore b/.gitignore index db4561e..3222cb5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,54 +1,7 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ +*.egg-info/ *.py[cod] - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ +.coverage +.ipynb_checkpoints/ +__pycache__/ build/ -develop-eggs/ dist/ -downloads/ -eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.cache -nosetests.xml -coverage.xml - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ From cee83ba399de85e5365106d5448ae8f07f6e3b6a Mon Sep 17 00:00:00 2001 From: mcflugen Date: Fri, 18 Oct 2024 10:54:11 -0600 Subject: [PATCH 4/6] install types-pyyaml for mpypy --- .pre-commit-config.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b85586d..d6b6fbc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -59,4 +59,6 @@ repos: hooks: - id: mypy language_version: python3.12 - files: src/.*\.py$ + files: heat/.*\.py$ + additional_dependencies: + - types-PyYAML From 2ed4577848b012c0725e05edb3f25dfb017445cc Mon Sep 17 00:00:00 2001 From: mcflugen Date: Fri, 18 Oct 2024 10:58:58 -0600 Subject: [PATCH 5/6] add name-tests-test hook --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d6b6fbc..2591f94 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,6 +46,7 @@ repos: - id: forbid-new-submodules - id: mixed-line-ending - id: trailing-whitespace + - id: name-tests-test - id: file-contents-sorter files: | (?x)^( From 27c677e63352736b50cf478858bf818b87126fec Mon Sep 17 00:00:00 2001 From: mcflugen Date: Mon, 29 Jan 2024 18:52:47 -0700 Subject: [PATCH 6/6] rename tests with _test suffix --- tests/{test_get_value.py => get_value_test.py} | 0 tests/{test_grid_info.py => grid_info_test.py} | 0 tests/{test_irf.py => irf_test.py} | 0 tests/{test_set_value.py => set_value_test.py} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename tests/{test_get_value.py => get_value_test.py} (100%) rename tests/{test_grid_info.py => grid_info_test.py} (100%) rename tests/{test_irf.py => irf_test.py} (100%) rename tests/{test_set_value.py => set_value_test.py} (100%) diff --git a/tests/test_get_value.py b/tests/get_value_test.py similarity index 100% rename from tests/test_get_value.py rename to tests/get_value_test.py diff --git a/tests/test_grid_info.py b/tests/grid_info_test.py similarity index 100% rename from tests/test_grid_info.py rename to tests/grid_info_test.py diff --git a/tests/test_irf.py b/tests/irf_test.py similarity index 100% rename from tests/test_irf.py rename to tests/irf_test.py diff --git a/tests/test_set_value.py b/tests/set_value_test.py similarity index 100% rename from tests/test_set_value.py rename to tests/set_value_test.py