From 6fd020a6c2c674c78278a755a0ce8c036bbc92d5 Mon Sep 17 00:00:00 2001 From: "devloai[bot]" <168258904+devloai[bot]@users.noreply.github.com> Date: Sun, 22 Dec 2024 06:38:26 +0000 Subject: [PATCH] docs: update tests/README-DEV.md with developer usage details - Add local testing instructions - Add instructions for running built poetry executable - Update dependencies in pyproject.toml - Update poetry.lock file --- poetry.lock | 48 +++++++++++++++++++++++++++++++++++++++++---- pyproject.toml | 16 +++++++++++---- tests/README-DEV.md | 39 +++++++++++++++++++++++++++++++++++- 3 files changed, 94 insertions(+), 9 deletions(-) diff --git a/poetry.lock b/poetry.lock index 3bcd8d6..fe81661 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,7 +1,47 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. -package = [] +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. + +[[package]] +name = "chardet" +version = "5.0.0" +description = "Universal encoding detector for Python 3" +optional = false +python-versions = ">=3.6" +files = [ + {file = "chardet-5.0.0-py3-none-any.whl", hash = "sha256:d3e64f022d254183001eccc5db4040520c0f23b1a3f33d6413e099eb7f126557"}, + {file = "chardet-5.0.0.tar.gz", hash = "sha256:0368df2bfd78b5fc20572bb4e9bb7fb53e2c094f60ae9993339e8671d0afb8aa"}, +] + +[[package]] +name = "psutil" +version = "6.1.1" +description = "Cross-platform lib for process and system monitoring in Python." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" +files = [ + {file = "psutil-6.1.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:9ccc4316f24409159897799b83004cb1e24f9819b0dcf9c0b68bdcb6cefee6a8"}, + {file = "psutil-6.1.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:ca9609c77ea3b8481ab005da74ed894035936223422dc591d6772b147421f777"}, + {file = "psutil-6.1.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:8df0178ba8a9e5bc84fed9cfa61d54601b371fbec5c8eebad27575f1e105c0d4"}, + {file = "psutil-6.1.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:1924e659d6c19c647e763e78670a05dbb7feaf44a0e9c94bf9e14dfc6ba50468"}, + {file = "psutil-6.1.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:018aeae2af92d943fdf1da6b58665124897cfc94faa2ca92098838f83e1b1bca"}, + {file = "psutil-6.1.1-cp27-none-win32.whl", hash = "sha256:6d4281f5bbca041e2292be3380ec56a9413b790579b8e593b1784499d0005dac"}, + {file = "psutil-6.1.1-cp27-none-win_amd64.whl", hash = "sha256:c777eb75bb33c47377c9af68f30e9f11bc78e0f07fbf907be4a5d70b2fe5f030"}, + {file = "psutil-6.1.1-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:fc0ed7fe2231a444fc219b9c42d0376e0a9a1a72f16c5cfa0f68d19f1a0663e8"}, + {file = "psutil-6.1.1-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:0bdd4eab935276290ad3cb718e9809412895ca6b5b334f5a9111ee6d9aff9377"}, + {file = "psutil-6.1.1-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b6e06c20c05fe95a3d7302d74e7097756d4ba1247975ad6905441ae1b5b66003"}, + {file = "psutil-6.1.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97f7cb9921fbec4904f522d972f0c0e1f4fabbdd4e0287813b21215074a0f160"}, + {file = "psutil-6.1.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33431e84fee02bc84ea36d9e2c4a6d395d479c9dd9bba2376c1f6ee8f3a4e0b3"}, + {file = "psutil-6.1.1-cp36-cp36m-win32.whl", hash = "sha256:384636b1a64b47814437d1173be1427a7c83681b17a450bfc309a1953e329603"}, + {file = "psutil-6.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:8be07491f6ebe1a693f17d4f11e69d0dc1811fa082736500f649f79df7735303"}, + {file = "psutil-6.1.1-cp37-abi3-win32.whl", hash = "sha256:eaa912e0b11848c4d9279a93d7e2783df352b082f40111e078388701fd479e53"}, + {file = "psutil-6.1.1-cp37-abi3-win_amd64.whl", hash = "sha256:f35cfccb065fff93529d2afb4a2e89e363fe63ca1e4a5da22b603a85833c2649"}, + {file = "psutil-6.1.1.tar.gz", hash = "sha256:cf8496728c18f2d0b45198f06895be52f36611711746b7f30c464b422b50e2f5"}, +] + +[package.extras] +dev = ["abi3audit", "black", "check-manifest", "coverage", "packaging", "pylint", "pyperf", "pypinfo", "pytest-cov", "requests", "rstcheck", "ruff", "sphinx", "sphinx_rtd_theme", "toml-sort", "twine", "virtualenv", "vulture", "wheel"] +test = ["pytest", "pytest-xdist", "setuptools"] [metadata] lock-version = "2.0" -python-versions = "*" -content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8" +python-versions = ">=3.6" +content-hash = "357d58f0d4ec9a606fc3e1058ded6a7ae1de53acfa959dd1ec5c835bbb1a427e" diff --git a/pyproject.toml b/pyproject.toml index b2ca9c9..90be330 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,9 @@ version="0.6.7" authors=[{name="Ariel Frischer", email="arielfrischer@gmail.com"}] description="Generate bash/zsh/fish shell aliases automatically." requires-python=">=3.6" +dependencies = [ + "psutil>=5.9.0" +] readme = "README.md" classifiers=[ "Programming Language :: Python :: 3", @@ -37,12 +40,12 @@ description = "Generate bash/zsh/fish shell aliases automatically." authors=["Ariel Frischer "] maintainers=["Ariel Frischer "] readme = "README.md" -classifiers=[ +classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", + "Operating System :: OS Independent" ] -keywords=[ +keywords = [ "alias", "bash", "zsh", @@ -54,9 +57,14 @@ keywords=[ "completion", "abbr", "generate", - "terminal", + "terminal" ] +[tool.poetry.dependencies] +python = ">=3.6" +psutil = ">=5.9.0" +chardet = ">=4.0.0" + [tool.poetry.scripts] aliaser = "alias_gen.aliaser:main" diff --git a/tests/README-DEV.md b/tests/README-DEV.md index 532852d..dd01bfe 100644 --- a/tests/README-DEV.md +++ b/tests/README-DEV.md @@ -31,9 +31,46 @@ twine upload -r testpypi dist/* twine upload dist/* ``` -## Test +## Testing Locally + +### Running Tests ```bash +# Install development dependencies first +poetry install + +# Run all tests pytest . + +# Run specific test file +pytest tests/test_aliaser.py + +# Run tests with verbose output +pytest -v . + +# Run tests with coverage report +pytest --cov=alias_gen tests/ +``` + +### Running the Built Package Locally +After building the package with `poetry build`, you can: + +1. Install and run from the wheel file: +```bash +# Install the wheel file +pip install dist/*.whl + +# Run the installed executable +aliaser --help +``` + +2. Or run directly through poetry: +```bash +# Run the package through poetry +poetry run aliaser --help + +# Or activate the poetry shell first +poetry shell +aliaser --help # Run commands in the poetry environment ``` ## Bump version custom script usage