diff --git a/.gitignore b/.gitignore index f8b73e7..29dba5a 100644 --- a/.gitignore +++ b/.gitignore @@ -137,4 +137,3 @@ dmypy.json # Cython debug symbols cython_debug/ - diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..f63adbf --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,29 @@ +default_stages: [commit, push] +repos: + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.9.0.2 + hooks: + - id: shellcheck + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black + - repo: https://github.com/charliermarsh/ruff-pre-commit + # Ruff version. + rev: "v0.0.263" + hooks: + - id: ruff + # Enable auto fix + # args: [--fix, --exit-non-zero-on-fix] + - repo: https://github.com/pycqa/isort + rev: 5.12.0 + hooks: + - id: isort + name: isort (python) diff --git a/LICENSE b/LICENSE index bd405af..6f19076 100644 --- a/LICENSE +++ b/LICENSE @@ -13,38 +13,38 @@ by the additional permissions listed below. 0. Additional Definitions. - + As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. - + "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. - + An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. - + A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". - + The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. - + The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility diff --git a/README.md b/README.md index bd52c18..4b57634 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ # chat-savant -A virtual assistant for automating a variety of tasks. \ No newline at end of file +A virtual assistant for automating a variety of tasks. + +## Features +- Drive chatGPT in webbrowser session. diff --git a/chat_savant/__init__.py b/chat_savant/__init__.py new file mode 100644 index 0000000..3dc1f76 --- /dev/null +++ b/chat_savant/__init__.py @@ -0,0 +1 @@ +__version__ = "0.1.0" diff --git a/chat_savant/cli.py b/chat_savant/cli.py new file mode 100644 index 0000000..f1ed496 --- /dev/null +++ b/chat_savant/cli.py @@ -0,0 +1,6 @@ +def main(): + print("Hey this is the cli application") + + +if __name__ == "__main__": + main() diff --git a/dev_requirements.in b/dev_requirements.in new file mode 100644 index 0000000..ce250ab --- /dev/null +++ b/dev_requirements.in @@ -0,0 +1,9 @@ +black +build +invoke +isort +pip-tools +pre-commit +pytest +shellcheck-py==0.9.0.2 +ruff diff --git a/dev_requirements.txt b/dev_requirements.txt new file mode 100644 index 0000000..601fbdf --- /dev/null +++ b/dev_requirements.txt @@ -0,0 +1,69 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile dev_requirements.in +# +black==23.3.0 + # via -r dev_requirements.in +build==0.10.0 + # via + # -r dev_requirements.in + # pip-tools +cfgv==3.3.1 + # via pre-commit +click==8.1.3 + # via + # black + # pip-tools +distlib==0.3.6 + # via virtualenv +filelock==3.12.0 + # via virtualenv +identify==2.5.23 + # via pre-commit +iniconfig==2.0.0 + # via pytest +invoke==2.1.0 + # via -r dev_requirements.in +isort==5.12.0 + # via -r dev_requirements.in +mypy-extensions==1.0.0 + # via black +nodeenv==1.7.0 + # via pre-commit +packaging==23.1 + # via + # black + # build + # pytest +pathspec==0.11.1 + # via black +pip-tools==6.13.0 + # via -r dev_requirements.in +platformdirs==3.5.0 + # via + # black + # virtualenv +pluggy==1.0.0 + # via pytest +pre-commit==3.2.2 + # via -r dev_requirements.in +pyproject-hooks==1.0.0 + # via build +pytest==7.3.1 + # via -r dev_requirements.in +pyyaml==6.0 + # via pre-commit +ruff==0.0.263 + # via -r dev_requirements.in +shellcheck-py==0.9.0.2 + # via -r dev_requirements.in +virtualenv==20.23.0 + # via pre-commit +wheel==0.40.0 + # via pip-tools + +# The following packages are considered to be unsafe in a requirements file: +# pip +# setuptools diff --git a/pyinvoke/__init__.py b/pyinvoke/__init__.py new file mode 100644 index 0000000..4484a6f --- /dev/null +++ b/pyinvoke/__init__.py @@ -0,0 +1,5 @@ +from invoke import Collection + +from pyinvoke import dev + +namespace = Collection(dev) diff --git a/pyinvoke/dev.py b/pyinvoke/dev.py new file mode 100644 index 0000000..8487330 --- /dev/null +++ b/pyinvoke/dev.py @@ -0,0 +1,25 @@ +from invoke import task + + +@task +def update_deps(c): + """https://hynek.me/til/pip-tools-and-pyproject-toml/""" + pass + + +@task +def sync_env(c): + """Synchronize dependencies.""" + c.run("pip-sync dev_requirements.txt requirements.txt") + + +@task +def install_pre_commit(c): + """Installs pre-commit hooks into your environment.""" + c.run("pre-commit install --install-hooks") + + +@task +def build(c): + """Builds wheel and source distributions of project.""" + pass diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..bdcd7ea --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,31 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "chat_savant" +authors = [ + { name="Drew Bednar", email="drew@runcible.io" }, +] +description = "A virtual assistant for automating a variety of tasks." +readme = "README.md" +requires-python = ">=3.8" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] +dynamic = ["version", "dependencies"] + +[project.scripts] +savant-cli = "chat_savant.cli:main" + +[project.optional-dependencies] +whisper = ["openai-whisper"] + +[tool.setuptools] +packages = ["chat_savant"] + +[tool.setuptools.dynamic] +version = {attr = "chat_savant.__version__"} +dependencies = {file = ["requirements.txt"]} diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ea51277 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --output-file=requirements.txt requirements.in +# diff --git a/tasks.py b/tasks.py new file mode 100644 index 0000000..4484a6f --- /dev/null +++ b/tasks.py @@ -0,0 +1,5 @@ +from invoke import Collection + +from pyinvoke import dev + +namespace = Collection(dev) diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/test_example.py b/tests/unit/test_example.py new file mode 100644 index 0000000..813df60 --- /dev/null +++ b/tests/unit/test_example.py @@ -0,0 +1,2 @@ +def test_example(): + assert True