Skip to content

Commit ba1ce3e

Browse files
docs: clean up stale README and apply auto formatting fixes (#47)
* chore(main): release 0.4.0 (#46) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * docs: clean up stale README * chore: apply auto-formatting fixes Minor formatting fixes applied by markdownlint and ruff: - CLAUDE.md: Add blank lines for readability, fix heading level - docs/RELEASE_PROCESS.md: Add blank lines for list formatting - src/utils/configuration.py: Fix quote style consistency * chore: update Docker image to v0.4.0 Updates deployment configurations to use v0.4.0 image version. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent eceb4d6 commit ba1ce3e

File tree

6 files changed

+26
-67
lines changed

6 files changed

+26
-67
lines changed

CLAUDE.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ The system follows a clear data pipeline with daily scheduled execution:
153153
This repository uses **release-please** for automated releases:
154154

155155
**Commit Message Format (CRITICAL):**
156+
156157
- Use conventional commits: `feat:`, `fix:`, `chore:`, `refactor:`, `docs:`
157158
- release-please auto-generates CHANGELOG and handles versioning
158159
- Examples:
@@ -161,11 +162,13 @@ This repository uses **release-please** for automated releases:
161162
- `feat!: change API structure` (major version bump)
162163

163164
**DO NOT:**
165+
164166
- Manually edit CHANGELOG.md for new changes (release-please updates it)
165167
- Manually create git tags (release-please creates them)
166168
- Manually create GitHub releases (release-please handles this)
167169

168170
**Release Process:**
171+
169172
1. Push commits with conventional format to `main`
170173
2. release-please creates/updates a Release PR automatically
171174
3. Review and merge the Release PR
@@ -218,6 +221,6 @@ See [docs/RELEASE_PROCESS.md](./docs/RELEASE_PROCESS.md) for full details.
218221
3. Contact repository administrators to discuss history rewriting if necessary
219222
4. Consider the credential permanently compromised
220223

221-
# Style Guidelines Import
224+
## Style Guidelines Import
222225

223226
@./STYLE_GUIDELINES.md

README.md

Lines changed: 17 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This repository implements a Docker container service for the Rewards Eligibilit
77
### Key Features
88

99
The oracle runs with the following functionality:
10+
1011
- **BigQuery Integration**: Fetches indexer performance data from Google BigQuery
1112
- **Eligibility Processing**: Applies threshold algorithm to determine rewards eligibility based on service quality
1213
- **Blockchain Integration**: Posts rewards eligibility updates to the RewardsEligibilityOracle contract
@@ -21,24 +22,13 @@ The oracle includes built-in Slack notifications for operational monitoring:
2122

2223
- **Success Notifications**: Sent when oracle runs complete successfully, including transaction details
2324
- **Failure Notifications**: Sent when errors occur, with detailed error information for debugging
24-
- **Simple & Reliable**: Direct notifications from the oracle process itself
2525

2626
For production deployments, container orchestration (Kubernetes) should handle:
27+
2728
- Container health monitoring and restarts
2829
- Resource management and scaling
2930
- Infrastructure-level alerts and monitoring
3031

31-
### Testing Notifications
32-
33-
Test notification functionality:
34-
```bash
35-
# Set webhook URL
36-
export SLACK_WEBHOOK_URL="your_webhook_url"
37-
38-
# Run notification tests
39-
./scripts/test_slack_notifications.py
40-
```
41-
4232
## Configuration
4333

4434
## Eligibility Criteria
@@ -71,73 +61,37 @@ Automated quality checks and security scanning via GitHub Actions. Run `./script
7161

7262
For details: [.github/README.md](./.github/README.md)
7363

74-
## Getting Started
75-
76-
### Quick Start with Docker
77-
78-
1. **Clone the repository**:
79-
```bash
80-
git clone https://github.com/graphprotocol/service-quality-oracle.git
81-
cd service-quality-oracle
82-
```
83-
84-
2. **Set up environment variables/config.toml**:
85-
86-
3. **Build and run with Docker Compose**:
87-
```bash
88-
docker-compose up --build -d
89-
```
90-
91-
4. **Monitor logs**:
92-
```bash
93-
docker-compose logs -f
94-
```
95-
96-
5. **Check health status**:
97-
```bash
98-
docker-compose ps
99-
```
100-
10164
### Development Workflow
10265

10366
For contributors working on the codebase:
10467

10568
**Before pushing:**
106-
```bash
107-
# Setup venv
108-
python3 -m venv venv
109-
source venv/bin/activate
11069

111-
# Install requirements
112-
pip install -r requirements.txt
70+
```bash
71+
# Setup venv
72+
python3 -m venv venv
73+
source venv/bin/activate
74+
75+
# Install requirements
76+
pip install -r requirements.txt
77+
78+
# Use the custom ruff script for linting (includes SQL formatting and aggressive linting)
79+
./scripts/ruff_check_format_assets.sh
11380

114-
# Use the custom ruff script for linting (includes SQL formatting and aggressive linting)
115-
./scripts/ruff_check_format_assets.sh
116-
```
81+
# Use markdownlint to lint and fix markdown files
82+
markdownlint '**/*.md' --ignore 'venv/**' --ignore 'node_modules/**' --fix
83+
```
11784

11885
**Optional checks:**
86+
11987
```bash
12088
mypy src/ --ignore-missing-imports
12189
bandit -r src/
12290
```
12391

124-
> **Note:** The CI/CD pipeline uses the custom `ruff_check_format_assets.sh` script which includes SQL whitespace fixes and more aggressive formatting than standard ruff.
125-
>
92+
> **Note:** The CI/CD pipeline uses the custom `ruff_check_format_assets.sh` script which includes SQL whitespace fixes and more aggressive formatting than standard ruff.
12693
> Always run this script locally before pushing to avoid CI failures.
12794
12895
## License
12996

13097
[License information to be determined.]
131-
132-
## TODO List (only outstanding TODOs)
133-
134-
### 1. Testing
135-
- [ ] Security review of code and dependencies
136-
137-
### 2. Documentation
138-
- [ ] Documentation of all major components
139-
- [ ] Document operational procedures
140-
141-
### 3. Optimization
142-
- [ ] Optimize dependencies and container setup
143-
- [ ] Ensure unused files, functions & dependencies are removed from codebase

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
container_name: service-quality-oracle
1010

1111
# Set the image name
12-
image: ghcr.io/graphprotocol/rewards-eligibility-oracle:v0.3.0
12+
image: ghcr.io/graphprotocol/rewards-eligibility-oracle:v0.4.0
1313

1414
volumes:
1515
# Mount data directory to store data

docs/RELEASE_PROCESS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ When commits are pushed to `main`, release-please:
5050
4. Creates/updates a "Release PR" with all changes
5151

5252
**Example Release PR:**
53+
5354
- Title: `chore(main): release 0.4.0`
5455
- Changes: Updated CHANGELOG.md, version bump
5556
- Body: Lists all changes since last release
@@ -63,6 +64,7 @@ To create a release:
6364
3. Merge the Release PR
6465

6566
When merged, release-please automatically:
67+
6668
- Creates a Git tag (e.g., `v0.4.0`)
6769
- Creates a GitHub Release with changelog
6870
- Triggers CD workflow to build and publish Docker images

k8s/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
spec:
1717
containers:
1818
- name: service-quality-oracle
19-
image: ghcr.io/graphprotocol/service-quality-oracle:latest
19+
image: ghcr.io/graphprotocol/service-quality-oracle:v0.4.0
2020
envFrom:
2121
# Load all non-sensitive configuration from ConfigMap
2222
- configMapRef:

src/utils/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def get_google_credentials(self) -> google.auth.credentials.Credentials:
355355
cred_type = type(credentials).__name__
356356

357357
# Show service account email if available (service accounts have this attribute)
358-
if hasattr(credentials, 'service_account_email'):
358+
if hasattr(credentials, "service_account_email"):
359359
logger.info(
360360
f"Loaded {cred_type} credentials from {creds_source} "
361361
f"for project {project} (service account: {credentials.service_account_email})"

0 commit comments

Comments
 (0)