Skip to content

Commit c43dc5b

Browse files
GeneAIclaude
andcommitted
feat: Add production infrastructure (Phase 1-3 Quick Wins)
Infrastructure & Automation: - Add GitHub Actions CI/CD workflows (ci.yml, api-tests.yml, release.yml) - Add pre-commit hooks (.pre-commit-config.yaml) - Add Makefile for common development tasks - Add PRODUCTION_ROADMAP.md with detailed 4-week plan Community & Documentation: - Add CONTRIBUTING.md with development workflow - Add SECURITY.md with security policy - Add CODE_OF_CONDUCT.md (Contributor Covenant 2.1) - Add GitHub issue templates (bug report, feature request) - Add pull request template Project Cleanup: - Remove temporary development markdown files - Professional repository structure Features: - CI runs on all PRs (linting, formatting, type checking, tests) - API tests run manually (prevent accidental costs) - Automated PyPI releases on git tags - Pre-commit hooks enforce code quality - Makefile simplifies development workflows This establishes production-grade infrastructure for the v2.0 release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 6a5e41a commit c43dc5b

19 files changed

+1790
-1418
lines changed
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
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 with as much detail as possible.
10+
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: Description
15+
description: A clear description of the bug
16+
placeholder: What happened? What did you expect to happen?
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: reproduction
22+
attributes:
23+
label: Steps to Reproduce
24+
description: Steps to reproduce the behavior
25+
placeholder: |
26+
1. Run command '...'
27+
2. With config '...'
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 you expected to happen
37+
placeholder: The command should have...
38+
validations:
39+
required: true
40+
41+
- type: textarea
42+
id: actual
43+
attributes:
44+
label: Actual Behavior
45+
description: What actually happened (include error messages, stack traces)
46+
placeholder: |
47+
Error: ...
48+
Traceback: ...
49+
render: shell
50+
validations:
51+
required: true
52+
53+
- type: input
54+
id: version
55+
attributes:
56+
label: MemDocs Version
57+
description: Run `memdocs --version` or check `pip show memdocs`
58+
placeholder: "2.0.0"
59+
validations:
60+
required: true
61+
62+
- type: input
63+
id: python-version
64+
attributes:
65+
label: Python Version
66+
description: Run `python --version`
67+
placeholder: "3.12.0"
68+
validations:
69+
required: true
70+
71+
- type: input
72+
id: os
73+
attributes:
74+
label: Operating System
75+
placeholder: "macOS 14.0, Ubuntu 22.04, Windows 11"
76+
validations:
77+
required: true
78+
79+
- type: textarea
80+
id: config
81+
attributes:
82+
label: Configuration
83+
description: Your `.memdocs.yml` configuration (remove any sensitive info)
84+
placeholder: |
85+
version: 1
86+
policies:
87+
default_scope: file
88+
...
89+
render: yaml
90+
91+
- type: textarea
92+
id: logs
93+
attributes:
94+
label: Logs
95+
description: Any relevant log output
96+
placeholder: Paste logs here
97+
render: shell
98+
99+
- type: dropdown
100+
id: severity
101+
attributes:
102+
label: Severity
103+
description: How severe is this bug?
104+
options:
105+
- Low (minor inconvenience)
106+
- Medium (affects functionality)
107+
- High (blocks major functionality)
108+
- Critical (data loss or security issue)
109+
validations:
110+
required: true
111+
112+
- type: checkboxes
113+
id: checks
114+
attributes:
115+
label: Checklist
116+
options:
117+
- label: I have searched existing issues to make sure this is not a duplicate
118+
required: true
119+
- label: I have provided all requested information
120+
required: true
121+
- label: I have removed any sensitive information from logs and config
122+
required: true
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement
3+
title: "[Feature]: "
4+
labels: ["enhancement", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for suggesting a feature! Please describe your idea in detail.
10+
11+
- type: textarea
12+
id: problem
13+
attributes:
14+
label: Problem Statement
15+
description: What problem does this feature solve?
16+
placeholder: I'm always frustrated when...
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: solution
22+
attributes:
23+
label: Proposed Solution
24+
description: How would you like this to work?
25+
placeholder: Add a command that...
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: alternatives
31+
attributes:
32+
label: Alternatives Considered
33+
description: What other solutions have you considered?
34+
placeholder: I could use... but that doesn't work because...
35+
36+
- type: textarea
37+
id: use-case
38+
attributes:
39+
label: Use Case
40+
description: Describe a specific scenario where this would be useful
41+
placeholder: |
42+
When working on large monorepos...
43+
I need to...
44+
So that...
45+
46+
- type: textarea
47+
id: examples
48+
attributes:
49+
label: Examples
50+
description: Show examples of how this would work
51+
placeholder: |
52+
```bash
53+
memdocs review --new-feature value
54+
```
55+
56+
- type: dropdown
57+
id: impact
58+
attributes:
59+
label: Expected Impact
60+
description: Who would benefit from this feature?
61+
options:
62+
- Just me
63+
- Small group of users
64+
- Many users
65+
- All users
66+
validations:
67+
required: true
68+
69+
- type: dropdown
70+
id: priority
71+
attributes:
72+
label: Priority
73+
description: How important is this to you?
74+
options:
75+
- Nice to have
76+
- Would be helpful
77+
- Important
78+
- Critical for my workflow
79+
validations:
80+
required: true
81+
82+
- type: checkboxes
83+
id: contribution
84+
attributes:
85+
label: Contribution
86+
options:
87+
- label: I would be willing to help implement this feature
88+
- label: I would be willing to test this feature
89+
90+
- type: checkboxes
91+
id: checks
92+
attributes:
93+
label: Checklist
94+
options:
95+
- label: I have searched existing issues/PRs for similar requests
96+
required: true
97+
- label: This is a single, focused feature request (not multiple features)
98+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
## Description
2+
3+
<!-- Provide a clear description of your changes -->
4+
5+
## Type of Change
6+
7+
<!-- Check the relevant boxes -->
8+
9+
- [ ] Bug fix (non-breaking change which fixes an issue)
10+
- [ ] New feature (non-breaking change which adds functionality)
11+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12+
- [ ] Documentation update
13+
- [ ] Performance improvement
14+
- [ ] Code refactoring
15+
- [ ] Test improvements
16+
- [ ] Dependency updates
17+
18+
## Related Issues
19+
20+
<!-- Link to related issues using keywords: Fixes #123, Closes #456, Related to #789 -->
21+
22+
Fixes #
23+
24+
## Changes Made
25+
26+
<!-- List the main changes -->
27+
28+
-
29+
-
30+
-
31+
32+
## Testing
33+
34+
<!-- Describe the tests you ran and provide instructions to reproduce -->
35+
36+
### Test Coverage
37+
38+
- [ ] All tests pass (`make test`)
39+
- [ ] Coverage is maintained or improved
40+
- [ ] New tests added for new functionality
41+
42+
### Manual Testing
43+
44+
<!-- Describe manual testing steps -->
45+
46+
1.
47+
2.
48+
3.
49+
50+
## Screenshots / Demo
51+
52+
<!-- If applicable, add screenshots or demo GIFs -->
53+
54+
## Checklist
55+
56+
### Code Quality
57+
58+
- [ ] Code follows the project's style guidelines (`make lint` passes)
59+
- [ ] Code is properly formatted (`make format` run)
60+
- [ ] Type hints added for new functions (`make type-check` passes)
61+
- [ ] Docstrings added/updated (Google style)
62+
- [ ] No new warnings introduced
63+
64+
### Testing
65+
66+
- [ ] Unit tests added/updated
67+
- [ ] Integration tests added (if applicable)
68+
- [ ] All tests pass locally
69+
- [ ] API tests pass (if modified API integration)
70+
- [ ] Coverage ≥ 65% (target: 85%)
71+
72+
### Documentation
73+
74+
- [ ] README.md updated (if needed)
75+
- [ ] CHANGELOG.md updated under "Unreleased"
76+
- [ ] Docstrings updated
77+
- [ ] Examples updated (if applicable)
78+
- [ ] Configuration docs updated (if config changed)
79+
80+
### Security
81+
82+
- [ ] No secrets/API keys in code
83+
- [ ] Input validation added
84+
- [ ] Error messages don't leak sensitive info
85+
- [ ] Dependencies scanned for vulnerabilities
86+
87+
### Backwards Compatibility
88+
89+
- [ ] No breaking changes (or documented in CHANGELOG)
90+
- [ ] Migration guide provided (if breaking changes)
91+
- [ ] Deprecation warnings added (if deprecating features)
92+
93+
## Performance Impact
94+
95+
<!-- Describe any performance implications -->
96+
97+
- [ ] No significant performance impact
98+
- [ ] Performance improved
99+
- [ ] Performance may be affected (details below)
100+
101+
**Details:**
102+
103+
## Additional Notes
104+
105+
<!-- Any additional information for reviewers -->
106+
107+
## Reviewer Checklist
108+
109+
<!-- For reviewers -->
110+
111+
- [ ] Code reviewed
112+
- [ ] Tests reviewed
113+
- [ ] Documentation reviewed
114+
- [ ] Approved for merge

.github/workflows/api-tests.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: API Integration Tests
2+
3+
on:
4+
workflow_dispatch: # Manual trigger only
5+
inputs:
6+
reason:
7+
description: 'Reason for running API tests (costs money)'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
api-tests:
13+
name: Run API Tests
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
cache: 'pip'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -e ".[dev,embeddings]"
29+
30+
- name: Run API integration tests
31+
env:
32+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
33+
run: |
34+
pytest -m api -v --tb=short
35+
36+
- name: Comment on PR
37+
if: github.event_name == 'pull_request'
38+
uses: actions/github-script@v7
39+
with:
40+
script: |
41+
github.rest.issues.createComment({
42+
issue_number: context.issue.number,
43+
owner: context.repo.owner,
44+
repo: context.repo.name,
45+
body: '✅ API integration tests passed!\n\n**Note:** These tests make real API calls and cost approximately $0.10-0.20.\n\n**Reason:** ${{ github.event.inputs.reason }}'
46+
})

0 commit comments

Comments
 (0)