diff --git a/Makefile b/Makefile index d7518678..ca5646b8 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ PYTHON := python3 PYTHONPATH := `pwd` #* Docker variables -IMAGE := parea +IMAGE := parea_ai VERSION := latest #* Poetry @@ -40,14 +40,14 @@ formatting: codestyle #* Linting .PHONY: test test: - PYTHONPATH=$(PYTHONPATH) poetry run pytest -c pyproject.toml --cov-report=html --cov=parea tests/ + PYTHONPATH=$(PYTHONPATH) poetry run pytest -c pyproject.toml --cov-report=html --cov=parea_ai tests/ poetry run coverage-badge -o assets/images/coverage.svg -f .PHONY: check-codestyle check-codestyle: poetry run isort --diff --check-only --settings-path pyproject.toml ./ poetry run black --diff --check --config pyproject.toml ./ - poetry run darglint --verbosity 2 parea tests + poetry run darglint --verbosity 2 parea_ai tests .PHONY: mypy mypy: diff --git a/README.md b/README.md index a50d31ea..a088c3ca 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,13 @@ Parea python sdk ## Installation ```bash -pip install -U parea +pip install -U parea-ai ``` or install with `Poetry` ```bash -poetry add parea +poetry add parea-ai ``` ## Getting Started @@ -34,8 +34,8 @@ import os from dotenv import load_dotenv -from parea.client import Parea -from parea.schemas.models import Completion, UseDeployedPrompt, CompletionResponse, UseDeployedPromptResponse +from parea_ai.client import Parea +from parea_ai.schemas.models import Completion, UseDeployedPrompt, CompletionResponse, UseDeployedPromptResponse load_dotenv() @@ -99,7 +99,7 @@ See [LICENSE](https://github.com/parea-ai/parea-sdk/blob/master/LICENSE) for mor ```bibtex @misc{parea-sdk, - author = {parea-ai}, + author = {joel-parea-ai}, title = {Parea python sdk}, year = {2023}, publisher = {GitHub}, diff --git a/cookiecutter-config-file.yml b/cookiecutter-config-file.yml index e349a1cf..e03865c9 100644 --- a/cookiecutter-config-file.yml +++ b/cookiecutter-config-file.yml @@ -1,7 +1,7 @@ # This file contains values from Cookiecutter default_context: - project_name: "parea" + project_name: "parea-ai" project_description: "Parea python sdk" organization: "parea-ai" license: "Apache Software License 2.0" diff --git a/parea/__init__.py b/parea_ai/__init__.py similarity index 94% rename from parea/__init__.py rename to parea_ai/__init__.py index 72d4a2e2..519ccd3e 100644 --- a/parea/__init__.py +++ b/parea_ai/__init__.py @@ -11,7 +11,7 @@ from importlib import metadata as importlib_metadata -from parea.client import Parea +from parea_ai.client import Parea def get_version() -> str: diff --git a/parea/api_client.py b/parea_ai/api_client.py similarity index 100% rename from parea/api_client.py rename to parea_ai/api_client.py diff --git a/parea/client.py b/parea_ai/client.py similarity index 90% rename from parea/client.py rename to parea_ai/client.py index 2f6a8065..7299145c 100644 --- a/parea/client.py +++ b/parea_ai/client.py @@ -1,7 +1,7 @@ from attrs import asdict, define, field -from parea.api_client import HTTPClient -from parea.schemas.models import Completion, CompletionResponse, UseDeployedPrompt, UseDeployedPromptResponse +from parea_ai.api_client import HTTPClient +from parea_ai.schemas.models import Completion, CompletionResponse, UseDeployedPrompt, UseDeployedPromptResponse COMPLETION_ENDPOINT = "/completion" DEPLOYED_PROMPT_ENDPOINT = "/deployed-prompt" diff --git a/parea/example.py b/parea_ai/example.py similarity index 91% rename from parea/example.py rename to parea_ai/example.py index 23edac7b..f2ccdcc1 100644 --- a/parea/example.py +++ b/parea_ai/example.py @@ -3,8 +3,8 @@ from dotenv import load_dotenv -from parea.client import Parea -from parea.schemas.models import Completion, CompletionResponse, UseDeployedPrompt, UseDeployedPromptResponse +from parea_ai.client import Parea +from parea_ai.schemas.models import Completion, CompletionResponse, UseDeployedPrompt, UseDeployedPromptResponse load_dotenv() diff --git a/parea/schemas/models.py b/parea_ai/schemas/models.py similarity index 100% rename from parea/schemas/models.py rename to parea_ai/schemas/models.py diff --git a/poetry.lock b/poetry.lock index 08acc000..2d497679 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1176,13 +1176,13 @@ files = [ [[package]] name = "more-itertools" -version = "9.1.0" +version = "10.0.0" description = "More routines for operating on iterables, beyond itertools" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "more-itertools-9.1.0.tar.gz", hash = "sha256:cabaa341ad0389ea83c17a94566a53ae4c9d07349861ecb14dc6d0345cf9ac5d"}, - {file = "more_itertools-9.1.0-py3-none-any.whl", hash = "sha256:d2bc7f02446e86a68911e58ded76d6561eea00cddfb2a91e7019bbb586c799f3"}, + {file = "more-itertools-10.0.0.tar.gz", hash = "sha256:cd65437d7c4b615ab81c0640c0480bc29a550ea032891977681efd28344d51e1"}, + {file = "more_itertools-10.0.0-py3-none-any.whl", hash = "sha256:928d514ffd22b5b0a8fce326d57f423a55d2ff783b093bab217eda71e732330f"}, ] [[package]] @@ -2327,23 +2327,23 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.24.1" +version = "20.24.2" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.7" files = [ - {file = "virtualenv-20.24.1-py3-none-any.whl", hash = "sha256:01aacf8decd346cf9a865ae85c0cdc7f64c8caa07ff0d8b1dfc1733d10677442"}, - {file = "virtualenv-20.24.1.tar.gz", hash = "sha256:2ef6a237c31629da6442b0bcaa3999748108c7166318d1f55cc9f8d7294e97bd"}, + {file = "virtualenv-20.24.2-py3-none-any.whl", hash = "sha256:43a3052be36080548bdee0b42919c88072037d50d56c28bd3f853cbe92b953ff"}, + {file = "virtualenv-20.24.2.tar.gz", hash = "sha256:fd8a78f46f6b99a67b7ec5cf73f92357891a7b3a40fd97637c27f854aae3b9e0"}, ] [package.dependencies] -distlib = ">=0.3.6,<1" -filelock = ">=3.12,<4" -platformdirs = ">=3.5.1,<4" +distlib = ">=0.3.7,<1" +filelock = ">=3.12.2,<4" +platformdirs = ">=3.9.1,<4" [package.extras] docs = ["furo (>=2023.5.20)", "proselint (>=0.13)", "sphinx (>=7.0.1)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] -test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.3.1)", "pytest-env (>=0.8.1)", "pytest-freezer (>=0.4.6)", "pytest-mock (>=3.10)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=67.8)", "time-machine (>=2.9)"] +test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] [[package]] name = "webencodings" @@ -2542,4 +2542,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "1a8b28421f5770d89b9d1bd3dd0fd1bd789648a772086f79a067899984e2f9ea" +content-hash = "4454d2dc73bfab6b7fea03e4bd5dcae7e350523e66a999f5b52d7634ab507844" diff --git a/pyproject.toml b/pyproject.toml index a389e96e..961c1eea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = ["poetry_core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.poetry] -name = "parea_ai" +name = "parea-ai" version = "0.1.1a0" description = "Parea python sdk" readme = "README.md" @@ -36,6 +36,7 @@ python = "^3.9" httpx = "^0.24.1" python-dotenv = "^1.0.0" poetry-plugin-dotenv = "^0.5.1" +pyupgrade = "^3.9.0" [tool.poetry.dev-dependencies] bandit = "^1.7.1" @@ -135,7 +136,7 @@ addopts = [ source = ["tests"] [coverage.paths] -source = "parea" +source = "parea_ai" [coverage.run] branch = true diff --git a/tests/test_example/test_example.py b/tests/test_example/test_example.py index 9ade3d2a..dd051c49 100644 --- a/tests/test_example/test_example.py +++ b/tests/test_example/test_example.py @@ -1,7 +1,7 @@ """Tests for hello function.""" import pytest -from parea.example import hello +from parea_ai.example import hello @pytest.mark.parametrize(