Skip to content

Commit 52d9067

Browse files
committed
chore: move dev checks to CI instead of commit hook
1 parent feee641 commit 52d9067

File tree

6 files changed

+58
-132
lines changed

6 files changed

+58
-132
lines changed

.github/workflows/tox-full-suite.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,16 @@ jobs:
165165
echo "✨ Running format checks..."
166166
tox -e format
167167
168+
- name: Validate tracer patterns
169+
run: |
170+
echo "🔍 Validating tracer patterns..."
171+
bash scripts/validate-tracer-patterns.sh
172+
173+
- name: Check feature documentation sync
174+
run: |
175+
echo "📋 Checking feature documentation synchronization..."
176+
python scripts/check-feature-sync.py
177+
168178
- name: Build documentation
169179
run: |
170180
echo "📚 Building documentation..."
@@ -219,6 +229,11 @@ jobs:
219229
echo "has_honeyhive_key=false" >> $GITHUB_OUTPUT
220230
fi
221231
232+
- name: Validate no mocks in integration tests
233+
run: |
234+
echo "🔍 Validating integration tests use real APIs (no mocks)..."
235+
bash scripts/validate-no-mocks-integration.sh
236+
222237
- name: Run integration tests with real APIs (NO MOCKS)
223238
if: steps.check_credentials.outputs.has_honeyhive_key == 'true'
224239
run: |

.pre-commit-config.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,34 @@ The Maintainers
3434
**Option A: Nix Flakes (Recommended)**
3535

3636
```bash
37+
git clone https://github.com/honeyhiveai/python-sdk.git
3738
cd python-sdk
38-
direnv allow # One-time setup - automatically configures environment
39+
40+
# Allow direnv (one-time setup)
41+
direnv allow
42+
43+
# That's it! Environment automatically configured with:
44+
# - Python 3.12
45+
# - All dev dependencies
46+
# - Tox environments
3947
```
4048

49+
See [NIX_SETUP.md](NIX_SETUP.md) for full details on the Nix development environment.
50+
4151
**Option B: Traditional Setup**
4252

4353
```bash
54+
git clone https://github.com/honeyhiveai/python-sdk.git
4455
cd python-sdk
56+
57+
# Create and activate virtual environment named 'python-sdk' (required)
4558
python -m venv python-sdk
46-
source python-sdk/bin/activate
59+
source python-sdk/bin/activate # On Windows: python-sdk\Scripts\activate
60+
61+
# Install in development mode with all dependencies
4762
pip install -e ".[dev,docs]"
63+
64+
# Set up development environment (installs tools, runs verification)
4865
./scripts/setup-dev.sh
4966
```
5067

@@ -57,18 +74,27 @@ make help
5774
```
5875

5976
Key commands:
60-
- `make check` - Run all comprehensive checks (everything that was in pre-commit)
77+
- `make check` - Run all comprehensive checks (format, lint, tests, docs, validation)
6178
- `make test` - Run all tests
62-
- `make format` - Format code
79+
- `make format` - Format code with Black and isort
80+
- `make lint` - Run linting checks
6381
- `make generate-sdk` - Generate SDK from OpenAPI spec
6482

65-
### Pre-commit Hooks
83+
### Code Quality Checks
84+
85+
Before pushing code, run:
86+
```bash
87+
make check
88+
```
6689

67-
Pre-commit hooks are **fast** (runs in seconds) and automatically enforce:
90+
This runs all quality checks:
6891
- ✅ Black formatting
6992
- ✅ Import sorting (isort)
7093
- ✅ Static analysis (pylint + mypy)
71-
- ✅ YAML validation
7294
- ✅ Unit tests (fast, mocked)
95+
- ✅ Integration test validation
96+
- ✅ Documentation builds
97+
- ✅ Tracer pattern validation
98+
- ✅ Feature documentation sync
7399

74-
**Heavy checks moved to Makefile**: Integration tests, documentation builds, and compliance checks are now run via `make check-all` instead of on every commit. This makes commits fast while still allowing comprehensive validation when needed.
100+
All these checks also run automatically in CI when you push or create a pull request.

README.md

Lines changed: 5 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -75,69 +75,6 @@ pip install honeyhive
7575

7676
For detailed guidance on including HoneyHive in your `pyproject.toml`, see our [pyproject.toml Integration Guide](https://honeyhiveai.github.io/python-sdk/how-to/deployment/pyproject-integration.html).
7777

78-
### Development Installation
79-
80-
**Option A: Nix Flakes (Recommended)**
81-
82-
```bash
83-
git clone https://github.com/honeyhiveai/python-sdk.git
84-
cd python-sdk
85-
86-
# Allow direnv (one-time setup)
87-
direnv allow
88-
89-
# That's it! Environment automatically configured with:
90-
# - Python 3.12
91-
# - All dev dependencies
92-
# - Pre-commit hooks
93-
```
94-
95-
See [NIX_SETUP.md](NIX_SETUP.md) for full details.
96-
97-
**Option B: Traditional Setup**
98-
99-
```bash
100-
git clone https://github.com/honeyhiveai/python-sdk.git
101-
cd python-sdk
102-
103-
# Create and activate virtual environment named 'python-sdk' (required)
104-
python -m venv python-sdk
105-
source python-sdk/bin/activate # On Windows: python-sdk\Scripts\activate
106-
107-
# Install in development mode
108-
pip install -e .
109-
110-
# 🚨 MANDATORY: Set up development environment (one-time setup)
111-
./scripts/setup-dev.sh
112-
113-
# Verify setup (should pass all checks)
114-
tox -e format && tox -e lint
115-
```
116-
117-
#### Development Environment Setup
118-
119-
**⚠️ CRITICAL: All developers must run the setup script once (unless using Nix):**
120-
121-
```bash
122-
# This installs pre-commit hooks for automatic code quality enforcement
123-
./scripts/setup-dev.sh
124-
```
125-
126-
**Pre-commit hooks automatically enforce:**
127-
- **Black formatting** (88-character lines)
128-
- **Import sorting** (isort with black profile)
129-
- **Static analysis** (pylint + mypy)
130-
- **YAML validation** (yamllint with 120-character lines)
131-
- **Documentation synchronization** (feature docs, changelog)
132-
- **Tox verification** (format and lint checks)
133-
134-
**Before every commit, the system automatically runs:**
135-
1. Code formatting and import sorting
136-
2. Static analysis and type checking
137-
3. Documentation build verification
138-
4. Feature documentation synchronization
139-
5. Mandatory changelog update verification
140-
14178
## 🔧 Quick Start
14279

14380
### Basic Usage
@@ -382,4 +319,8 @@ src/honeyhive/
382319
| `HH_HTTP_PROXY` | HTTP proxy URL | `None` |
383320
| `HH_HTTPS_PROXY` | HTTPS proxy URL | `None` |
384321
| `HH_NO_PROXY` | Proxy bypass list | `None` |
385-
| `HH_VERIFY_SSL` | SSL verification | `true`
322+
| `HH_VERIFY_SSL` | SSL verification | `true`
323+
324+
## 🤝 Contributing
325+
326+
Want to contribute to HoneyHive? See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ dev = [
5353
"typeguard>=4.0.0",
5454
"psutil>=5.9.0",
5555
"yamllint>=1.37.0",
56-
"pre-commit>=3.0.0", # For git hooks
5756
"requests>=2.31.0", # For docs navigation validation
5857
"beautifulsoup4>=4.12.0", # For docs navigation validation
5958
"datamodel-code-generator==0.25.0", # For model generation from OpenAPI spec (pinned to match original generation)

scripts/setup-dev.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# Development environment setup script for HoneyHive Python SDK
3-
# This ensures all developers have consistent tooling and pre-commit hooks
3+
# This ensures all developers have consistent tooling
44

55
set -e
66

@@ -35,11 +35,6 @@ echo "✅ Virtual environment: $VIRTUAL_ENV"
3535
# Install development dependencies
3636
echo "📦 Installing development dependencies..."
3737
pip install -e .
38-
pip install pre-commit>=3.6.0
39-
40-
# Install pre-commit hooks
41-
echo "🪝 Installing pre-commit hooks..."
42-
pre-commit install
4338

4439
# Verify tools are working
4540
echo "🔍 Verifying development tools..."
@@ -66,9 +61,9 @@ echo ""
6661
echo "🎉 Development environment setup complete!"
6762
echo ""
6863
echo "📋 Next steps:"
69-
echo " 1. All commits will now automatically run quality checks"
70-
echo " 2. To manually run checks: tox -e lint && tox -e format"
71-
echo " 3. To skip pre-commit hooks (emergency only): git commit --no-verify"
64+
echo " 1. Run 'make check' to validate your changes before committing"
65+
echo " 2. All checks will run in CI when you push"
66+
echo " 3. Use 'make help' to see all available commands"
7267
echo ""
7368
echo "📚 More info:"
7469
echo " - praxis OS standards: .praxis-os/standards/"

0 commit comments

Comments
 (0)