Skip to content

Commit dce250e

Browse files
committed
Add repo polish: tests, templates, docs site, Unraid templates, comparison table
- Issue templates (bug, feature, new service) + PR template + CONTRIBUTING.md - Test suite: 301 tests validating YAML catalog and collector registration - MkDocs Material docs site with all 49 service guides - Unraid Community Apps XML templates (UI + Worker) - Comparison table vs competitors in README - CHANGELOG.md with release history - GitHub Actions: test workflow + docs deployment - Reddit and dev.to post drafts in docs/drafts/
1 parent 1383b76 commit dce250e

26 files changed

Lines changed: 1592 additions & 0 deletions

.github/CONTRIBUTING.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Contributing to CashPilot
2+
3+
Contributions are welcome! Here's how to get started.
4+
5+
## Adding a Service (easiest contribution)
6+
7+
This is the most impactful way to contribute. Each service is a single YAML file.
8+
9+
1. Create `services/{category}/{slug}.yml` following the schema in `services/_schema.yml`
10+
2. Add a guide page at `docs/guides/{slug}.md` with setup instructions
11+
3. Update the service table in `README.md`
12+
4. Submit a PR
13+
14+
Look at any existing YAML file in `services/` for reference. Categories: `bandwidth`, `depin`, `storage`, `compute`.
15+
16+
## Adding an Earnings Collector
17+
18+
Collectors fetch balance/earnings from service APIs. See `app/collectors/` for examples.
19+
20+
1. Create `app/collectors/{slug}.py` extending `BaseCollector` from `app/collectors/base.py`
21+
2. Register it in `app/collectors/__init__.py`
22+
3. Add required credentials as `?optional` or required params
23+
24+
## Bug Fixes and Features
25+
26+
1. Fork the repo and create a branch (`fix/description` or `feature/description`)
27+
2. Make your changes
28+
3. Run linting: `ruff check app/ && ruff format --check app/`
29+
4. Submit a PR with a clear description
30+
31+
## Code Style
32+
33+
- **Linter:** [Ruff](https://docs.astral.sh/ruff/) with pycodestyle, pyflakes, isort, pyupgrade, bugbear, simplify
34+
- **Line length:** 120
35+
- **Formatting:** Ruff formatter (double quotes, 4-space indent)
36+
37+
Run before committing:
38+
39+
```bash
40+
ruff check app/ --fix
41+
ruff format app/
42+
```
43+
44+
## Commit Messages
45+
46+
Use conventional commits: `type(scope): description`
47+
48+
Types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
49+
50+
Examples:
51+
- `feat(collector): add Bitping earnings collector`
52+
- `fix(deploy): handle missing Docker socket gracefully`
53+
- `docs(service): add ProxyBase setup guide`
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: textarea
7+
id: description
8+
attributes:
9+
label: Description
10+
description: A clear description of the bug.
11+
validations:
12+
required: true
13+
14+
- type: textarea
15+
id: steps
16+
attributes:
17+
label: Steps to Reproduce
18+
description: How can we reproduce this?
19+
placeholder: |
20+
1. Go to ...
21+
2. Click on ...
22+
3. See error
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: expected
28+
attributes:
29+
label: Expected Behavior
30+
description: What did you expect to happen?
31+
validations:
32+
required: true
33+
34+
- type: dropdown
35+
id: deployment
36+
attributes:
37+
label: Deployment Method
38+
options:
39+
- Docker Compose
40+
- Docker Run
41+
- Unraid
42+
- Portainer
43+
- Other
44+
validations:
45+
required: true
46+
47+
- type: input
48+
id: version
49+
attributes:
50+
label: CashPilot Version
51+
description: "Image tag or git commit (e.g. v0.2.17, latest)"
52+
placeholder: "latest"
53+
validations:
54+
required: true
55+
56+
- type: dropdown
57+
id: arch
58+
attributes:
59+
label: Architecture
60+
options:
61+
- amd64 (x86_64)
62+
- arm64 (aarch64 / Raspberry Pi)
63+
validations:
64+
required: true
65+
66+
- type: textarea
67+
id: logs
68+
attributes:
69+
label: Relevant Logs
70+
description: Paste any relevant container logs here.
71+
render: shell
72+
73+
- type: checkboxes
74+
id: checks
75+
attributes:
76+
label: Checks
77+
options:
78+
- label: I am using the latest version of CashPilot
79+
required: true
80+
- label: I searched existing issues and this is not a duplicate
81+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Documentation
4+
url: https://github.com/GeiserX/CashPilot/tree/main/docs
5+
about: Check the docs and service guides before opening an issue
6+
- name: Discussions
7+
url: https://github.com/GeiserX/CashPilot/discussions
8+
about: Ask questions or share your setup
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Feature Request
2+
description: Suggest a new feature or improvement
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: textarea
7+
id: problem
8+
attributes:
9+
label: Problem
10+
description: What problem does this solve? What are you trying to do?
11+
validations:
12+
required: true
13+
14+
- type: textarea
15+
id: solution
16+
attributes:
17+
label: Proposed Solution
18+
description: How should this work?
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: alternatives
24+
attributes:
25+
label: Alternatives Considered
26+
description: Any workarounds or alternative approaches you've considered?
27+
28+
- type: checkboxes
29+
id: contribution
30+
attributes:
31+
label: Contribution
32+
options:
33+
- label: I would be willing to submit a PR for this feature
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: New Service Request
2+
description: Request a new passive income service to be added
3+
title: "[Service]: "
4+
labels: ["new-service"]
5+
body:
6+
- type: input
7+
id: name
8+
attributes:
9+
label: Service Name
10+
placeholder: "e.g. MyNewService"
11+
validations:
12+
required: true
13+
14+
- type: input
15+
id: website
16+
attributes:
17+
label: Website URL
18+
placeholder: "https://..."
19+
validations:
20+
required: true
21+
22+
- type: dropdown
23+
id: category
24+
attributes:
25+
label: Category
26+
options:
27+
- Bandwidth Sharing
28+
- DePIN
29+
- Storage
30+
- GPU Compute
31+
- Other
32+
validations:
33+
required: true
34+
35+
- type: dropdown
36+
id: docker
37+
attributes:
38+
label: Has Docker Image?
39+
options:
40+
- "Yes"
41+
- "No"
42+
- "Unknown"
43+
validations:
44+
required: true
45+
46+
- type: input
47+
id: docker_image
48+
attributes:
49+
label: Docker Image (if known)
50+
placeholder: "e.g. dockerhub-user/image:latest"
51+
52+
- type: dropdown
53+
id: residential
54+
attributes:
55+
label: Requires Residential IP?
56+
options:
57+
- "Yes"
58+
- "No"
59+
- "Unknown"
60+
validations:
61+
required: true
62+
63+
- type: dropdown
64+
id: referral
65+
attributes:
66+
label: Has Referral Program?
67+
options:
68+
- "Yes"
69+
- "No"
70+
- "Unknown"
71+
72+
- type: input
73+
id: earnings
74+
attributes:
75+
label: Estimated Monthly Earnings
76+
placeholder: "e.g. $2-5/month per device"
77+
78+
- type: textarea
79+
id: notes
80+
attributes:
81+
label: Additional Notes
82+
description: Any other relevant details (payout methods, device limits, etc.)
83+
84+
- type: checkboxes
85+
id: contribution
86+
attributes:
87+
label: Contribution
88+
options:
89+
- label: I would be willing to submit a PR adding this service

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Summary
2+
3+
<!-- What does this PR do and why? -->
4+
5+
## Type of Change
6+
7+
- [ ] New service (YAML + guide)
8+
- [ ] New earnings collector
9+
- [ ] Bug fix
10+
- [ ] Feature
11+
- [ ] Documentation
12+
- [ ] Other
13+
14+
## Checklist
15+
16+
- [ ] `ruff check app/` passes
17+
- [ ] `ruff format --check app/` passes
18+
- [ ] Service YAML follows `services/_schema.yml`
19+
- [ ] Guide page added in `docs/guides/` (if new service)
20+
- [ ] README service table updated (if new service)
21+
- [ ] No credentials or secrets committed

.github/workflows/docs.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- 'mkdocs.yml'
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
deploy:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.12'
23+
24+
- name: Install dependencies
25+
run: pip install -r docs/requirements-docs.txt
26+
27+
- name: Build and deploy
28+
run: mkdocs gh-deploy --force

.github/workflows/test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.12"
18+
19+
- name: Install dependencies
20+
run: |
21+
pip install -r requirements.txt
22+
pip install pytest pyyaml
23+
24+
- name: Run tests
25+
run: pytest tests/ -v

0 commit comments

Comments
 (0)