|
| 1 | +# Production Readiness Checklist |
| 2 | + |
| 3 | +This document tracks what needs to be done before shipping Ferrum to production (e.g., publishing to crates.io). |
| 4 | + |
| 5 | +## ✅ Completed |
| 6 | + |
| 7 | +- [x] All critical parsing bugs fixed (15/15 tests passing) |
| 8 | +- [x] Comprehensive test suite |
| 9 | +- [x] CI/CD pipeline setup |
| 10 | +- [x] Basic documentation |
| 11 | +- [x] Examples provided |
| 12 | +- [x] Author information updated |
| 13 | +- [x] AI Assistant Guide in README |
| 14 | + |
| 15 | +## 🔴 Critical (Must Fix Before Release) |
| 16 | + |
| 17 | +### 1. Fix Clippy Warnings |
| 18 | +**Status**: ⚠️ 3 warnings in `fortran-lexer` |
| 19 | +**Location**: `fortran-lexer/src/lexer.rs` |
| 20 | + |
| 21 | +- [ ] **Line 59**: Remove unused `source` field from `FreeFormatLexer` struct |
| 22 | + ```rust |
| 23 | + // Current: pub struct FreeFormatLexer<'a> { source: &'a str, ... } |
| 24 | + // Fix: Remove `source` field or mark with #[allow(dead_code)] if needed later |
| 25 | + ``` |
| 26 | + |
| 27 | +- [ ] **Line 111**: Fix unnecessary closure in `unwrap_or_else` |
| 28 | + ```rust |
| 29 | + // Current: .ok_or_else(|| LexError::UnexpectedChar { ... }) |
| 30 | + // Fix: Use .ok_or(LexError::UnexpectedChar { ... }) instead |
| 31 | + ``` |
| 32 | + |
| 33 | +- [ ] **Line 411**: Simplify `map_or` usage |
| 34 | + ```rust |
| 35 | + // Current: self.chars.peek().map_or(false, |&ch| ch == expected) |
| 36 | + // Fix: self.chars.peek().map_or(false, |&ch| ch == expected) can use matches! macro |
| 37 | + ``` |
| 38 | + |
| 39 | +**Command to check**: `cargo clippy --all -- -D warnings` |
| 40 | + |
| 41 | +### 2. Complete Cargo.toml Metadata |
| 42 | +**Status**: ✅ fortran-lexer done, ⚠️ others complete |
| 43 | + |
| 44 | +- [x] fortran-lexer: description, keywords, categories added |
| 45 | +- [x] fortran-parser: description, keywords, categories already present |
| 46 | +- [x] fortran-ast: description, keywords, categories already present |
| 47 | +- [x] Author information updated in workspace Cargo.toml |
| 48 | + |
| 49 | +### 3. Add Comprehensive Rustdoc Documentation |
| 50 | +**Status**: ⚠️ Basic docs exist, need enhancement |
| 51 | + |
| 52 | +- [ ] Add doc comments to all public APIs |
| 53 | +- [ ] Add usage examples to key functions |
| 54 | +- [ ] Document error conditions |
| 55 | +- [ ] Add examples module with practical use cases |
| 56 | +- [ ] Ensure all public types have `#[doc]` attributes |
| 57 | + |
| 58 | +**Command to check**: `cargo doc --no-deps --all --open` |
| 59 | + |
| 60 | +## 🟡 Important (Should Fix for Quality) |
| 61 | + |
| 62 | +### 4. Create CHANGELOG.md |
| 63 | +**Status**: ❌ Not created |
| 64 | + |
| 65 | +- [ ] Create `CHANGELOG.md` following [Keep a Changelog](https://keepachangelog.com/) format |
| 66 | +- [ ] Document all breaking changes |
| 67 | +- [ ] Document new features |
| 68 | +- [ ] Document bug fixes |
| 69 | +- [ ] Link to issues/PRs where relevant |
| 70 | + |
| 71 | +### 5. Add More Examples |
| 72 | +**Status**: ⚠️ Basic examples exist |
| 73 | + |
| 74 | +- [ ] Real-world usage examples (parsing actual FORTRAN files) |
| 75 | +- [ ] Error handling examples |
| 76 | +- [ ] Performance optimization examples |
| 77 | +- [ ] Integration examples (using multiple crates together) |
| 78 | + |
| 79 | +### 6. Test Coverage Enhancement |
| 80 | +**Status**: ⚠️ Good coverage, but can improve |
| 81 | + |
| 82 | +- [ ] Add doc tests for public APIs |
| 83 | +- [ ] Add edge case tests |
| 84 | +- [ ] Add error path tests |
| 85 | +- [ ] Add fuzz testing (optional but recommended) |
| 86 | +- [ ] Test with real-world FORTRAN codebases |
| 87 | + |
| 88 | +### 7. Version Management |
| 89 | +**Status**: ✅ 0.1.0 is appropriate for initial release |
| 90 | + |
| 91 | +- [x] Version 0.1.0 set (appropriate for initial release) |
| 92 | +- [ ] Document versioning strategy (semver) |
| 93 | +- [ ] Set up release tags and branches if needed |
| 94 | + |
| 95 | +## 🟢 Nice to Have (Can Be Done Post-Release) |
| 96 | + |
| 97 | +### 8. Security Audit |
| 98 | +**Status**: ⚠️ Not done |
| 99 | + |
| 100 | +- [ ] Run `cargo audit` (requires `cargo-audit` tool) |
| 101 | +- [ ] Review dependencies for known vulnerabilities |
| 102 | +- [ ] Document security policy |
| 103 | + |
| 104 | +### 9. Performance Benchmarks |
| 105 | +**Status**: ⚠️ Benchmarks exist but need documentation |
| 106 | + |
| 107 | +- [x] Criterion benchmarks exist for lexer and parser |
| 108 | +- [ ] Document performance characteristics |
| 109 | +- [ ] Add performance regression tests |
| 110 | +- [ ] Publish benchmark results |
| 111 | + |
| 112 | +### 10. API Stability |
| 113 | +**Status**: ⚠️ Not explicitly marked |
| 114 | + |
| 115 | +- [ ] Mark APIs as stable/unstable if using unstable features |
| 116 | +- [ ] Document breaking change policy |
| 117 | +- [ ] Consider adding `#[deprecated]` attributes for future changes |
| 118 | + |
| 119 | +### 11. Publishing to crates.io |
| 120 | +**Status**: ❌ Not published |
| 121 | + |
| 122 | +- [ ] Create crates.io accounts |
| 123 | +- [ ] Test publishing to a test index first |
| 124 | +- [ ] Verify all metadata is correct |
| 125 | +- [ ] Publish in order: fortran-lexer → fortran-ast → fortran-parser |
| 126 | +- [ ] Verify published crates work correctly |
| 127 | + |
| 128 | +### 12. Additional Documentation |
| 129 | +**Status**: ⚠️ Basic docs exist |
| 130 | + |
| 131 | +- [ ] Architecture documentation |
| 132 | +- [ ] Contributing guide (beyond what's in README) |
| 133 | +- [ ] Code of conduct (optional but recommended) |
| 134 | +- [ ] Security policy (SECURITY.md) |
| 135 | +- [ ] License file verified (✅ already exists) |
| 136 | + |
| 137 | +## 🚀 Release Checklist |
| 138 | + |
| 139 | +When ready to release: |
| 140 | + |
| 141 | +1. [ ] Fix all critical items above |
| 142 | +2. [ ] Run `cargo test --all` - ensure all tests pass |
| 143 | +3. [ ] Run `cargo clippy --all -- -D warnings` - ensure no warnings |
| 144 | +4. [ ] Run `cargo fmt --all` - ensure code is formatted |
| 145 | +5. [ ] Update CHANGELOG.md with release notes |
| 146 | +6. [ ] Update version numbers if needed |
| 147 | +7. [ ] Create git tag for release |
| 148 | +8. [ ] Publish to crates.io (if applicable) |
| 149 | +9. [ ] Create GitHub release |
| 150 | +10. [ ] Announce release (if applicable) |
| 151 | + |
| 152 | +## 📊 Current Status Summary |
| 153 | + |
| 154 | +- **Critical Items**: 3 remaining (all clippy warnings) |
| 155 | +- **Important Items**: 4 remaining (docs, changelog, examples, tests) |
| 156 | +- **Nice to Have**: 5 items (can be done post-release) |
| 157 | + |
| 158 | +**Estimated Time to Production-Ready**: |
| 159 | +- Fix critical items: ~30 minutes |
| 160 | +- Fix important items: ~2-3 hours |
| 161 | +- Nice to have: Can be done incrementally |
| 162 | + |
| 163 | +## 🎯 Recommendation |
| 164 | + |
| 165 | +**For initial release (0.1.0)**: |
| 166 | +1. Fix the 3 clippy warnings (critical) |
| 167 | +2. Add basic CHANGELOG.md (important) |
| 168 | +3. Enhance a few key doc comments (important) |
| 169 | +4. Ship it! 🚀 |
| 170 | + |
| 171 | +The codebase is functionally complete and well-tested. The remaining items can be addressed in subsequent releases. |
| 172 | + |
0 commit comments