diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f93bd0..c97ae9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,11 +61,12 @@ jobs: - name: Config poetry for PyPi run: | - poetry config pypi-token.pypi ${{ secrets.PYPI_token }} + poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} - name: Publish env: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} run: | export PATH="$HOME/.local/bin:$PATH" - poetry publish --no-interaction --username __token__ --password ${{ secrets.PYPI_token }} + echo "export PYPI_TOKEN=${{ secrets.PYPI_TOKEN }}" >> $GITHUB_ENV + poetry run make publish diff --git a/Makefile b/Makefile index 1c106dd..9197841 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ build: .PHONY: publish publish: @echo "Publishing package" - @export PYPI_TOKEN=${{ secrets.PYPI_TOKEN }} && poetry publish --no-interaction --username __token__ --password $$PYPI_TOKEN + @epoetry publish --no-interaction --username __token__ --password ${PYPI_TOKEN} # Define a help target to show usage .PHONY: help help: diff --git a/README.md b/README.md index 583492f..98a96ff 100644 --- a/README.md +++ b/README.md @@ -4,21 +4,15 @@ A simple tool to suggest commit messages. ![Porunga Usage](./assets/porunga-use-ezgif.com-speed.gif) - ## Prerequisites -This tool requires OPENAI API Key to work. Please see [this](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key) - - - - +- Make sure you are using Python version >3.11 +- This tool requires OPENAI API Key to work. Please see [this](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key) ## Installation `pip install porunga` - - ## Usage - To see a list of commands availabe to use: @@ -51,7 +45,7 @@ You can set the following env variables that this tool uses: - `PORUNGA_MODEL_NAME` : Open AI Model to use - `PORUNGA_MODE` : Either `cost` or `precise`. It is **recommended** to precise for the best results -> This CLI tool uses gpt-4o by default, which is recommended. +> This CLI tool uses gpt-4o by default, which is recommended. - To get suggestions @@ -59,8 +53,8 @@ You can set the following env variables that this tool uses: porunga suggest FILEPATH -n 2 ``` -This generates 2 suggestions for the particular uncommitted changes. - +This generates 2 suggestions for the particular uncommitted changes. ## Warning -The results generated by this tool can be unpredictable and may produce inconsistent results. Users are advised to review and verify the suggestions before using them. \ No newline at end of file + +The results generated by this tool can be unpredictable and may produce inconsistent results. Users are advised to review and verify the suggestions before using them. diff --git a/pyproject.toml b/pyproject.toml index a79f2d7..a2a1c65 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,3 +24,8 @@ porunga = "porunga_cli.cli:cli" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" + +[[tool.poetry.source]] +name = "pypi" +url = "https://upload.pypi.org/legacy/" +default = true \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..eec5adf --- /dev/null +++ b/requirements.txt @@ -0,0 +1,71 @@ +aiohttp==3.9.5 ; python_version >= "3.11" and python_version < "4.0" +aiosignal==1.3.1 ; python_version >= "3.11" and python_version < "4.0" +annotated-types==0.7.0 ; python_version >= "3.11" and python_version < "4.0" +anyio==4.4.0 ; python_version >= "3.11" and python_version < "4.0" +attrs==23.2.0 ; python_version >= "3.11" and python_version < "4.0" +backports-tarfile==1.2.0 ; python_version >= "3.11" and python_version < "3.12" +certifi==2024.7.4 ; python_version >= "3.11" and python_version < "4.0" +cffi==1.16.0 ; python_version >= "3.11" and python_version < "4.0" and sys_platform == "linux" and platform_python_implementation != "PyPy" +charset-normalizer==3.3.2 ; python_version >= "3.11" and python_version < "4.0" +click==8.1.7 ; python_version >= "3.11" and python_version < "4.0" +colorama==0.4.6 ; python_version >= "3.11" and python_version < "4.0" and platform_system == "Windows" +cryptography==42.0.8 ; python_version >= "3.11" and python_version < "4.0" and sys_platform == "linux" +dataclasses-json==0.6.7 ; python_version >= "3.11" and python_version < "4.0" +defusedxml==0.7.1 ; python_version >= "3.11" and python_version < "4.0" +distro==1.9.0 ; python_version >= "3.11" and python_version < "4.0" +flake8==7.1.0 ; python_version >= "3.11" and python_version < "4.0" +frozenlist==1.4.1 ; python_version >= "3.11" and python_version < "4.0" +greenlet==3.0.3 ; python_version < "3.13" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and python_version >= "3.11" +h11==0.14.0 ; python_version >= "3.11" and python_version < "4.0" +httpcore==1.0.5 ; python_version >= "3.11" and python_version < "4.0" +httpx==0.27.0 ; python_version >= "3.11" and python_version < "4.0" +idna==3.7 ; python_version >= "3.11" and python_version < "4.0" +importlib-metadata==8.0.0 ; python_version >= "3.11" and python_version < "3.12" +inquirerpy==0.3.4 ; python_version >= "3.11" and python_version < "4.0" +jaraco-classes==3.4.0 ; python_version >= "3.11" and python_version < "4.0" +jaraco-context==5.3.0 ; python_version >= "3.11" and python_version < "4.0" +jaraco-functools==4.0.1 ; python_version >= "3.11" and python_version < "4.0" +jeepney==0.8.0 ; python_version >= "3.11" and python_version < "4.0" and sys_platform == "linux" +jsonpatch==1.33 ; python_version >= "3.11" and python_version < "4.0" +jsonpointer==3.0.0 ; python_version >= "3.11" and python_version < "4.0" +keyring==25.2.1 ; python_version >= "3.11" and python_version < "4.0" +keyrings-alt==5.0.1 ; python_version >= "3.11" and python_version < "4.0" +langchain-community==0.0.38 ; python_version >= "3.11" and python_version < "4.0" +langchain-core==0.1.52 ; python_version >= "3.11" and python_version < "4.0" +langchain-openai==0.1.7 ; python_version >= "3.11" and python_version < "4.0" +langchain-text-splitters==0.0.2 ; python_version >= "3.11" and python_version < "4.0" +langchain==0.1.20 ; python_version >= "3.11" and python_version < "4.0" +langsmith==0.1.84 ; python_version >= "3.11" and python_version < "4.0" +marshmallow==3.21.3 ; python_version >= "3.11" and python_version < "4.0" +mccabe==0.7.0 ; python_version >= "3.11" and python_version < "4.0" +more-itertools==10.3.0 ; python_version >= "3.11" and python_version < "4.0" +multidict==6.0.5 ; python_version >= "3.11" and python_version < "4.0" +mypy-extensions==1.0.0 ; python_version >= "3.11" and python_version < "4.0" +numpy==1.26.4 ; python_version >= "3.11" and python_version < "4.0" +openai==1.35.10 ; python_version >= "3.11" and python_version < "4.0" +orjson==3.10.6 ; python_version >= "3.11" and python_version < "4.0" +packaging==23.2 ; python_version >= "3.11" and python_version < "4.0" +pfzy==0.3.4 ; python_version >= "3.11" and python_version < "4.0" +prompt-toolkit==3.0.47 ; python_version >= "3.11" and python_version < "4.0" +pycodestyle==2.12.0 ; python_version >= "3.11" and python_version < "4.0" +pycparser==2.22 ; python_version >= "3.11" and python_version < "4.0" and sys_platform == "linux" and platform_python_implementation != "PyPy" +pydantic-core==2.20.1 ; python_version >= "3.11" and python_version < "4.0" +pydantic==2.8.2 ; python_version >= "3.11" and python_version < "4.0" +pyflakes==3.2.0 ; python_version >= "3.11" and python_version < "4.0" +python-dotenv==1.0.1 ; python_version >= "3.11" and python_version < "4.0" +pywin32-ctypes==0.2.2 ; python_version >= "3.11" and python_version < "4.0" and sys_platform == "win32" +pyyaml==6.0.1 ; python_version >= "3.11" and python_version < "4.0" +regex==2024.5.15 ; python_version >= "3.11" and python_version < "4.0" +requests==2.32.3 ; python_version >= "3.11" and python_version < "4.0" +secretstorage==3.3.3 ; python_version >= "3.11" and python_version < "4.0" and sys_platform == "linux" +sniffio==1.3.1 ; python_version >= "3.11" and python_version < "4.0" +sqlalchemy==2.0.31 ; python_version >= "3.11" and python_version < "4.0" +tenacity==8.5.0 ; python_version >= "3.11" and python_version < "4.0" +tiktoken==0.7.0 ; python_version >= "3.11" and python_version < "4.0" +tqdm==4.66.4 ; python_version >= "3.11" and python_version < "4.0" +typing-extensions==4.12.2 ; python_version >= "3.11" and python_version < "4.0" +typing-inspect==0.9.0 ; python_version >= "3.11" and python_version < "4.0" +urllib3==2.2.2 ; python_version >= "3.11" and python_version < "4.0" +wcwidth==0.2.13 ; python_version >= "3.11" and python_version < "4.0" +yarl==1.9.4 ; python_version >= "3.11" and python_version < "4.0" +zipp==3.19.2 ; python_version >= "3.11" and python_version < "3.12"