Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Bug Report
description: File a bug report to help us improve
title: "Short description of the bug"
labels: ["bug", "triage"]
assignees:
- danfimov

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!

- type: input
id: version
attributes:
label: taskiq-ydb version
description: What version of taskiq-ydb are you running?
placeholder: e.g., 0.4.0
validations:
required: true

- type: dropdown
id: python-version
attributes:
label: Python version
description: What version of Python are you using?
options:
- Python 3.9 or lower
- Python 3.10
- Python 3.11
- Python 3.12
- Python 3.13
- Python 3.14
validations:
required: true

- type: input
id: ydb-version
attributes:
label: YDB version
description: What version of YDB are you using?
placeholder: e.g., 25.2
validations:
required: true

- type: textarea
id: what-happened
attributes:
label: What happened?
description: A clear and concise description of what the bug is.
placeholder: Tell us what you see!
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true

- type: textarea
id: reproduction-steps
attributes:
label: Steps to reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true

- type: textarea
id: minimal-example
attributes:
label: Minimal code example
description: Provide a minimal code example that reproduces the issue
render: python
validations:
required: false

- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: false

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context about the problem here.
validations:
required: false
69 changes: 69 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Feature Request
description: Suggest an idea for this project
title: "Short description of feature"
labels: ["enhancement", "triage"]
assignees:
- danfimov

body:
- type: markdown
attributes:
value: |
Thanks for suggesting a new feature!

- type: textarea
id: problem-description
attributes:
label: Is your feature request related to a problem?
description: A clear and concise description of what the problem is.
placeholder: I'm always frustrated when...
validations:
required: true

- type: textarea
id: solution-description
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false

- type: dropdown
id: component
attributes:
label: Which component would this affect?
description: Select the component this feature would primarily affect
options:
- YDB Broker
- Result Backend
- Scheduler Source
- Database Drivers
- Configuration
- Documentation
- Other
validations:
required: true

- type: textarea
id: use-case
attributes:
label: Use case
description: Describe the specific use case this feature would enable
validations:
required: true

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context, mockups, or examples about the feature request here.
validations:
required: false
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "monthly"
cooldown:
default-days: 30
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
cooldown:
default-days: 30
25 changes: 18 additions & 7 deletions .github/workflows/code_check.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
name: Linters and tests
on: [pull_request]
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

permissions:
actions: read
contents: read
pull-requests: read

jobs:
test:
name: Tests
runs-on: ubuntu-latest
name: Run tests
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- id: setup-uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
if: steps.setup-uv.outputs.cache-hit != 'true'
run: uv sync --all-extras
- name: Docker compose
uses: adambirds/docker-compose-action@v1.5.0
uses: adambirds/docker-compose-action@bb7d920fc625486a7be4ea860554b6da88fd75a3 # v1.5.0
with:
compose-file: "docker-compose.yml"
- name: Test
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/release_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0
with:
enable-cache: false
python-version: "3.12"
version: "latest"
- run: uv version "${GITHUB_REF_NAME}"
- run: uv build
- run: uv publish --trusted-publishing always
73 changes: 73 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.3.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-case-conflict
- id: check-ast
- id: check-toml
- id: check-yaml
- id: check-added-large-files
- id: end-of-file-fixer

- repo: https://github.com/crate-ci/typos
rev: v1.38.1
hooks:
- id: typos

- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: [
'--exclude-lines', 'look_in_vault',
'--exclude-lines', 'taskiq_postgres',
'--exclude-lines', 'postgresql://postgres:postgres@localhost:5432/postgres',
]

- repo: local
hooks:
- id: ruff
name: Ruff
entry: make ruff
language: python
types: [python]
require_serial: true
verbose: true
pass_filenames: false

- id: mypy
name: Mypy
entry: make mypy
language: python
types: [python]
require_serial: true
verbose: true
pass_filenames: false

- id: bandit
name: bandit
entry: uv run --active --frozen bandit -c pyproject.toml -r src
language: python
types: [python]
require_serial: true
verbose: true
pass_filenames: false

- id: zizmor
name: zizmor
language: python
entry: uv run --active --frozen zizmor .
files: ^\.github
require_serial: true
verbose: true
pass_filenames: false
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include src/taskiq_ydb/py.typed
72 changes: 72 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
args := $(wordlist 2, 100, $(MAKECMDGOALS))

VIRTUAL_ENV=.venv

.DEFAULT:
@echo "No such command (or you pass two or many targets to ). List of possible commands: make help"

.DEFAULT_GOAL := help

##@ Local development

.PHONY: help
help: ## Show this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target> <arg=value>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m %s\033[0m\n\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

.PHONY: venv
venv: ## Create a new virtual environment
@uv venv

.PHONY: check_venv
check_venv: ## Check that virtual environment is activated
@if [ -z $$VIRTUAL_ENV ]; then \
echo "Error: Virtual environment is not activated"; \
exit 1; \
fi

.PHONY: init
init: ## Install all project dependencies with extras
@$(MAKE) check_venv
@uv sync --all-extras

.PHONY: run_docs
run_docs: ## Run documentation server
@uv run mkdocs serve --livereload

.PHONY: run_infra
run_infra: ## Run rabbitmq in docker for integration tests
@docker compose -f docker-compose.yml up -d

##@ Code quality

.PHONY: lint
lint: ## Run linting
@$(MAKE) ruff
@$(MAKE) mypy

.PHONY: ruff
ruff: ## Run ruff linting
@uv run --active --frozen ruff check src tests

.PHONY: mypy
mypy: ## Run mypy type checking
@uv run --active --frozen mypy src

.PHONY: format
format: ## Run formatting
@uv run ruff check . --fix

##@ Testing

.PHONY: test
test: ## Run all pytest tests
@uv run pytest tests

.PHONY: test_cov
test_cov: ## Generate test coverage report
@pytest --cov='src' --cov-report=html


.PHONY: test_install
test_install: ## Verify package installation by importing it
@uv run --with taskiq-ydb --no-project -- python -c "import taskiq_ydb"
Loading