|
| 1 | +[build-system] |
| 2 | +requires = ["hatchling"] |
| 3 | +build-backend = "hatchling.build" |
| 4 | + |
1 | 5 | [project] |
2 | 6 | name = "python-vaultwarden" |
3 | 7 | version = "0.7.0" |
4 | | -description = "The Vautlwarden Python Client" |
5 | | -requires-python = ">=3.11" |
| 8 | +description = "Admin Vaultwarden and Simple Bitwarden Python Client" |
6 | 9 | authors = [ |
7 | 10 | { name = "Lyonel Martinez", email = "[email protected]" }, |
8 | 11 | { name = "Mathis Ribet", email = "[email protected]" }, |
9 | 12 | ] |
| 13 | +license = "Apache-2.0" |
| 14 | +readme = "README.md" |
| 15 | +repository = "https://github.com/numberly/python-vaultwarden" |
| 16 | +documentation = "https://numberly.github.io/python-vaultwarden/" |
| 17 | +packages = [ |
| 18 | + { include = "vaultwarden", from = "src" }, |
| 19 | +] |
10 | 20 | classifiers = [ |
11 | 21 | "Development Status :: 4 - Beta", |
12 | | - "Environment :: Web Environment", |
13 | 22 | "Intended Audience :: Developers", |
| 23 | + "Environment :: Web Environment", |
| 24 | + "License :: OSI Approved :: Apache Software License", |
14 | 25 | "Operating System :: OS Independent", |
| 26 | + "Intended Audience :: Developers", |
| 27 | + "Programming Language :: Python", |
| 28 | + "Programming Language :: Python :: 3", |
| 29 | + "Programming Language :: Python :: 3 :: Only", |
| 30 | + "Programming Language :: Python :: 3.10", |
15 | 31 | "Programming Language :: Python :: 3.11", |
| 32 | + "Typing :: Typed", |
16 | 33 | "Topic :: Internet :: WWW/HTTP", |
| 34 | + # Include this classifier to prevent accidently publishing private code to PyPI. |
| 35 | + # https://pypi.org/classifiers/ |
| 36 | + "Private :: Do Not Upload", |
| 37 | +] |
| 38 | +requires-python = ">=3.10" |
| 39 | +dependencies = [ |
| 40 | + "bitwardentools >=1.0.55", |
| 41 | + "httpx >=0.24.1", |
| 42 | +] |
| 43 | + |
| 44 | +[tool.hatch.version] |
| 45 | +path = "src/vaultwarden/__version__.py" |
| 46 | + |
| 47 | +[tool.hatch.build] |
| 48 | +packages = [ |
| 49 | + "src/vaultwarden", |
| 50 | +] |
| 51 | +include = [ |
| 52 | + "/tests", |
| 53 | +] |
| 54 | + |
| 55 | +[tool.hatch.build.targets.sdist] |
| 56 | +include = ["/src/vaultwarden/**/*.py"] |
| 57 | +[tool.hatch.build.targets.wheel] |
| 58 | +packages = [ |
| 59 | + "src/vaultwarden", |
| 60 | +] |
| 61 | + |
| 62 | +[tool.hatch.envs.test] |
| 63 | +dependencies = [ |
| 64 | + "coverage", |
17 | 65 | ] |
| 66 | + |
| 67 | +[tool.hatch.envs.test.scripts] |
| 68 | +test = "coverage run --source=src/vaultwarden -m unittest discover -p 'test_*.py' tests --top-level-directory ." |
| 69 | +_coverage = ["test", "coverage xml", "coverage report --show-missing"] |
| 70 | +with-coverage = "test" |
| 71 | +[[tool.hatch.envs.test.matrix]] |
| 72 | +python = ["3.10", "3.11"] |
| 73 | +type = ["default"] |
| 74 | +[tool.hatch.envs.test.overrides] |
| 75 | +matrix.type.scripts = [ |
| 76 | + { key = "with-coverage", value = "_coverage", if = ["default"] }, |
| 77 | +] |
| 78 | + |
| 79 | +[tool.hatch.envs.types] |
| 80 | +dependencies = [ |
| 81 | + "mypy", |
| 82 | + "types-PyYAML", |
| 83 | + "types-setuptools", |
| 84 | + "typing-extensions", |
| 85 | +] |
| 86 | +[tool.hatch.envs.types.scripts] |
| 87 | +check = "mypy src/vaultwarden" |
| 88 | + |
| 89 | +[tool.hatch.envs.style] |
| 90 | +detached = true |
18 | 91 | dependencies = [ |
19 | | - "bitwardentools==1.0.55", |
20 | | - "httpx==0.24.1", |
| 92 | + "black", |
| 93 | + "isort", |
| 94 | + "ruff", |
| 95 | +] |
| 96 | +[tool.hatch.envs.style.scripts] |
| 97 | +lint = [ |
| 98 | + "ruff check --fix src/vaultwarden", |
| 99 | +] |
| 100 | +check = [ |
| 101 | + "isort --check-only --diff src/vaultwarden", |
| 102 | + "black -q --check --diff src/vaultwarden", |
| 103 | + "ruff check src/vaultwarden", |
21 | 104 | ] |
| 105 | +format = [ |
| 106 | + "isort -q src/vaultwarden", |
| 107 | + "black -q src/vaultwarden", |
| 108 | + "lint" |
| 109 | +] |
| 110 | + |
| 111 | +[tool.ruff] |
| 112 | +# Add "Q" to the list of enabled codes. |
| 113 | +select = ["B", "E", "F", "I", "N", "Q", "RUF", "SIM", "TCH"] |
| 114 | +fixable = ["ALL"] |
| 115 | +src = ["src/vaultwarden", "tests"] |
| 116 | +target-version = "py310" |
| 117 | +line-length = 79 |
| 118 | + |
| 119 | +[tool.ruff.flake8-quotes] |
| 120 | +docstring-quotes = "double" |
| 121 | + |
| 122 | +[tool.ruff.flake8-bugbear] |
| 123 | +extend-immutable-calls = ["typer.Argument"] |
| 124 | + |
| 125 | +[tool.ruff.isort] |
| 126 | +force-sort-within-sections = true |
| 127 | + |
| 128 | +[tool.black] |
| 129 | +line-length = 79 |
| 130 | +target-version = ["py310", "py311"] |
| 131 | + |
| 132 | +[tool.isort] |
| 133 | +profile = "black" |
| 134 | +line_length = 80 |
| 135 | + |
| 136 | +[tool.mypy] |
| 137 | +ignore_missing_imports = true |
| 138 | +warn_unreachable = true |
| 139 | +no_implicit_optional = true |
| 140 | +show_error_codes = true |
22 | 141 |
|
23 | 142 | [tool.commitizen] |
24 | 143 | version = "0.7.0" |
| 144 | +tag_format = "$version" |
| 145 | +update_changelog_on_bump = true |
25 | 146 | version_files = [ |
26 | | - "pyproject.toml:version", |
27 | | - "vaultwarden/__version__.py", |
| 147 | + "src/vaultwarden/__version__.py", |
28 | 148 | ] |
0 commit comments