Skip to content

Commit 95aa900

Browse files
committed
chore: init beta version
1 parent 6d881c8 commit 95aa900

22 files changed

Lines changed: 1536 additions & 1 deletion

‎.gitignore‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ share/python-wheels/
2525
.installed.cfg
2626
*.egg
2727
MANIFEST
28+
.DS_Store
29+
30+
# Custom
31+
32+
main.py
33+
key.json
2834

2935
# PyInstaller
3036
# Usually these files are written by a python script from a template

‎Makefile‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
.PHONY: sec lint lint-apply test tests test-no-cov init pre-commit build install clean release
2+
.DEFAULT_GOAL := help
3+
4+
help:
5+
@echo "🪄 PREPARE ENVIRONMENT"
6+
@echo "---------------------------------------------------------------------"
7+
@echo " init Install all python requirements"
8+
@echo " pre-commit Install pre-commit hooks"
9+
@echo ""
10+
@echo "⚙️ DEVELOPMENT"
11+
@echo "---------------------------------------------------------------------"
12+
@echo " test Run all tests (pytest)"
13+
@echo " test-no-cov Run all tests (pytest) without coverage report"
14+
@echo " lint Check python syntax & style by black"
15+
@echo " lint-apply Apply black linter (autoformat)"
16+
@echo " sec Security linter (bandit)"
17+
@echo ""
18+
@echo "📦 PACKAGE OPERATIONS"
19+
@echo "---------------------------------------------------------------------"
20+
@echo " build Build whl package"
21+
@echo " install Install package to python lib"
22+
@echo " clean Clean install artifacts"
23+
@echo " release Build & release new package version to PYPI"
24+
25+
sec:
26+
@bandit -r yc_lockbox
27+
28+
lint:
29+
@black yc_lockbox tests --color --diff --check --extend-exclude "/.*(\.yml|\.yaml)/"
30+
31+
lint-apply:
32+
@black yc_lockbox tests --extend-exclude "/.*(\.yml|\.yaml)/"
33+
34+
test:
35+
@pytest -vv --cov=yc_lockbox --cov-report term --cov-report xml:coverage.xml
36+
37+
tests: test
38+
39+
test-no-cov:
40+
@pytest -vv --log-cli-level=INFO
41+
42+
pre-commit:
43+
@pre-commit run --all-files
44+
45+
init:
46+
@pip install -r requirements.txt
47+
@pip install -r requirements.aio.txt
48+
@pip install -r requirements.dev.txt
49+
50+
clean: clean-build clean-pyc
51+
52+
clean-build:
53+
rm -rf build/
54+
rm -rf dist/
55+
rm -rf .eggs/
56+
find . -name '*.egg-info' -exec rm -rf {} +
57+
find . -name '*.egg' -exec rm -rf {} +
58+
find . -name '.DS_Store' -exec rm -f {} +
59+
60+
clean-pyc:
61+
find . -name '*.pyc' -exec rm -f {} +
62+
find . -name '*.pyo' -exec rm -f {} +
63+
find . -name '*~' -exec rm -f {} +
64+
find . -name '__pycache__' -exec rm -rf {} +
65+
66+
build:
67+
@python3 setup.py sdist bdist_wheel
68+
69+
install: clean
70+
@python3 setup.py install
71+
72+
release: build
73+
@make build
74+
@echo "not implemented"

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# python-yc-lockbox
2-
Client of Yandex.Cloud Lockbox (secrets vault)
2+
Client for Yandex.Cloud Lockbox (secrets vault)

‎examples/async_example.py‎

Whitespace-only changes.

‎examples/sync_example.py‎

Whitespace-only changes.

‎pyproject.toml‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[tool.black]
2+
line-length = 119
3+
target-version = ['py310']
4+
include = '\.pyi?$'
5+
6+
7+
[tool.pytest.ini_options]
8+
pythonpath = [".", "yc_lockbox"]
9+
asyncio_mode = "auto"
10+
filterwarnings = [
11+
"ignore:`json_encoders` is deprecated",
12+
"ignore:The event_loop fixture provided by pytest-asyncio has been redefined",
13+
"ignore:Pydantic V1 style `@validator` validators are deprecated.",
14+
]
15+
16+
[tool.coverage.run]
17+
# omit = []
18+
19+
[tool.flake8]
20+
max-complexity = 15
21+
max-line-length = 119
22+
23+
[tool.semantic_release]
24+
version_variables = ["yc_lockbox/__init__.py:__version__"]
25+
remote.type = "github"
26+
commit_author = "name <email>"
27+
commit_message = "release: 🚀 auto version bump {version}"
28+
29+
[tool.semantic_release.commit_parser_options]
30+
allowed_types = [
31+
"build",
32+
"release",
33+
"chore",
34+
"ci",
35+
"docs",
36+
"feat",
37+
"fix",
38+
"perf",
39+
"style",
40+
"refactor",
41+
"test",
42+
]
43+
minor_types = ["feat"]
44+
patch_types = ["fix", "perf", "refactor"]
45+
46+
[tool.semantic_release.branches.main]
47+
match = "(main|master)"
48+
prerelease_token = "rc"
49+
prerelease = false

‎requirements.aio.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
aiohttp>=3.9.0,<4.0.0

‎requirements.dev.txt‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
bandit==1.7.7
2+
black==24.2.0
3+
Faker==23.3.0
4+
pytest==8.0.2
5+
pytest-asyncio==0.23.5
6+
pytest-cov==4.1.0
7+
pytest-mock
8+
python-semantic-release==9.1.1
9+
PyYAML==6.0.1
10+
twine==5.*
11+
wheel

‎requirements.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cryptography>=42.0.0
2+
pydantic>=2.0.0,<3.0.0
3+
PyJWT>=2.5.0,<3.0.0
4+
requests>=2.30.0,<3.0.0

‎setup.cfg‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[metadata]
2+
name = yc_lockbox
3+
description_file = README
4+
5+
[flake8]
6+
extend-ignore = E203
7+
ignore =
8+
D203,
9+
W503,
10+
E722,
11+
W605,
12+
E402
13+
exclude =
14+
ansible,
15+
scripts,
16+
docs,
17+
migrations,
18+
.git,
19+
.env,
20+
build,
21+
dist,
22+
venv,
23+
.eggs,
24+
tests,
25+
scripts
26+
setup.py,
27+
.example,
28+
.yaml,
29+
.vscode
30+
max-complexity = 15
31+
max-line-length = 119
32+
33+
[pylint.message-control]
34+
disable =
35+
W0511,
36+
C0114,
37+
C0115,
38+
C0116,
39+
W1203,
40+
W0703,
41+
R0903,
42+
C0116,
43+
R0913,
44+
R0902,
45+
R1719

0 commit comments

Comments
 (0)