From f2d8e8d31d67139680dfd30b9030832ed4062afd Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Wed, 18 Mar 2026 13:19:18 -0500 Subject: [PATCH] refactor: rename _dotenvpath.py and test_dotenvpath.py; remove dotenvpath from cspell dictionary --- .config/cspell/project-software-terms.txt | 1 - .../nidaqmx/{_dotenvpath.py => _dotenv_path.py} | 0 generated/nidaqmx/_feature_toggles.py | 2 +- src/handwritten/{_dotenvpath.py => _dotenv_path.py} | 0 src/handwritten/_feature_toggles.py | 2 +- .../unit/{test_dotenvpath.py => test_dotenv_path.py} | 12 ++++++------ 6 files changed, 8 insertions(+), 9 deletions(-) rename generated/nidaqmx/{_dotenvpath.py => _dotenv_path.py} (100%) rename src/handwritten/{_dotenvpath.py => _dotenv_path.py} (100%) rename tests/unit/{test_dotenvpath.py => test_dotenv_path.py} (66%) diff --git a/.config/cspell/project-software-terms.txt b/.config/cspell/project-software-terms.txt index be59a74b4..489872e3a 100644 --- a/.config/cspell/project-software-terms.txt +++ b/.config/cspell/project-software-terms.txt @@ -15,7 +15,6 @@ ctypeslib # Standard library: ctypes CVICALLBACK # NI CVI calling convention macro (C interop comment) docstrings # Python terminology dotenv # Dependency: python-decouple / dotenv -dotenvpath # Typo - TODO - rename the files and make related changes dpkg # Linux system tool names (external) dtype # Dependency: numpy fixturenames # Dependency: pytest diff --git a/generated/nidaqmx/_dotenvpath.py b/generated/nidaqmx/_dotenv_path.py similarity index 100% rename from generated/nidaqmx/_dotenvpath.py rename to generated/nidaqmx/_dotenv_path.py diff --git a/generated/nidaqmx/_feature_toggles.py b/generated/nidaqmx/_feature_toggles.py index db5e583cf..a979188c7 100644 --- a/generated/nidaqmx/_feature_toggles.py +++ b/generated/nidaqmx/_feature_toggles.py @@ -10,7 +10,7 @@ from decouple import AutoConfig, Undefined, undefined -from nidaqmx._dotenvpath import get_dotenv_search_path +from nidaqmx._dotenv_path import get_dotenv_search_path from nidaqmx.errors import FeatureNotSupportedError if TYPE_CHECKING: diff --git a/src/handwritten/_dotenvpath.py b/src/handwritten/_dotenv_path.py similarity index 100% rename from src/handwritten/_dotenvpath.py rename to src/handwritten/_dotenv_path.py diff --git a/src/handwritten/_feature_toggles.py b/src/handwritten/_feature_toggles.py index db5e583cf..a979188c7 100644 --- a/src/handwritten/_feature_toggles.py +++ b/src/handwritten/_feature_toggles.py @@ -10,7 +10,7 @@ from decouple import AutoConfig, Undefined, undefined -from nidaqmx._dotenvpath import get_dotenv_search_path +from nidaqmx._dotenv_path import get_dotenv_search_path from nidaqmx.errors import FeatureNotSupportedError if TYPE_CHECKING: diff --git a/tests/unit/test_dotenvpath.py b/tests/unit/test_dotenv_path.py similarity index 66% rename from tests/unit/test_dotenvpath.py rename to tests/unit/test_dotenv_path.py index 3856523b3..588558117 100644 --- a/tests/unit/test_dotenvpath.py +++ b/tests/unit/test_dotenv_path.py @@ -2,7 +2,7 @@ import pytest -from nidaqmx import _dotenvpath +from nidaqmx import _dotenv_path @pytest.mark.parametrize("dotenv_exists", [False, True]) @@ -15,20 +15,20 @@ def test___dotenv_exists_varies___has_dotenv_file___matches_dotenv_exists( for dir in subdirs: dir.mkdir() - assert _dotenvpath._has_dotenv_file(tmp_path) == dotenv_exists - assert all([_dotenvpath._has_dotenv_file(p) == dotenv_exists for p in subdirs]) + assert _dotenv_path._has_dotenv_file(tmp_path) == dotenv_exists + assert all([_dotenv_path._has_dotenv_file(p) == dotenv_exists for p in subdirs]) def test___get_caller_path___returns_this_modules_path() -> None: - assert _dotenvpath._get_caller_path() == Path(__file__) + assert _dotenv_path._get_caller_path() == Path(__file__) def test___get_package_path___returns_package_dir() -> None: - assert _dotenvpath._get_package_path() == Path(_dotenvpath.__file__).parent + assert _dotenv_path._get_package_path() == Path(_dotenv_path.__file__).parent def test___get_script_or_exe_path___returns_pytest_path() -> None: - path = _dotenvpath._get_script_or_exe_path() + path = _dotenv_path._get_script_or_exe_path() assert path is not None assert "pytest" in path.parts or "pytest.exe" in path.parts or "vscode_pytest" in path.parts