Skip to content

Commit 8d1007a

Browse files
authored
Merge pull request #7 from FOI-Bioinformatics/v0.2.0
Release v0.2.0 - Production Ready
2 parents 0646bba + b6abe60 commit 8d1007a

File tree

159 files changed

+42431
-921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+42431
-921
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug or unexpected behavior
4+
title: "[BUG] "
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
11+
A clear and concise description of what the bug is.
12+
13+
## To Reproduce
14+
15+
Steps to reproduce the behavior:
16+
17+
1. Command or code used:
18+
```bash
19+
preprimer convert --input ... --output-dir ...
20+
```
21+
22+
2. Input file format:
23+
- [ ] VarVAMP (.tsv)
24+
- [ ] ARTIC (.bed)
25+
- [ ] Olivar (.csv)
26+
- [ ] STS (.sts.tsv)
27+
28+
3. Expected behavior:
29+
30+
31+
4. Actual behavior:
32+
33+
34+
## Error Message
35+
36+
If applicable, paste the full error message:
37+
38+
```
39+
Error message here
40+
```
41+
42+
## Environment
43+
44+
- PrePrimer version: [run `preprimer --version`]
45+
- Python version: [run `python --version`]
46+
- Operating System: [e.g., Ubuntu 22.04, macOS 13]
47+
- Installation method: [pip, source]
48+
49+
## Input File Sample
50+
51+
If possible, provide a minimal example input file that reproduces the issue:
52+
53+
```
54+
# Paste first few lines of input file here
55+
# (Remove any sensitive information)
56+
```
57+
58+
## Additional Context
59+
60+
Add any other context about the problem here (e.g., file size, number of amplicons, special characters).
61+
62+
## Checklist
63+
64+
- [ ] I have checked existing issues for duplicates
65+
- [ ] I have provided the PrePrimer version
66+
- [ ] I have included the error message (if applicable)
67+
- [ ] I have provided steps to reproduce
68+
- [ ] I have included a minimal example (if possible)
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or enhancement
4+
title: "[FEATURE] "
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Feature Description
10+
11+
A clear and concise description of the feature you'd like to see.
12+
13+
## Use Case
14+
15+
Describe the problem this feature would solve or the workflow it would improve:
16+
17+
**Example:**
18+
"I need to convert primers from X format to Y format, but currently PrePrimer doesn't support X format..."
19+
20+
## Proposed Solution
21+
22+
Describe how you envision this feature working:
23+
24+
1. User action:
25+
2. Expected behavior:
26+
3. Output:
27+
28+
## Alternatives Considered
29+
30+
Have you considered any alternative solutions or workarounds?
31+
32+
## Additional Context
33+
34+
Add any other context, screenshots, or examples about the feature request here.
35+
36+
### Related Formats
37+
38+
If this is a format-related request:
39+
40+
- Format name:
41+
- File extension:
42+
- Specification/documentation:
43+
- Example file (if available):
44+
45+
### Impact
46+
47+
How would this feature benefit PrePrimer users?
48+
49+
- [ ] Enables new use cases
50+
- [ ] Improves existing workflow
51+
- [ ] Addresses common user request
52+
- [ ] Increases compatibility with other tools
53+
54+
## Checklist
55+
56+
- [ ] I have searched existing issues for similar requests
57+
- [ ] I have provided a clear use case
58+
- [ ] I have described the proposed solution
59+
- [ ] I have considered alternatives

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Pull Request
2+
3+
## Description
4+
5+
Brief description of what this PR does and why.
6+
7+
Fixes #(issue number)
8+
9+
## Type of Change
10+
11+
- [ ] Bug fix (non-breaking change that fixes an issue)
12+
- [ ] New feature (non-breaking change that adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] Documentation update
15+
- [ ] Code refactoring
16+
- [ ] Performance improvement
17+
- [ ] Test coverage improvement
18+
19+
## Changes Made
20+
21+
Detailed list of changes:
22+
23+
- Added X
24+
- Modified Y
25+
- Fixed Z
26+
27+
## Testing
28+
29+
### Test Coverage
30+
31+
- [ ] New tests added for new functionality
32+
- [ ] All existing tests pass
33+
- [ ] Test coverage maintained or improved
34+
35+
```bash
36+
# Commands run for testing
37+
python -m pytest tests/ -v
38+
python -m pytest --cov=preprimer
39+
```
40+
41+
### Manual Testing
42+
43+
Describe manual testing performed:
44+
45+
1. Tested with dataset:
46+
2. Verified output:
47+
3. Checked edge cases:
48+
49+
## Documentation
50+
51+
- [ ] Code is commented where needed
52+
- [ ] Documentation updated (if applicable)
53+
- [ ] CHANGELOG.md updated
54+
- [ ] README.md updated (if applicable)
55+
56+
## Code Quality
57+
58+
- [ ] Code follows project style guide
59+
- [ ] Linting passes (`flake8 preprimer/`)
60+
- [ ] Formatting passes (`black --check preprimer/`)
61+
- [ ] Type checking passes (`mypy preprimer/`)
62+
- [ ] No security issues (`bandit -r preprimer/`)
63+
64+
## Performance
65+
66+
For features that may impact performance:
67+
68+
- [ ] Benchmarked before and after changes
69+
- [ ] No significant performance regression
70+
- [ ] Performance improvements documented
71+
72+
## Screenshots (if applicable)
73+
74+
Add screenshots or output examples if relevant.
75+
76+
## Breaking Changes
77+
78+
If this is a breaking change, describe:
79+
80+
1. What breaks:
81+
2. Migration path:
82+
3. Deprecation warnings (if applicable):
83+
84+
## Checklist
85+
86+
- [ ] My code follows the project's contribution guidelines
87+
- [ ] I have performed a self-review of my code
88+
- [ ] I have commented my code, particularly in hard-to-understand areas
89+
- [ ] I have updated the documentation accordingly
90+
- [ ] My changes generate no new warnings
91+
- [ ] I have added tests that prove my fix is effective or that my feature works
92+
- [ ] New and existing unit tests pass locally with my changes
93+
- [ ] Any dependent changes have been merged and published
94+
95+
## Additional Notes
96+
97+
Any additional information reviewers should know:

.github/workflows/README.md

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# GitHub Actions Workflows
2+
3+
Simplified CI/CD for PrePrimer.
4+
5+
## Active Workflows
6+
7+
### `ci.yml` - Continuous Integration
8+
9+
**Triggers:** Push to main/develop/v0.2.0, Pull requests
10+
11+
**What it does:**
12+
- **Test**: Runs full test suite on Ubuntu and macOS with Python 3.11, 3.12, 3.13
13+
- **Lint**: Checks code formatting, imports, linting, type checking, security
14+
15+
**Matrix:**
16+
- 2 operating systems × 3 Python versions = 6 test combinations
17+
- Parallel execution for speed
18+
19+
**Typical run time:** ~3-5 minutes
20+
21+
### `release.yml` - Release Build
22+
23+
**Triggers:** Version tags (v*.*.*)
24+
25+
**What it does:**
26+
1. Run full test suite
27+
2. Build wheel and source distribution
28+
3. Validate package with twine
29+
4. Calculate SHA256 checksums
30+
5. Create GitHub release with build artifacts
31+
32+
**Output:**
33+
- `preprimer-X.Y.Z.tar.gz` (source distribution)
34+
- `preprimer-X.Y.Z-py3-none-any.whl` (wheel)
35+
- `SHA256SUMS` (checksums)
36+
37+
**Typical run time:** ~2-3 minutes
38+
39+
## Usage
40+
41+
### Running CI
42+
43+
CI runs automatically on push/PR. Nothing to do!
44+
45+
### Creating a Release
46+
47+
```bash
48+
# 1. Tag the release
49+
git tag -a v1.0.0 -m "Release v1.0.0"
50+
git push origin v1.0.0
51+
52+
# 2. Workflow runs automatically
53+
# 3. Check Actions tab for progress
54+
# 4. Release appears in GitHub Releases
55+
```
56+
57+
### Manual Test Run
58+
59+
```bash
60+
# Trigger CI manually from Actions tab
61+
# Click "CI" → "Run workflow" → Select branch
62+
```
63+
64+
## What Was Removed
65+
66+
Previous workflows had 10+ separate jobs:
67+
- ❌ Separate smoke tests (now: single test job)
68+
- ❌ Property-based testing job (now: included in tests)
69+
- ❌ Security testing job (now: included in lint)
70+
- ❌ Performance benchmarks (now: run manually with pytest-benchmark)
71+
- ❌ Integration testing job (now: included in tests)
72+
- ❌ Mutation testing (now: run manually, too slow for CI)
73+
- ❌ Deployment checks (now: simplified)
74+
- ❌ Test summary job (redundant)
75+
76+
**Result:** 2 simple workflows instead of 3 complex ones
77+
78+
## Archived Workflows
79+
80+
Old workflows are kept as `.old` files for reference:
81+
- `test.yml.old` - Legacy quick tests
82+
- `comprehensive-testing.yml.old` - Over-engineered testing (13 jobs!)
83+
- `publish.yml.old` - Complex PyPI publishing with 6 stages
84+
85+
## Local Testing
86+
87+
Run the same checks locally before pushing:
88+
89+
```bash
90+
# Run tests
91+
python -m pytest tests/ --cov=preprimer -v
92+
93+
# Check formatting
94+
black --check preprimer/ tests/
95+
96+
# Check imports
97+
isort --check-only preprimer/ tests/
98+
99+
# Lint
100+
flake8 preprimer/ tests/ --max-line-length=88 --extend-ignore=E203,W503
101+
102+
# Type check
103+
mypy preprimer/ --ignore-missing-imports
104+
105+
# Security
106+
bandit -r preprimer/ -ll
107+
```
108+
109+
## Troubleshooting
110+
111+
### CI fails on "Check formatting"
112+
113+
```bash
114+
# Fix locally
115+
black preprimer/ tests/
116+
git add .
117+
git commit -m "style: Format code"
118+
```
119+
120+
### CI fails on "Check imports"
121+
122+
```bash
123+
# Fix locally
124+
isort preprimer/ tests/
125+
git add .
126+
git commit -m "style: Sort imports"
127+
```
128+
129+
### Release workflow doesn't trigger
130+
131+
- Ensure tag follows pattern: `v*.*.*` (e.g., `v1.0.0`)
132+
- Tag must be pushed: `git push origin v1.0.0`
133+
- Check Actions tab for workflow run
134+
135+
### Tests pass locally but fail in CI
136+
137+
- Check Python version (CI tests 3.11, 3.12, 3.13)
138+
- Check OS differences (CI tests Ubuntu + macOS)
139+
- Review CI logs in Actions tab
140+
141+
## Performance
142+
143+
**Before simplification:**
144+
- 10 jobs, many running sequentially
145+
- ~15-20 minutes for full run
146+
- Redundant test execution
147+
148+
**After simplification:**
149+
- 2 jobs, running in parallel
150+
- ~3-5 minutes for full run
151+
- Single test execution per configuration
152+
153+
**60-75% faster! 🚀**
154+
155+
---
156+
157+
**Last Updated:** 2024-10-14

0 commit comments

Comments
 (0)