autotel 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- autotel-0.1.0/.github/dependabot.yml +50 -0
- autotel-0.1.0/.github/workflows/publish.yml +29 -0
- autotel-0.1.0/.github/workflows/test.yml +49 -0
- autotel-0.1.0/.gitignore +51 -0
- autotel-0.1.0/.pre-commit-config.yaml +66 -0
- autotel-0.1.0/.readthedocs.yaml +35 -0
- autotel-0.1.0/CHANGELOG.md +41 -0
- autotel-0.1.0/CONTRIBUTING.md +94 -0
- autotel-0.1.0/LICENSE +21 -0
- autotel-0.1.0/MANIFEST.in +10 -0
- autotel-0.1.0/MIGRATION.md +867 -0
- autotel-0.1.0/Makefile +50 -0
- autotel-0.1.0/PKG-INFO +1094 -0
- autotel-0.1.0/README.md +1032 -0
- autotel-0.1.0/coverage.xml +2811 -0
- autotel-0.1.0/docs/conf.py +76 -0
- autotel-0.1.0/docs/index.md +80 -0
- autotel-0.1.0/docs/quickstart.md +278 -0
- autotel-0.1.0/docs/requirements.txt +5 -0
- autotel-0.1.0/examples/basic/README.md +51 -0
- autotel-0.1.0/examples/basic/complete_example.py +89 -0
- autotel-0.1.0/examples/basic/convenience_helpers_example.py +147 -0
- autotel-0.1.0/examples/basic/event_and_metric_example.py +274 -0
- autotel-0.1.0/examples/basic/events_example.py +133 -0
- autotel-0.1.0/examples/basic/functional_example.py +90 -0
- autotel-0.1.0/examples/basic/main.py +44 -0
- autotel-0.1.0/examples/basic/metrics_example.py +186 -0
- autotel-0.1.0/examples/basic/semantic_helpers_example.py +383 -0
- autotel-0.1.0/examples/basic/shutdown_example.py +59 -0
- autotel-0.1.0/examples/basic/slack_example.py +104 -0
- autotel-0.1.0/examples/basic/webhook_example.py +107 -0
- autotel-0.1.0/examples/comparison/COMPARISON.md +230 -0
- autotel-0.1.0/examples/comparison/REAL_WORLD_EXAMPLES.md +543 -0
- autotel-0.1.0/examples/comparison/after_autolemetry.py +69 -0
- autotel-0.1.0/examples/comparison/before_autolemetry.py +164 -0
- autotel-0.1.0/examples/comparison/context_propagation_after.py +82 -0
- autotel-0.1.0/examples/comparison/context_propagation_before.py +156 -0
- autotel-0.1.0/examples/fastapi/README.md +34 -0
- autotel-0.1.0/examples/fastapi/app.py +36 -0
- autotel-0.1.0/examples/flask/README.md +31 -0
- autotel-0.1.0/examples/flask/app.py +34 -0
- autotel-0.1.0/examples/pydantic_ai/README.md +167 -0
- autotel-0.1.0/examples/pydantic_ai/advanced_example.py +204 -0
- autotel-0.1.0/examples/pydantic_ai/ollama_example.py +169 -0
- autotel-0.1.0/examples/pydantic_ai/requirements.txt +3 -0
- autotel-0.1.0/examples/pydantic_ai/simple_example.py +58 -0
- autotel-0.1.0/pyproject.toml +163 -0
- autotel-0.1.0/scripts/test_examples.py +322 -0
- autotel-0.1.0/scripts/verify_examples.py +105 -0
- autotel-0.1.0/src/autotel/__init__.py +230 -0
- autotel-0.1.0/src/autotel/__version__.py +3 -0
- autotel-0.1.0/src/autotel/baggage_span_processor.py +80 -0
- autotel-0.1.0/src/autotel/circuit_breaker.py +110 -0
- autotel-0.1.0/src/autotel/config.py +37 -0
- autotel-0.1.0/src/autotel/context.py +138 -0
- autotel-0.1.0/src/autotel/db.py +228 -0
- autotel-0.1.0/src/autotel/debug.py +98 -0
- autotel-0.1.0/src/autotel/decorators.py +114 -0
- autotel-0.1.0/src/autotel/env_config.py +180 -0
- autotel-0.1.0/src/autotel/events.py +199 -0
- autotel-0.1.0/src/autotel/exporters.py +20 -0
- autotel-0.1.0/src/autotel/functional.py +167 -0
- autotel-0.1.0/src/autotel/helpers.py +232 -0
- autotel-0.1.0/src/autotel/http.py +202 -0
- autotel-0.1.0/src/autotel/init.py +424 -0
- autotel-0.1.0/src/autotel/integrations/__init__.py +28 -0
- autotel-0.1.0/src/autotel/integrations/django.py +106 -0
- autotel-0.1.0/src/autotel/integrations/fastapi.py +122 -0
- autotel-0.1.0/src/autotel/integrations/flask.py +95 -0
- autotel-0.1.0/src/autotel/logging.py +187 -0
- autotel-0.1.0/src/autotel/mcp.py +644 -0
- autotel-0.1.0/src/autotel/metrics.py +379 -0
- autotel-0.1.0/src/autotel/openllmetry.py +61 -0
- autotel-0.1.0/src/autotel/operation_context.py +54 -0
- autotel-0.1.0/src/autotel/pii_redaction.py +111 -0
- autotel-0.1.0/src/autotel/presets/__init__.py +9 -0
- autotel-0.1.0/src/autotel/presets/datadog.py +59 -0
- autotel-0.1.0/src/autotel/presets/honeycomb.py +60 -0
- autotel-0.1.0/src/autotel/processors.py +9 -0
- autotel-0.1.0/src/autotel/py.typed +0 -0
- autotel-0.1.0/src/autotel/rate_limiter.py +58 -0
- autotel-0.1.0/src/autotel/sampling.py +133 -0
- autotel-0.1.0/src/autotel/semantic_helpers.py +641 -0
- autotel-0.1.0/src/autotel/serverless.py +67 -0
- autotel-0.1.0/src/autotel/shutdown.py +132 -0
- autotel-0.1.0/src/autotel/subscribers/__init__.py +15 -0
- autotel-0.1.0/src/autotel/subscribers/base.py +28 -0
- autotel-0.1.0/src/autotel/subscribers/posthog.py +80 -0
- autotel-0.1.0/src/autotel/subscribers/slack.py +126 -0
- autotel-0.1.0/src/autotel/subscribers/streaming.py +66 -0
- autotel-0.1.0/src/autotel/subscribers/webhook.py +88 -0
- autotel-0.1.0/src/autotel/subscribers.py +192 -0
- autotel-0.1.0/src/autotel/testing/__init__.py +39 -0
- autotel-0.1.0/src/autotel/testing/helpers.py +291 -0
- autotel-0.1.0/src/autotel/trace_helpers.py +235 -0
- autotel-0.1.0/src/autotel/tracer_provider.py +139 -0
- autotel-0.1.0/src/autotel/track.py +31 -0
- autotel-0.1.0/src/autotel/validation.py +180 -0
- autotel-0.1.0/tests/__init__.py +1 -0
- autotel-0.1.0/tests/conftest.py +47 -0
- autotel-0.1.0/tests/integration/__init__.py +1 -0
- autotel-0.1.0/tests/integration/test_fastapi_integration.py +88 -0
- autotel-0.1.0/tests/unit/__init__.py +1 -0
- autotel-0.1.0/tests/unit/test_baggage.py +445 -0
- autotel-0.1.0/tests/unit/test_circuit_breaker.py +121 -0
- autotel-0.1.0/tests/unit/test_config.py +51 -0
- autotel-0.1.0/tests/unit/test_context.py +93 -0
- autotel-0.1.0/tests/unit/test_db.py +104 -0
- autotel-0.1.0/tests/unit/test_decorators.py +79 -0
- autotel-0.1.0/tests/unit/test_events.py +228 -0
- autotel-0.1.0/tests/unit/test_functional.py +110 -0
- autotel-0.1.0/tests/unit/test_helpers.py +202 -0
- autotel-0.1.0/tests/unit/test_http.py +94 -0
- autotel-0.1.0/tests/unit/test_init.py +281 -0
- autotel-0.1.0/tests/unit/test_mcp.py +140 -0
- autotel-0.1.0/tests/unit/test_mcp_autopatch.py +83 -0
- autotel-0.1.0/tests/unit/test_metrics.py +253 -0
- autotel-0.1.0/tests/unit/test_pii_redaction.py +117 -0
- autotel-0.1.0/tests/unit/test_rate_limiter.py +76 -0
- autotel-0.1.0/tests/unit/test_sampling.py +88 -0
- autotel-0.1.0/tests/unit/test_semantic_helpers.py +452 -0
- autotel-0.1.0/tests/unit/test_shutdown.py +74 -0
- autotel-0.1.0/tests/unit/test_testing_helpers.py +115 -0
- autotel-0.1.0/tests/unit/test_trace_helpers.py +363 -0
- autotel-0.1.0/tests/unit/test_tracer_provider.py +158 -0
- autotel-0.1.0/uv.lock +3832 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Dependabot configuration for automated dependency updates
|
|
2
|
+
# See https://docs.github.com/en/code-security/dependabot
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
updates:
|
|
6
|
+
# Python dependencies
|
|
7
|
+
- package-ecosystem: "pip"
|
|
8
|
+
directory: "/"
|
|
9
|
+
schedule:
|
|
10
|
+
interval: "weekly"
|
|
11
|
+
day: "monday"
|
|
12
|
+
time: "09:00"
|
|
13
|
+
open-pull-requests-limit: 10
|
|
14
|
+
reviewers:
|
|
15
|
+
- "jagreehal"
|
|
16
|
+
labels:
|
|
17
|
+
- "dependencies"
|
|
18
|
+
- "python"
|
|
19
|
+
commit-message:
|
|
20
|
+
prefix: "deps"
|
|
21
|
+
include: "scope"
|
|
22
|
+
# Group all patch updates together
|
|
23
|
+
groups:
|
|
24
|
+
patch-updates:
|
|
25
|
+
patterns:
|
|
26
|
+
- "*"
|
|
27
|
+
update-types:
|
|
28
|
+
- "patch"
|
|
29
|
+
# Ignore specific dependencies if needed
|
|
30
|
+
ignore:
|
|
31
|
+
# Example: ignore major updates for specific packages
|
|
32
|
+
# - dependency-name: "opentelemetry-api"
|
|
33
|
+
# update-types: ["version-update:semver-major"]
|
|
34
|
+
|
|
35
|
+
# GitHub Actions dependencies
|
|
36
|
+
- package-ecosystem: "github-actions"
|
|
37
|
+
directory: "/"
|
|
38
|
+
schedule:
|
|
39
|
+
interval: "weekly"
|
|
40
|
+
day: "monday"
|
|
41
|
+
time: "09:00"
|
|
42
|
+
open-pull-requests-limit: 5
|
|
43
|
+
reviewers:
|
|
44
|
+
- "jagreehal"
|
|
45
|
+
labels:
|
|
46
|
+
- "dependencies"
|
|
47
|
+
- "github-actions"
|
|
48
|
+
commit-message:
|
|
49
|
+
prefix: "ci"
|
|
50
|
+
include: "scope"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Set up Python
|
|
15
|
+
uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.11"
|
|
18
|
+
|
|
19
|
+
- name: Install build tools
|
|
20
|
+
run: pip install build twine
|
|
21
|
+
|
|
22
|
+
- name: Build package
|
|
23
|
+
run: python -m build
|
|
24
|
+
|
|
25
|
+
- name: Publish to PyPI
|
|
26
|
+
env:
|
|
27
|
+
TWINE_USERNAME: __token__
|
|
28
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
29
|
+
run: twine upload dist/*
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, develop]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, develop]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
15
|
+
fail-fast: false
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install uv
|
|
26
|
+
run: pip install uv
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: uv pip install --system -e ".[dev]"
|
|
30
|
+
|
|
31
|
+
- name: Run linting
|
|
32
|
+
run: python -m ruff check src tests
|
|
33
|
+
|
|
34
|
+
- name: Run type checking
|
|
35
|
+
run: mypy src
|
|
36
|
+
|
|
37
|
+
- name: Run unit tests
|
|
38
|
+
run: pytest tests/unit -v --cov=src --cov-report=xml --cov-report=term-missing
|
|
39
|
+
|
|
40
|
+
- name: Upload coverage to Codecov
|
|
41
|
+
if: always()
|
|
42
|
+
continue-on-error: true
|
|
43
|
+
uses: codecov/codecov-action@v4
|
|
44
|
+
with:
|
|
45
|
+
file: ./coverage.xml
|
|
46
|
+
flags: unittests
|
|
47
|
+
name: codecov-${{ matrix.python-version }}
|
|
48
|
+
fail_ci_if_error: false
|
|
49
|
+
verbose: true
|
autotel-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
MANIFEST
|
|
23
|
+
|
|
24
|
+
# Virtual environments
|
|
25
|
+
venv/
|
|
26
|
+
env/
|
|
27
|
+
ENV/
|
|
28
|
+
.venv
|
|
29
|
+
|
|
30
|
+
# IDEs
|
|
31
|
+
.vscode/
|
|
32
|
+
.idea/
|
|
33
|
+
*.swp
|
|
34
|
+
*.swo
|
|
35
|
+
*~
|
|
36
|
+
|
|
37
|
+
# Testing
|
|
38
|
+
.pytest_cache/
|
|
39
|
+
.coverage
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.hypothesis/
|
|
43
|
+
|
|
44
|
+
# OS
|
|
45
|
+
.DS_Store
|
|
46
|
+
Thumbs.db
|
|
47
|
+
|
|
48
|
+
# Project specific
|
|
49
|
+
*.log
|
|
50
|
+
.env
|
|
51
|
+
.env.local
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Pre-commit hooks for autotel
|
|
2
|
+
# See https://pre-commit.com for more information
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
# Ruff - Fast Python linter and formatter
|
|
6
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
7
|
+
rev: v0.8.4
|
|
8
|
+
hooks:
|
|
9
|
+
# Run the linter
|
|
10
|
+
- id: ruff
|
|
11
|
+
args: [--fix]
|
|
12
|
+
# Run the formatter
|
|
13
|
+
- id: ruff-format
|
|
14
|
+
|
|
15
|
+
# MyPy - Static type checker
|
|
16
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
17
|
+
rev: v1.13.0
|
|
18
|
+
hooks:
|
|
19
|
+
- id: mypy
|
|
20
|
+
additional_dependencies:
|
|
21
|
+
- types-all
|
|
22
|
+
args: [--config-file=pyproject.toml]
|
|
23
|
+
exclude: ^(tests/|examples/)
|
|
24
|
+
|
|
25
|
+
# General pre-commit hooks
|
|
26
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
27
|
+
rev: v5.0.0
|
|
28
|
+
hooks:
|
|
29
|
+
# File checks
|
|
30
|
+
- id: check-yaml
|
|
31
|
+
- id: check-toml
|
|
32
|
+
- id: check-json
|
|
33
|
+
- id: check-added-large-files
|
|
34
|
+
args: [--maxkb=1000]
|
|
35
|
+
- id: check-case-conflict
|
|
36
|
+
- id: check-merge-conflict
|
|
37
|
+
|
|
38
|
+
# Code quality
|
|
39
|
+
- id: trailing-whitespace
|
|
40
|
+
- id: end-of-file-fixer
|
|
41
|
+
- id: mixed-line-ending
|
|
42
|
+
args: [--fix=lf]
|
|
43
|
+
|
|
44
|
+
# Python specific
|
|
45
|
+
- id: check-docstring-first
|
|
46
|
+
- id: debug-statements
|
|
47
|
+
- id: name-tests-test
|
|
48
|
+
args: [--pytest-test-first]
|
|
49
|
+
|
|
50
|
+
# Security checks
|
|
51
|
+
- repo: https://github.com/PyCQA/bandit
|
|
52
|
+
rev: 1.8.1
|
|
53
|
+
hooks:
|
|
54
|
+
- id: bandit
|
|
55
|
+
args: [-c, pyproject.toml]
|
|
56
|
+
additional_dependencies: ["bandit[toml]"]
|
|
57
|
+
exclude: ^tests/
|
|
58
|
+
|
|
59
|
+
# Configuration for pre-commit.ci (if using)
|
|
60
|
+
ci:
|
|
61
|
+
autofix_commit_msg: |
|
|
62
|
+
[pre-commit.ci] auto fixes from pre-commit hooks
|
|
63
|
+
|
|
64
|
+
for more information, see https://pre-commit.ci
|
|
65
|
+
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
|
|
66
|
+
skip: [mypy] # Skip mypy on pre-commit.ci (can be slow)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Read the Docs configuration file for autotel
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
|
|
6
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
7
|
+
build:
|
|
8
|
+
os: ubuntu-22.04
|
|
9
|
+
tools:
|
|
10
|
+
python: "3.11"
|
|
11
|
+
jobs:
|
|
12
|
+
post_create_environment:
|
|
13
|
+
# Install poetry or other dependencies if needed
|
|
14
|
+
- pip install -U pip setuptools wheel
|
|
15
|
+
post_install:
|
|
16
|
+
# Install the package with docs dependencies
|
|
17
|
+
- pip install -e .[dev]
|
|
18
|
+
|
|
19
|
+
# Build documentation with Sphinx
|
|
20
|
+
sphinx:
|
|
21
|
+
configuration: docs/conf.py
|
|
22
|
+
fail_on_warning: false
|
|
23
|
+
|
|
24
|
+
# Optionally build your docs in additional formats
|
|
25
|
+
formats:
|
|
26
|
+
- pdf
|
|
27
|
+
- epub
|
|
28
|
+
|
|
29
|
+
# Python configuration
|
|
30
|
+
python:
|
|
31
|
+
install:
|
|
32
|
+
- method: pip
|
|
33
|
+
path: .
|
|
34
|
+
extra_requirements:
|
|
35
|
+
- dev
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2025-11-26
|
|
9
|
+
|
|
10
|
+
### Initial Release
|
|
11
|
+
|
|
12
|
+
#### Added
|
|
13
|
+
- One-line initialization with `init()` supporting standard OTEL environment variables
|
|
14
|
+
- `@trace` decorator for sync and async functions
|
|
15
|
+
- `TraceContext` for span operations with auto-detected `ctx` parameter
|
|
16
|
+
- Convenience helpers: `set_attribute()`, `get_trace_id()`, `add_event()`, etc.
|
|
17
|
+
- Semantic convention helpers: `@trace_llm`, `@trace_db`, `@trace_http`, `@trace_messaging`
|
|
18
|
+
- Global `track()` function for product events with auto-enrichment
|
|
19
|
+
- `Event` class for sending events to subscribers (PostHog, Slack, Webhook)
|
|
20
|
+
- `Metric` class for OpenTelemetry metrics (counters, histograms)
|
|
21
|
+
- Baggage support with `with_baggage()` and automatic span attributes
|
|
22
|
+
- Production features: adaptive sampling, rate limiting, circuit breakers
|
|
23
|
+
- PII redaction for email, phone, SSN, credit card, and API keys
|
|
24
|
+
- Framework integrations: FastAPI, Django, Flask middleware
|
|
25
|
+
- HTTP instrumentation with W3C Trace Context propagation
|
|
26
|
+
- Database instrumentation helpers
|
|
27
|
+
- MCP (Model Context Protocol) instrumentation with auto-patching
|
|
28
|
+
- Logging integration (standard logging, structlog, loguru)
|
|
29
|
+
- Testing utilities: `InMemorySpanExporter`, assertion helpers
|
|
30
|
+
- Graceful shutdown with `shutdown()` and `shutdown_sync()`
|
|
31
|
+
- Comprehensive documentation and migration guide
|
|
32
|
+
- 189 passing tests with full coverage
|
|
33
|
+
|
|
34
|
+
#### Developer Experience
|
|
35
|
+
- Type hints throughout (mypy compliant)
|
|
36
|
+
- Comprehensive examples for all features
|
|
37
|
+
- Before/after comparison examples
|
|
38
|
+
- Migration guide from manual OpenTelemetry
|
|
39
|
+
- Clear error messages and validation
|
|
40
|
+
|
|
41
|
+
[0.1.0]: https://github.com/jagreehal/autotel-python/releases/tag/v0.1.0
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Contributing to autotel-python
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to autotel-python! This document provides guidelines and instructions for contributing.
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
1. **Clone the repository**
|
|
8
|
+
```bash
|
|
9
|
+
git clone https://github.com/jagreehal/autotel-python.git
|
|
10
|
+
cd autotel-python
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
2. **Install dependencies**
|
|
14
|
+
```bash
|
|
15
|
+
# Using uv (recommended)
|
|
16
|
+
uv pip install -e ".[dev]"
|
|
17
|
+
|
|
18
|
+
# Or using pip
|
|
19
|
+
pip install -e ".[dev]"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
3. **Run tests**
|
|
23
|
+
```bash
|
|
24
|
+
pytest tests/ -v
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Development Workflow
|
|
28
|
+
|
|
29
|
+
1. **Create a branch**
|
|
30
|
+
```bash
|
|
31
|
+
git checkout -b feature/your-feature-name
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
2. **Make your changes**
|
|
35
|
+
- Follow the existing code style
|
|
36
|
+
- Add tests for new features
|
|
37
|
+
- Update documentation as needed
|
|
38
|
+
|
|
39
|
+
3. **Run quality checks**
|
|
40
|
+
```bash
|
|
41
|
+
make quality # Runs lint, type-check, and tests
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
4. **Commit your changes**
|
|
45
|
+
```bash
|
|
46
|
+
git commit -m "feat: add your feature"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
5. **Push and create a PR**
|
|
50
|
+
```bash
|
|
51
|
+
git push origin feature/your-feature-name
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Code Style
|
|
55
|
+
|
|
56
|
+
- **Formatting**: Use `ruff format` (configured in `pyproject.toml`)
|
|
57
|
+
- **Linting**: Use `ruff check` (configured in `pyproject.toml`)
|
|
58
|
+
- **Type Hints**: Use full type hints (checked with `mypy`)
|
|
59
|
+
- **Line Length**: 100 characters
|
|
60
|
+
- **Docstrings**: Use Google-style docstrings
|
|
61
|
+
|
|
62
|
+
## Testing
|
|
63
|
+
|
|
64
|
+
- Write tests for all new features
|
|
65
|
+
- Aim for >90% code coverage
|
|
66
|
+
- Run tests with: `pytest tests/ -v --cov=src`
|
|
67
|
+
|
|
68
|
+
## Documentation
|
|
69
|
+
|
|
70
|
+
- Update README.md for user-facing changes
|
|
71
|
+
- Update CHANGELOG.md for notable changes
|
|
72
|
+
- Add docstrings to all public functions/classes
|
|
73
|
+
|
|
74
|
+
## Commit Messages
|
|
75
|
+
|
|
76
|
+
Follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
77
|
+
|
|
78
|
+
- `feat:` New feature
|
|
79
|
+
- `fix:` Bug fix
|
|
80
|
+
- `docs:` Documentation changes
|
|
81
|
+
- `test:` Test additions/changes
|
|
82
|
+
- `refactor:` Code refactoring
|
|
83
|
+
- `chore:` Maintenance tasks
|
|
84
|
+
|
|
85
|
+
## Pull Request Process
|
|
86
|
+
|
|
87
|
+
1. Ensure all tests pass
|
|
88
|
+
2. Update documentation
|
|
89
|
+
3. Add entry to CHANGELOG.md
|
|
90
|
+
4. Request review from maintainers
|
|
91
|
+
|
|
92
|
+
## Questions?
|
|
93
|
+
|
|
94
|
+
Open an issue or reach out to the maintainers!
|
autotel-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Jag Reehal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|