greybeard 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.
- greybeard-0.1.0/.env.example +1 -0
- greybeard-0.1.0/.github/FUNDING.yml +15 -0
- greybeard-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +96 -0
- greybeard-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- greybeard-0.1.0/.github/ISSUE_TEMPLATE/content_pack.yml +70 -0
- greybeard-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +54 -0
- greybeard-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +46 -0
- greybeard-0.1.0/.github/REPOSITORY_SETUP.md +158 -0
- greybeard-0.1.0/.github/dependabot.yml +41 -0
- greybeard-0.1.0/.github/workflows/ci.yml +64 -0
- greybeard-0.1.0/.github/workflows/docs.yml +43 -0
- greybeard-0.1.0/.github/workflows/publish.yml +77 -0
- greybeard-0.1.0/.github/workflows/stale.yml +54 -0
- greybeard-0.1.0/.gitignore +15 -0
- greybeard-0.1.0/.readthedocs.yaml +10 -0
- greybeard-0.1.0/CODE_OF_CONDUCT.md +133 -0
- greybeard-0.1.0/CONTRIBUTING.md +60 -0
- greybeard-0.1.0/LICENSE +21 -0
- greybeard-0.1.0/Makefile +88 -0
- greybeard-0.1.0/PKG-INFO +387 -0
- greybeard-0.1.0/README.md +341 -0
- greybeard-0.1.0/RELEASING.md +219 -0
- greybeard-0.1.0/SECURITY.md +91 -0
- greybeard-0.1.0/docs/contributing.md +173 -0
- greybeard-0.1.0/docs/getting-started/configuration.md +87 -0
- greybeard-0.1.0/docs/getting-started/installation.md +76 -0
- greybeard-0.1.0/docs/getting-started/quickstart.md +70 -0
- greybeard-0.1.0/docs/guides/backends.md +152 -0
- greybeard-0.1.0/docs/guides/mcp.md +152 -0
- greybeard-0.1.0/docs/guides/output.md +67 -0
- greybeard-0.1.0/docs/guides/packs.md +128 -0
- greybeard-0.1.0/docs/index.md +70 -0
- greybeard-0.1.0/docs/reference/cli.md +225 -0
- greybeard-0.1.0/docs/reference/config-schema.md +64 -0
- greybeard-0.1.0/docs/reference/pack-schema.md +136 -0
- greybeard-0.1.0/examples/custom-pack.md +52 -0
- greybeard-0.1.0/examples/review-a-diff.md +71 -0
- greybeard-0.1.0/mkdocs.yml +73 -0
- greybeard-0.1.0/packs/idp-readiness.yaml +46 -0
- greybeard-0.1.0/packs/mentor-mode.yaml +37 -0
- greybeard-0.1.0/packs/oncall-future-you.yaml +42 -0
- greybeard-0.1.0/packs/solutions-architect.yaml +45 -0
- greybeard-0.1.0/packs/staff-core.yaml +41 -0
- greybeard-0.1.0/pyproject.toml +86 -0
- greybeard-0.1.0/release.sh +168 -0
- greybeard-0.1.0/staff_review/__init__.py +3 -0
- greybeard-0.1.0/staff_review/analyzer.py +255 -0
- greybeard-0.1.0/staff_review/cli.py +549 -0
- greybeard-0.1.0/staff_review/config.py +134 -0
- greybeard-0.1.0/staff_review/mcp_server.py +300 -0
- greybeard-0.1.0/staff_review/models.py +55 -0
- greybeard-0.1.0/staff_review/modes.py +143 -0
- greybeard-0.1.0/staff_review/packs.py +363 -0
- greybeard-0.1.0/tests/conftest.py +3 -0
- greybeard-0.1.0/tests/test_analyzer.py +136 -0
- greybeard-0.1.0/tests/test_config.py +121 -0
- greybeard-0.1.0/tests/test_mcp_server.py +136 -0
- greybeard-0.1.0/tests/test_models.py +88 -0
- greybeard-0.1.0/tests/test_modes.py +82 -0
- greybeard-0.1.0/tests/test_packs.py +173 -0
- greybeard-0.1.0/uv.lock +1202 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
OPENAI_API_KEY=sk-your-key-here
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
# github: [btotharye] # Uncomment and add your GitHub Sponsors username
|
|
4
|
+
# patreon: # Replace with a single Patreon username
|
|
5
|
+
# open_collective: # Replace with a single Open Collective username
|
|
6
|
+
# ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
+
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
# liberapay: # Replace with a single Liberapay username
|
|
10
|
+
# issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
12
|
+
# polar: # Replace with a single Polar username
|
|
13
|
+
# buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
|
14
|
+
# thanks_dev: # Replace with a single thanks.dev username
|
|
15
|
+
# custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a bug or unexpected behavior
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: ["bug", "triage"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for taking the time to report a bug! Please fill out the form below.
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: description
|
|
13
|
+
attributes:
|
|
14
|
+
label: Description
|
|
15
|
+
description: A clear and concise description of what the bug is.
|
|
16
|
+
placeholder: What happened?
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: reproduce
|
|
22
|
+
attributes:
|
|
23
|
+
label: Steps to Reproduce
|
|
24
|
+
description: How can we reproduce this issue?
|
|
25
|
+
placeholder: |
|
|
26
|
+
1. Configure greybeard with...
|
|
27
|
+
2. Run command...
|
|
28
|
+
3. See error...
|
|
29
|
+
validations:
|
|
30
|
+
required: true
|
|
31
|
+
|
|
32
|
+
- type: textarea
|
|
33
|
+
id: expected
|
|
34
|
+
attributes:
|
|
35
|
+
label: Expected Behavior
|
|
36
|
+
description: What did you expect to happen?
|
|
37
|
+
validations:
|
|
38
|
+
required: true
|
|
39
|
+
|
|
40
|
+
- type: textarea
|
|
41
|
+
id: actual
|
|
42
|
+
attributes:
|
|
43
|
+
label: Actual Behavior
|
|
44
|
+
description: What actually happened? Include error messages if applicable.
|
|
45
|
+
render: shell
|
|
46
|
+
validations:
|
|
47
|
+
required: true
|
|
48
|
+
|
|
49
|
+
- type: dropdown
|
|
50
|
+
id: backend
|
|
51
|
+
attributes:
|
|
52
|
+
label: LLM Backend
|
|
53
|
+
description: Which backend were you using?
|
|
54
|
+
options:
|
|
55
|
+
- OpenAI
|
|
56
|
+
- Anthropic
|
|
57
|
+
- Ollama
|
|
58
|
+
- LM Studio
|
|
59
|
+
- Other
|
|
60
|
+
validations:
|
|
61
|
+
required: true
|
|
62
|
+
|
|
63
|
+
- type: input
|
|
64
|
+
id: model
|
|
65
|
+
attributes:
|
|
66
|
+
label: Model
|
|
67
|
+
description: Which model were you using?
|
|
68
|
+
placeholder: e.g., gpt-4o, claude-3-5-sonnet, llama3.2
|
|
69
|
+
|
|
70
|
+
- type: textarea
|
|
71
|
+
id: version
|
|
72
|
+
attributes:
|
|
73
|
+
label: Version Information
|
|
74
|
+
description: Run `greybeard --version` and paste the output
|
|
75
|
+
render: shell
|
|
76
|
+
validations:
|
|
77
|
+
required: true
|
|
78
|
+
|
|
79
|
+
- type: input
|
|
80
|
+
id: os
|
|
81
|
+
attributes:
|
|
82
|
+
label: Operating System
|
|
83
|
+
placeholder: e.g., macOS 14.2, Ubuntu 22.04, Windows 11
|
|
84
|
+
|
|
85
|
+
- type: textarea
|
|
86
|
+
id: config
|
|
87
|
+
attributes:
|
|
88
|
+
label: Configuration
|
|
89
|
+
description: Paste your config (from `greybeard config show`). Redact API keys!
|
|
90
|
+
render: yaml
|
|
91
|
+
|
|
92
|
+
- type: textarea
|
|
93
|
+
id: additional
|
|
94
|
+
attributes:
|
|
95
|
+
label: Additional Context
|
|
96
|
+
description: Any other context, screenshots, or information that might help
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: true
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Documentation
|
|
4
|
+
url: https://greybeard.readthedocs.io
|
|
5
|
+
about: Check the documentation for guides and reference
|
|
6
|
+
- name: Discussions
|
|
7
|
+
url: https://github.com/btotharye/greybeard/discussions
|
|
8
|
+
about: Ask questions, share ideas, and discuss with the community
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: Content Pack Submission
|
|
2
|
+
description: Submit a new content pack for review
|
|
3
|
+
title: "[Pack]: "
|
|
4
|
+
labels: ["content-pack", "community"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for contributing a content pack! This helps the whole community.
|
|
10
|
+
|
|
11
|
+
- type: input
|
|
12
|
+
id: pack-name
|
|
13
|
+
attributes:
|
|
14
|
+
label: Pack Name
|
|
15
|
+
description: What's the name of your pack?
|
|
16
|
+
placeholder: e.g., security-engineer, sre-perspective
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: description
|
|
22
|
+
attributes:
|
|
23
|
+
label: Description
|
|
24
|
+
description: What perspective does this pack provide?
|
|
25
|
+
placeholder: This pack provides a security engineer's perspective, focusing on...
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
|
|
29
|
+
- type: dropdown
|
|
30
|
+
id: submission-type
|
|
31
|
+
attributes:
|
|
32
|
+
label: Submission Type
|
|
33
|
+
options:
|
|
34
|
+
- New pack for this repository (packs/ directory)
|
|
35
|
+
- Link to my pack repository
|
|
36
|
+
validations:
|
|
37
|
+
required: true
|
|
38
|
+
|
|
39
|
+
- type: textarea
|
|
40
|
+
id: pack-yaml
|
|
41
|
+
attributes:
|
|
42
|
+
label: Pack Content
|
|
43
|
+
description: If submitting to this repo, paste your pack YAML here
|
|
44
|
+
render: yaml
|
|
45
|
+
|
|
46
|
+
- type: input
|
|
47
|
+
id: pack-url
|
|
48
|
+
attributes:
|
|
49
|
+
label: Pack Repository URL
|
|
50
|
+
description: If you have a pack repository, link it here
|
|
51
|
+
placeholder: https://github.com/username/my-greybeard-packs
|
|
52
|
+
|
|
53
|
+
- type: textarea
|
|
54
|
+
id: example-output
|
|
55
|
+
attributes:
|
|
56
|
+
label: Example Output
|
|
57
|
+
description: Optional but helpful - show an example of a review using this pack
|
|
58
|
+
render: markdown
|
|
59
|
+
|
|
60
|
+
- type: checkboxes
|
|
61
|
+
id: checklist
|
|
62
|
+
attributes:
|
|
63
|
+
label: Pack Checklist
|
|
64
|
+
options:
|
|
65
|
+
- label: Pack follows the schema documented in docs/reference/pack-schema.md
|
|
66
|
+
required: true
|
|
67
|
+
- label: I've tested this pack with greybeard
|
|
68
|
+
required: true
|
|
69
|
+
- label: The perspective is clear and distinct from existing packs
|
|
70
|
+
required: true
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest a new feature or enhancement
|
|
3
|
+
title: "[Feature]: "
|
|
4
|
+
labels: ["enhancement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for suggesting a feature! Please describe what you'd like to see.
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: problem
|
|
13
|
+
attributes:
|
|
14
|
+
label: Problem Statement
|
|
15
|
+
description: Is your feature request related to a problem? Please describe.
|
|
16
|
+
placeholder: I'm frustrated when...
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: solution
|
|
22
|
+
attributes:
|
|
23
|
+
label: Proposed Solution
|
|
24
|
+
description: Describe the solution you'd like to see
|
|
25
|
+
placeholder: I'd like greybeard to...
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: alternatives
|
|
31
|
+
attributes:
|
|
32
|
+
label: Alternatives Considered
|
|
33
|
+
description: Have you considered any alternative solutions or workarounds?
|
|
34
|
+
|
|
35
|
+
- type: dropdown
|
|
36
|
+
id: type
|
|
37
|
+
attributes:
|
|
38
|
+
label: Feature Type
|
|
39
|
+
description: What kind of feature is this?
|
|
40
|
+
options:
|
|
41
|
+
- New LLM backend support
|
|
42
|
+
- New content pack
|
|
43
|
+
- CLI enhancement
|
|
44
|
+
- MCP integration improvement
|
|
45
|
+
- Documentation improvement
|
|
46
|
+
- Other
|
|
47
|
+
validations:
|
|
48
|
+
required: true
|
|
49
|
+
|
|
50
|
+
- type: textarea
|
|
51
|
+
id: additional
|
|
52
|
+
attributes:
|
|
53
|
+
label: Additional Context
|
|
54
|
+
description: Add any other context, examples, or screenshots about the feature request
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
<!-- Briefly describe what this PR does -->
|
|
4
|
+
|
|
5
|
+
## Type of Change
|
|
6
|
+
|
|
7
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
8
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
9
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
10
|
+
- [ ] Documentation update
|
|
11
|
+
- [ ] Content pack addition/update
|
|
12
|
+
- [ ] CI/CD or tooling change
|
|
13
|
+
|
|
14
|
+
## Changes Made
|
|
15
|
+
|
|
16
|
+
<!-- List the specific changes or provide more details -->
|
|
17
|
+
|
|
18
|
+
-
|
|
19
|
+
-
|
|
20
|
+
|
|
21
|
+
## Testing
|
|
22
|
+
|
|
23
|
+
<!-- Describe how you tested these changes -->
|
|
24
|
+
|
|
25
|
+
- [ ] Tests pass locally (`make test`)
|
|
26
|
+
- [ ] Linting passes (`make lint`)
|
|
27
|
+
- [ ] Formatting is correct (`make format-check`)
|
|
28
|
+
- [ ] Tested manually with: <!-- specify LLM backend and command -->
|
|
29
|
+
|
|
30
|
+
## Related Issues
|
|
31
|
+
|
|
32
|
+
<!-- Link any related issues: Closes #123, Fixes #456 -->
|
|
33
|
+
|
|
34
|
+
## Checklist
|
|
35
|
+
|
|
36
|
+
- [ ] My code follows the project's style guidelines
|
|
37
|
+
- [ ] I have performed a self-review of my code
|
|
38
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
39
|
+
- [ ] I have made corresponding changes to the documentation
|
|
40
|
+
- [ ] My changes generate no new warnings or errors
|
|
41
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
42
|
+
- [ ] New and existing tests pass locally with my changes
|
|
43
|
+
|
|
44
|
+
## Additional Notes
|
|
45
|
+
|
|
46
|
+
<!-- Any additional information, context, or screenshots -->
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# GitHub Repository Configuration
|
|
2
|
+
|
|
3
|
+
This file documents the recommended GitHub repository settings for greybeard.
|
|
4
|
+
|
|
5
|
+
## Repository Settings
|
|
6
|
+
|
|
7
|
+
### General
|
|
8
|
+
|
|
9
|
+
**Description:**
|
|
10
|
+
|
|
11
|
+
> CLI-first Staff/Principal engineer review assistant powered by LLMs. Works with OpenAI, Anthropic, Ollama, and more.
|
|
12
|
+
|
|
13
|
+
**Topics (keywords):**
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
code-review
|
|
17
|
+
llm
|
|
18
|
+
ai
|
|
19
|
+
staff-engineer
|
|
20
|
+
architecture
|
|
21
|
+
cli
|
|
22
|
+
openai
|
|
23
|
+
anthropic
|
|
24
|
+
ollama
|
|
25
|
+
python
|
|
26
|
+
mcp
|
|
27
|
+
model-context-protocol
|
|
28
|
+
code-quality
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Features:**
|
|
32
|
+
|
|
33
|
+
- ✅ Issues
|
|
34
|
+
- ✅ Projects
|
|
35
|
+
- ✅ Discussions
|
|
36
|
+
- ✅ Wiki (optional)
|
|
37
|
+
- ✅ Sponsorships (if configured in FUNDING.yml)
|
|
38
|
+
|
|
39
|
+
**Social Preview Image:**
|
|
40
|
+
Consider creating a 1280x640 image with:
|
|
41
|
+
|
|
42
|
+
- greybeard ASCII art
|
|
43
|
+
- Project name
|
|
44
|
+
- Tagline: "Staff-level code review from the command line"
|
|
45
|
+
|
|
46
|
+
### Branch Protection (for `main`)
|
|
47
|
+
|
|
48
|
+
**Required:**
|
|
49
|
+
|
|
50
|
+
- ✅ Require a pull request before merging
|
|
51
|
+
- ✅ Require status checks to pass before merging
|
|
52
|
+
- `test (3.11)`
|
|
53
|
+
- `test (3.12)`
|
|
54
|
+
- `test (3.13)`
|
|
55
|
+
- `lint`
|
|
56
|
+
- ✅ Require conversation resolution before merging
|
|
57
|
+
- ✅ Do not allow bypassing the above settings
|
|
58
|
+
|
|
59
|
+
**Optional:**
|
|
60
|
+
|
|
61
|
+
- Require linear history
|
|
62
|
+
- Include administrators (for solo maintainer, may want to disable)
|
|
63
|
+
|
|
64
|
+
### Security
|
|
65
|
+
|
|
66
|
+
**Advisories:**
|
|
67
|
+
|
|
68
|
+
- ✅ Enable private vulnerability reporting
|
|
69
|
+
|
|
70
|
+
**Dependabot:**
|
|
71
|
+
|
|
72
|
+
- ✅ Alerts enabled (configured via `.github/dependabot.yml`)
|
|
73
|
+
- ✅ Security updates enabled
|
|
74
|
+
|
|
75
|
+
**Code Scanning:**
|
|
76
|
+
|
|
77
|
+
- Consider enabling CodeQL for Python
|
|
78
|
+
|
|
79
|
+
### Automation
|
|
80
|
+
|
|
81
|
+
**GitHub Actions:**
|
|
82
|
+
See `.github/workflows/` for:
|
|
83
|
+
|
|
84
|
+
- `ci.yml` - Tests and linting on PRs
|
|
85
|
+
- `docs.yml` - Documentation builds
|
|
86
|
+
- `publish.yml` - PyPI publishing on releases
|
|
87
|
+
- `stale.yml` - Closes stale issues/PRs
|
|
88
|
+
|
|
89
|
+
### Community Standards
|
|
90
|
+
|
|
91
|
+
All files present:
|
|
92
|
+
|
|
93
|
+
- ✅ LICENSE
|
|
94
|
+
- ✅ README.md
|
|
95
|
+
- ✅ CODE_OF_CONDUCT.md
|
|
96
|
+
- ✅ CONTRIBUTING.md
|
|
97
|
+
- ✅ SECURITY.md
|
|
98
|
+
- ✅ Issue templates
|
|
99
|
+
- ✅ PR template
|
|
100
|
+
- ✅ Funding (optional)
|
|
101
|
+
|
|
102
|
+
## Environment Secrets
|
|
103
|
+
|
|
104
|
+
For PyPI publishing (after first manual upload), configure in repository settings:
|
|
105
|
+
|
|
106
|
+
**Environments → `pypi`:**
|
|
107
|
+
|
|
108
|
+
- No secrets needed (uses trusted publishing)
|
|
109
|
+
|
|
110
|
+
**Environments → `testpypi`:**
|
|
111
|
+
|
|
112
|
+
- No secrets needed (uses trusted publishing)
|
|
113
|
+
|
|
114
|
+
## Discussions Categories
|
|
115
|
+
|
|
116
|
+
Recommended categories:
|
|
117
|
+
|
|
118
|
+
- 💡 Ideas - Feature requests and suggestions
|
|
119
|
+
- 🙋 Q&A - Questions and answers
|
|
120
|
+
- 📣 Announcements - Project updates
|
|
121
|
+
- 🎨 Show and Tell - Share your content packs
|
|
122
|
+
- 💬 General - Everything else
|
|
123
|
+
|
|
124
|
+
## Labels
|
|
125
|
+
|
|
126
|
+
The issue templates will create these labels automatically:
|
|
127
|
+
|
|
128
|
+
- `bug`
|
|
129
|
+
- `enhancement`
|
|
130
|
+
- `triage`
|
|
131
|
+
- `content-pack`
|
|
132
|
+
- `community`
|
|
133
|
+
- `dependencies`
|
|
134
|
+
- `python`
|
|
135
|
+
- `github-actions`
|
|
136
|
+
- `stale`
|
|
137
|
+
|
|
138
|
+
Additional recommended labels:
|
|
139
|
+
|
|
140
|
+
- `good first issue`
|
|
141
|
+
- `help wanted`
|
|
142
|
+
- `documentation`
|
|
143
|
+
- `question`
|
|
144
|
+
- `wontfix`
|
|
145
|
+
- `duplicate`
|
|
146
|
+
|
|
147
|
+
## Applying These Settings
|
|
148
|
+
|
|
149
|
+
Most settings must be configured through the GitHub web UI:
|
|
150
|
+
|
|
151
|
+
1. Go to `https://github.com/btotharye/greybeard/settings`
|
|
152
|
+
2. Update **Description** and **Topics** under General
|
|
153
|
+
3. Configure **Branch protection rules** under Branches
|
|
154
|
+
4. Enable **Discussions** under General → Features
|
|
155
|
+
5. Review **Security** settings under Security & analysis
|
|
156
|
+
6. Create **Environments** (`pypi`, `testpypi`) under Environments
|
|
157
|
+
|
|
158
|
+
Note: The YAML files in `.github/` handle automation (workflows, issue templates, dependabot).
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Python dependencies
|
|
4
|
+
- package-ecosystem: "pip"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "weekly"
|
|
8
|
+
day: "monday"
|
|
9
|
+
open-pull-requests-limit: 5
|
|
10
|
+
labels:
|
|
11
|
+
- "dependencies"
|
|
12
|
+
- "python"
|
|
13
|
+
commit-message:
|
|
14
|
+
prefix: "chore(deps)"
|
|
15
|
+
groups:
|
|
16
|
+
dev-dependencies:
|
|
17
|
+
patterns:
|
|
18
|
+
- "pytest*"
|
|
19
|
+
- "ruff"
|
|
20
|
+
update-types:
|
|
21
|
+
- "minor"
|
|
22
|
+
- "patch"
|
|
23
|
+
docs-dependencies:
|
|
24
|
+
patterns:
|
|
25
|
+
- "mkdocs*"
|
|
26
|
+
- "pymdown-extensions"
|
|
27
|
+
update-types:
|
|
28
|
+
- "minor"
|
|
29
|
+
- "patch"
|
|
30
|
+
|
|
31
|
+
# GitHub Actions
|
|
32
|
+
- package-ecosystem: "github-actions"
|
|
33
|
+
directory: "/"
|
|
34
|
+
schedule:
|
|
35
|
+
interval: "weekly"
|
|
36
|
+
day: "monday"
|
|
37
|
+
labels:
|
|
38
|
+
- "dependencies"
|
|
39
|
+
- "github-actions"
|
|
40
|
+
commit-message:
|
|
41
|
+
prefix: "chore(ci)"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v4
|
|
23
|
+
with:
|
|
24
|
+
version: "latest"
|
|
25
|
+
|
|
26
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
27
|
+
run: uv python install ${{ matrix.python-version }}
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: uv sync --extra dev
|
|
31
|
+
|
|
32
|
+
- name: Run tests
|
|
33
|
+
run: uv run pytest --tb=short -q
|
|
34
|
+
|
|
35
|
+
- name: Upload coverage
|
|
36
|
+
if: matrix.python-version == '3.11'
|
|
37
|
+
uses: actions/upload-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: coverage
|
|
40
|
+
path: .coverage
|
|
41
|
+
|
|
42
|
+
lint:
|
|
43
|
+
name: Lint
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v4
|
|
48
|
+
|
|
49
|
+
- name: Install uv
|
|
50
|
+
uses: astral-sh/setup-uv@v4
|
|
51
|
+
with:
|
|
52
|
+
version: "latest"
|
|
53
|
+
|
|
54
|
+
- name: Set up Python
|
|
55
|
+
run: uv python install 3.11
|
|
56
|
+
|
|
57
|
+
- name: Install dependencies
|
|
58
|
+
run: uv sync --extra dev
|
|
59
|
+
|
|
60
|
+
- name: Run ruff
|
|
61
|
+
run: uv run ruff check .
|
|
62
|
+
|
|
63
|
+
- name: Check ruff formatting
|
|
64
|
+
run: uv run ruff format --check .
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- "docs/**"
|
|
8
|
+
- "mkdocs.yml"
|
|
9
|
+
- ".readthedocs.yaml"
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [main]
|
|
12
|
+
paths:
|
|
13
|
+
- "docs/**"
|
|
14
|
+
- "mkdocs.yml"
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
name: Build docs
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@v4
|
|
26
|
+
with:
|
|
27
|
+
version: "latest"
|
|
28
|
+
|
|
29
|
+
- name: Set up Python
|
|
30
|
+
run: uv python install 3.11
|
|
31
|
+
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: uv sync --extra docs
|
|
34
|
+
|
|
35
|
+
- name: Build docs
|
|
36
|
+
run: uv run mkdocs build --strict
|
|
37
|
+
|
|
38
|
+
- name: Upload docs artifact
|
|
39
|
+
uses: actions/upload-artifact@v4
|
|
40
|
+
with:
|
|
41
|
+
name: docs-site
|
|
42
|
+
path: site/
|
|
43
|
+
retention-days: 7
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch: # Allow manual trigger for testing
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Build distribution
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Install uv
|
|
17
|
+
uses: astral-sh/setup-uv@v4
|
|
18
|
+
with:
|
|
19
|
+
version: "latest"
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
run: uv python install 3.11
|
|
23
|
+
|
|
24
|
+
- name: Install build dependencies
|
|
25
|
+
run: uv pip install build
|
|
26
|
+
|
|
27
|
+
- name: Build package
|
|
28
|
+
run: uv run --python 3.11 python -m build
|
|
29
|
+
|
|
30
|
+
- name: Store the distribution packages
|
|
31
|
+
uses: actions/upload-artifact@v4
|
|
32
|
+
with:
|
|
33
|
+
name: python-package-distributions
|
|
34
|
+
path: dist/
|
|
35
|
+
|
|
36
|
+
publish-to-pypi:
|
|
37
|
+
name: Publish to PyPI
|
|
38
|
+
needs: [build]
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
environment:
|
|
41
|
+
name: pypi
|
|
42
|
+
url: https://pypi.org/p/greybeard
|
|
43
|
+
permissions:
|
|
44
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
45
|
+
|
|
46
|
+
steps:
|
|
47
|
+
- name: Download all the dists
|
|
48
|
+
uses: actions/download-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: python-package-distributions
|
|
51
|
+
path: dist/
|
|
52
|
+
|
|
53
|
+
- name: Publish distribution to PyPI
|
|
54
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
55
|
+
|
|
56
|
+
publish-to-testpypi:
|
|
57
|
+
name: Publish to TestPyPI
|
|
58
|
+
needs: [build]
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
if: github.event_name == 'workflow_dispatch' # Only on manual trigger
|
|
61
|
+
environment:
|
|
62
|
+
name: testpypi
|
|
63
|
+
url: https://test.pypi.org/p/greybeard
|
|
64
|
+
permissions:
|
|
65
|
+
id-token: write
|
|
66
|
+
|
|
67
|
+
steps:
|
|
68
|
+
- name: Download all the dists
|
|
69
|
+
uses: actions/download-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: python-package-distributions
|
|
72
|
+
path: dist/
|
|
73
|
+
|
|
74
|
+
- name: Publish distribution to TestPyPI
|
|
75
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
76
|
+
with:
|
|
77
|
+
repository-url: https://test.pypi.org/legacy/
|