From 36578843c77b54ac4bd56a7a8114695418492c68 Mon Sep 17 00:00:00 2001 From: hkj Date: Sat, 11 May 2024 14:23:12 +0800 Subject: [PATCH] chore: adjust project config. - fix entry point problem. - adjust github workflows config. --- .github/workflows/testing.yml | 3 ++- .gitignore | 6 +++--- pigit/{console.py => console_scripts.py} | 2 +- setup.py | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) rename pigit/{console.py => console_scripts.py} (91%) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 1d48688..cc0c3b9 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -16,6 +16,7 @@ on: - '**.png' - '**.gif' - 'tools/*' + - 'useless/*' - 'docs/*' - 'const.py' - '.gitignore' @@ -24,7 +25,7 @@ jobs: build: strategy: matrix: - python-version: [3.8, 3.9, "3.10"] + python-version: [3.8, "3.10", "3.12"] os: [ubuntu-latest, macos-latest] #, windows-latest] runs-on: ${{ matrix.os }} diff --git a/.gitignore b/.gitignore index a37a68e..c153330 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,9 @@ log *.tmp +# log file +*.log + # pytest .pytest_cache .coverage* @@ -27,9 +30,6 @@ htmlcov/ # useless file temp useless/ -# log file -debug.log - # other tests/test_repo tests/ignore_test diff --git a/pigit/console.py b/pigit/console_scripts.py similarity index 91% rename from pigit/console.py rename to pigit/console_scripts.py index 9845000..7372647 100644 --- a/pigit/console.py +++ b/pigit/console_scripts.py @@ -6,7 +6,7 @@ @time_it -def _active(prefixes:Optional[List]): +def _active(prefixes:Optional[List] = None): try: _args = (prefixes or []) + sys.argv[1:] pigit(_args) diff --git a/setup.py b/setup.py index 5f6be7e..1725f5d 100644 --- a/setup.py +++ b/setup.py @@ -67,8 +67,8 @@ install_requires=['plenty==1.0.2'], entry_points={ "console_scripts": [ - "pigit=pigit.console:main", - "g=pigit.console:g", + "pigit=pigit.console_scripts:main", + "g=pigit.console_scripts:g", ] }, python_requires=">=3.8",