Repository: dmtrs/dependable

Issue:
Change name of package
[depends](https://pypi.org/project/depends/) module name occupied in pypi.

Alternatives:
- Shall it include `async` in it, due to asyncio usage
```python
from async-depends import dependable, Depends
```
- Shall it reference to concurrency eg. `codepends`
```python
from codepends import dependable, Depends
```
- Shall it be `dependable` eg.
```python
from dependable import dependable, Depends
```

Discussion:

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c92be4d..1492f74 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,5 +9,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ### Added
 
-* Adds decorator `depends.dependable`
-* Adds class `depends.Depends`
+* Adds decorator `dependable.dependant`
+* Adds class `dependable.Depends`
diff --git a/Makefile b/Makefile
index 14df204..e8b7c50 100644
--- a/Makefile
+++ b/Makefile
@@ -4,10 +4,10 @@ help: ## Show this help
 
 .PHONY: lint
 lint:  ## Linter the code.
-	isort depends tests --check
+	isort dependable tests --check
 	flake8 .
-	mypy depends
+	mypy dependable
 
 .PHONY: test
 test:  ## Test your code.
-	poetry run pytest tests/ --cov=depends --cov-report=term-missing:skip-covered --cov-report=xml
+	poetry run pytest tests/ --cov=dependable --cov-report=term-missing:skip-covered --cov-report=xml
diff --git a/README.md b/README.md
index 6faf283..bbfcf15 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,18 @@
 <h1 align="center">
-    <strong>depends</strong>
+    <strong>dependable</strong>
 </h1>
 <p align="center">
-    <a href="https://github.com/dmtrs/depends" target="_blank">
-        <img src="https://img.shields.io/github/last-commit/dmtrs/depends" alt="Latest Commit">
+    <a href="https://github.com/dmtrs/dependable" target="_blank">
+        <img src="https://img.shields.io/github/last-commit/dmtrs/dependable" alt="Latest Commit">
     </a>
-        <img src="https://img.shields.io/github/workflow/status/dmtrs/depends/Test">
-        <img src="https://img.shields.io/codecov/c/github/dmtrs/depends">
+        <img src="https://img.shields.io/github/workflow/status/dmtrs/dependable/Test">
+        <img src="https://img.shields.io/codecov/c/github/dmtrs/dependable">
     <br />
-    <a href="https://pypi.org/project/depends" target="_blank">
-        <img src="https://img.shields.io/pypi/v/depends" alt="Package version">
+    <a href="https://pypi.org/project/dependable" target="_blank">
+        <img src="https://img.shields.io/pypi/v/dependable" alt="Package version">
     </a>
-    <img src="https://img.shields.io/pypi/pyversions/depends">
-    <img src="https://img.shields.io/github/license/dmtrs/depends">
+    <img src="https://img.shields.io/pypi/pyversions/dependable">
+    <img src="https://img.shields.io/github/license/dmtrs/dependable">
 </p>
 
 Dependency injection system extracted from `fastapi`
@@ -21,19 +21,21 @@ Dependency injection system extracted from `fastapi`
 import asyncio
 from random import random
 
-from depends import Depends, dependable
+from dependable import dependant, Depends
 
-@dependable
+@dependant
 async def main(*, choice: int = Depends(random)) -> None:
     print(choice)
 
 asyncio.run(main())
 ```
 
+More on [examples](examples/tick.py)
+
 ## Installation
 
 ``` bash
-poetry add depends # pip install depends
+poetry add dependable # pip install dependable
 ```
 
 ## Python 3.6
@@ -46,11 +48,11 @@ poetry add async-exit-stack async_generator # pip install async-exit-stack async
 ## Development
 
 ```bash
-docker build -t depends .
+docker build -t dependable .
 ```
 
 ```bash
-docker run --rm -v $(pwd):/usr/src/app depends scripts/dev
+docker run --rm -v $(pwd):/usr/src/app dependable scripts/dev
 ```
 
 ## References
diff --git a/depends/__init__.py b/dependable/__init__.py
similarity index 88%
rename from depends/__init__.py
rename to dependable/__init__.py
index 270cd24..880e012 100644
--- a/depends/__init__.py
+++ b/dependable/__init__.py
@@ -5,7 +5,7 @@ __version__ = "0.1.0"
 from typing import Any, Callable, Optional
 
 from .core import Depends as InternalDepends
-from .decorator import dependable as dependable
+from .decorator import dependant as dependant
 
 
 def Depends(  # noqa: N802
diff --git a/depends/concurrency.py b/dependable/concurrency.py
similarity index 100%
rename from depends/concurrency.py
rename to dependable/concurrency.py
diff --git a/depends/core.py b/dependable/core.py
similarity index 100%
rename from depends/core.py
rename to dependable/core.py
diff --git a/depends/decorator.py b/dependable/decorator.py
similarity index 98%
rename from depends/decorator.py
rename to dependable/decorator.py
index bfec415..8a46b95 100644
--- a/depends/decorator.py
+++ b/dependable/decorator.py
@@ -8,7 +8,7 @@ from .utils import get_dependant, solve_dependencies
 T = TypeVar("T")
 
 
-class dependable:
+class dependant:
     def __init__(self, call: Callable[..., Any]) -> None:
         assert callable(call)
         self.call = call
diff --git a/depends/utils.py b/dependable/utils.py
similarity index 100%
rename from depends/utils.py
rename to dependable/utils.py
diff --git a/examples/hello.py b/examples/hello.py
index 3f8e776..fbb0fff 100644
--- a/examples/hello.py
+++ b/examples/hello.py
@@ -1,10 +1,10 @@
 import asyncio
 from random import random
 
-from depends import Depends, dependable
+from dependable import Depends, dependant
 
 
-@dependable
+@dependant
 async def main(*, choice: int = Depends(random)) -> None:
     print(choice)
 
diff --git a/examples/tick.py b/examples/tick.py
index ac42035..9c8ff37 100644
--- a/examples/tick.py
+++ b/examples/tick.py
@@ -3,7 +3,7 @@ import time
 import uuid
 from typing import Tuple
 
-from depends import Depends, dependable
+from dependable import Depends, dependant
 
 
 def get_id() -> uuid.UUID:
@@ -20,7 +20,7 @@ def cpu_bound() -> None:
     return time.time()
 
 
-@dependable
+@dependant
 async def tick(
     *,
     i: int,
diff --git a/mypy.ini b/mypy.ini
index e134a0c..935ee92 100644
--- a/mypy.ini
+++ b/mypy.ini
@@ -16,11 +16,11 @@ implicit_reexport = False
 strict_equality = True
 # --strict end
 
-[mypy-depends.concurrency]
+[mypy-dependable.concurrency]
 warn_unused_ignores = False
 ignore_missing_imports = True
 
-[mypy-depends.tests.*]
+[mypy-dependable.tests.*]
 ignore_missing_imports = True
 check_untyped_defs = True 
 
diff --git a/pyproject.toml b/pyproject.toml
index 1260946..440eb36 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,12 +1,12 @@
 [tool.poetry]
-name = "depends"
+name = "dependable"
 version = "0.1.0"
 description = "Dependency injection system extracted from FastAPI"
 authors = ["Dimitrios Flaco Mengidis  <tydeas.dr@gmail.com>"]
 readme = "README.md"
 license = "MIT"
-repository = "https://github.com/dmtrs/depends"
-include = ["depends/py.typed"]
+repository = "https://github.com/dmtrs/dependable"
+include = ["dependable/py.typed"]
 
 classifiers = [
     "Topic :: Software Development :: Build Tools",
diff --git a/scripts/dev b/scripts/dev
index d01cf20..c91f239 100755
--- a/scripts/dev
+++ b/scripts/dev
@@ -4,4 +4,4 @@ set -e
 set -x
 which poetry
 poetry run pre-commit run --all
-poetry run ptw -- -s -vv --mypy tests/ --cov=depends --cov-report=term-missing:skip-covered --cov-report=html
+poetry run ptw -- -s -vv --mypy tests/ --cov=dependable --cov-report=term-missing:skip-covered --cov-report=html
diff --git a/setup.cfg b/setup.cfg
index 6a139ac..6a9b4ae 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 [isort]
 profile = black
-known_first_party = depends
+known_first_party = dependable
 
 
 [flake8]


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index d69e944..62a30e4 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -33,6 +33,6 @@ jobs:
       - name: Code quality
         run: poetry run pre-commit run --all
       - name: Run tests
-        run: poetry run pytest --mypy tests/ --cov=depends --cov-report=term-missing:skip-covered --cov-report=xml
+        run: poetry run pytest --mypy tests/ --cov=dependable --cov-report=term-missing:skip-covered --cov-report=xml
       - name: Upload coverage
         uses: codecov/codecov-action@v1
diff --git a/tests/test_concurrency.py b/tests/test_concurrency.py
index 9e8cad4..e16fef0 100644
--- a/tests/test_concurrency.py
+++ b/tests/test_concurrency.py
@@ -3,7 +3,7 @@ from typing import Any, Callable, Sequence
 
 import pytest
 
-from depends.concurrency import run_in_threadpool
+from dependable.concurrency import run_in_threadpool
 
 
 class BackgroundTask:
diff --git a/tests/test_decorator.py b/tests/test_decorator.py
index 0b572e0..3f65681 100644
--- a/tests/test_decorator.py
+++ b/tests/test_decorator.py
@@ -2,21 +2,21 @@ from typing import Any, TypeVar
 
 import pytest
 
-from depends import Depends, dependable
+from dependable import Depends, dependant
 
 T = TypeVar("T")
 
 
-class TestAsyncDependable:
+class TestDependant:
     def test_assertion(self) -> None:
         try:
-            dependable(1)  # type: ignore
+            dependant(1)  # type: ignore
         except AssertionError:
             assert True
 
     @pytest.mark.asyncio
     async def test_empty(self) -> None:
-        @dependable
+        @dependant
         def empty() -> Any:
             return True
 
@@ -24,7 +24,7 @@ class TestAsyncDependable:
 
     @pytest.mark.asyncio
     async def test_arg(self) -> None:
-        @dependable
+        @dependant
         def _is(*, b: bool) -> bool:
             return b
 
@@ -35,7 +35,7 @@ class TestAsyncDependable:
         def falsy() -> bool:
             return False
 
-        @dependable
+        @dependant
         def _is(*, actual: bool = Depends(falsy)) -> bool:
             return actual
 
diff --git a/tests/test_depends.py b/tests/test_depends.py
index 30a4814..85670e9 100644
--- a/tests/test_depends.py
+++ b/tests/test_depends.py
@@ -1,4 +1,4 @@
-from depends import Depends
+from dependable import Depends
 
 
 class TestDepends:
diff --git a/tests/test_version.py b/tests/test_version.py
index 400ecb4..d1c2233 100644
--- a/tests/test_version.py
+++ b/tests/test_version.py
@@ -1,5 +1,5 @@
-import depends
+import dependable
 
 
 def test_version() -> None:
-    assert depends.__version__ == "0.1.0"
+    assert dependable.__version__ == "0.1.0"