Skip to content

Commit bf2cde7

Browse files
Merge pull request #2 from muditbhargava66/v2.0.0-dev
Release v2.0.0: Complete Architecture Overhaul, PageFTL Integration, and Unified CLI
2 parents 3a43f9e + f13d0bc commit bf2cde7

123 files changed

Lines changed: 3938 additions & 9266 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,60 @@
11
---
22
name: Bug report
3-
about: Create a report to help us improve the 3D NAND Optimization Tool
4-
title: '[BUG] '
3+
about: Something is broken or produces incorrect results
4+
title: "[BUG] "
55
labels: bug
66
assignees: ''
77
---
88

99
## Describe the bug
10-
A clear and concise description of what the bug is.
1110

12-
## To Reproduce
13-
Steps to reproduce the behavior:
14-
1. Configure '...'
15-
2. Execute '...'
16-
3. See error
11+
<!-- A clear and concise description of what the bug is. -->
1712

1813
## Expected behavior
19-
A clear and concise description of what you expected to happen.
2014

21-
## Logs/Screenshots
22-
If applicable, add logs or screenshots to help explain your problem.
15+
<!-- What should happen? Include expected values where applicable (e.g. "WAF should be ≥ 1.0"). -->
16+
17+
## Actual behavior
18+
19+
<!-- What actually happens? Include error messages, incorrect metric values, etc. -->
20+
21+
## Reproduction steps
22+
23+
```bash
24+
# Minimum command to reproduce
25+
opennandlab run --config ... --workload ...
26+
```
27+
28+
```python
29+
# Or minimum Python snippet
30+
from opennandlab import Simulator
31+
...
32+
```
2333

2434
## Environment
25-
- OS: [e.g. Ubuntu 22.04, Windows 11]
26-
- Python version: [e.g. 3.9.12]
27-
- NAND Hardware (if applicable): [e.g. Simulator, Hardware XYZ]
28-
- Version [e.g. 1.1.0]
35+
36+
- OpenNANDLab version: <!-- `pip show opennandlab` -->
37+
- Python version: <!-- `python --version` -->
38+
- OS:
39+
- CPU/Architecture:
40+
41+
## Is this a correctness bug?
42+
43+
<!-- Tick all that apply -->
44+
45+
- [ ] ECC does not correct ≤ t errors
46+
- [ ] WAF is < 1.0
47+
- [ ] `write_page` then `read_page` returns wrong data
48+
- [ ] GC does not free any pages
49+
- [ ] RBER does not increase with P/E count
50+
- [ ] Other — describe below
51+
52+
## Relevant log output
53+
54+
```
55+
# Paste relevant log lines here
56+
```
2957

3058
## Additional context
31-
Add any other context about the problem here, such as modifications to configuration files or specific NAND parameters.
59+
60+
<!-- Anything else? Link to related issues or papers if this is a domain correctness question. -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: 3D NAND Optimization Tool Discussions
4-
url: https://github.com/muditbhargava66/3D-NAND-Flash-Storage-Optimization-Tool/discussions
4+
url: https://github.com/muditbhargava66/OpenNANDLab/discussions
55
about: Please ask and answer questions here.
66
- name: 3D NAND Optimization Tool Documentation
7-
url: https://github.com/muditbhargava66/3D-NAND-Flash-Storage-Optimization-Tool/blob/main/README.md
7+
url: https://github.com/muditbhargava66/OpenNANDLab/blob/main/README.md
88
about: Please check the documentation before reporting issues.
Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,41 @@
11
---
22
name: Feature request
3-
about: Suggest an idea for the 3D NAND Optimization Tool
4-
title: '[FEATURE] '
3+
about: Propose a new algorithm, module, or benchmark
4+
title: "[FEAT] "
55
labels: enhancement
66
assignees: ''
77
---
88

9-
## Is your feature request related to a problem? Please describe.
10-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
## Summary
1110

12-
## Describe the solution you'd like
13-
A clear and concise description of what you want to happen.
11+
<!-- One-sentence description of what you want to add. -->
1412

15-
## Describe alternatives you've considered
16-
A clear and concise description of any alternative solutions or features you've considered.
13+
## Motivation
1714

18-
## Which component would this feature affect?
19-
- [ ] NAND Defect Handling
20-
- [ ] Performance Optimization
21-
- [ ] Firmware Integration
22-
- [ ] NAND Characterization
23-
- [ ] User Interface
24-
- [ ] Other
15+
<!-- Why is this useful? What metric does it improve (WAF, BLER, latency, lifetime)?
16+
Link to a paper or reference if this is an algorithmic improvement. -->
2517

26-
## Additional context
27-
Add any other context or screenshots about the feature request here.
18+
## Proposed design
19+
20+
<!-- Describe the algorithm, data structure, or module structure you have in mind.
21+
For new GC policies, include the scoring function.
22+
For new ECC algorithms, include the key reference. -->
23+
24+
## Acceptance criteria
25+
26+
- [ ] All existing tests still pass
27+
- [ ] New tests cover the new feature
28+
- [ ] Docstrings added
29+
- [ ] CHANGELOG.md updated
30+
- [ ] If a new metric: documented in BENCHMARKS.md
31+
32+
## Priority / effort estimate
33+
34+
<!-- Optional: how important is this and how hard do you think it is? -->
35+
36+
Priority: <!-- P0 / P1 / P2 / P3 -->
37+
Effort: <!-- Days / weeks -->
38+
39+
## Related issues / PRs
40+
41+
<!-- Link related issues or papers here. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 63 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,66 @@
1-
## Description
2-
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
1+
## Summary
32

4-
Fixes # (issue)
3+
<!-- One paragraph: what does this PR do and why? -->
4+
5+
Closes #<!-- issue number -->
6+
7+
---
58

69
## Type of change
7-
Please delete options that are not relevant.
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-
- [ ] Code refactoring (no functional changes)
14-
- [ ] Performance improvement
15-
16-
## How Has This Been Tested?
17-
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
18-
19-
- [ ] Test A
20-
- [ ] Test B
21-
22-
## Checklist:
23-
- [ ] My code follows the style guidelines of this project
24-
- [ ] I have performed a self-review of my own code
25-
- [ ] I have commented my code, particularly in hard-to-understand areas
26-
- [ ] I have made corresponding changes to the documentation
27-
- [ ] My changes generate no new warnings
28-
- [ ] I have added tests that prove my fix is effective or that my feature works
29-
- [ ] New and existing unit tests pass locally with my changes
30-
- [ ] Any dependent changes have been merged and published in downstream modules
10+
11+
- [ ] Bug fix — correctness issue in critical path (ECC, FTL, GC, WL)
12+
- [ ] Feature — new module or algorithm
13+
- [ ] Performance improvement — same correctness, faster
14+
- [ ] Refactor — no behavior change
15+
- [ ] Documentation
16+
- [ ] CI / tooling
17+
18+
---
19+
20+
## Correctness checklist
21+
22+
For any change touching the simulator's critical path (write_page, read_page, GC, ECC):
23+
24+
- [ ] `write_page → read_page` round-trip returns original data
25+
- [ ] WAF ≥ 1.0 on all workloads
26+
- [ ] BCH corrects exactly t errors (not t-1, not t+1)
27+
- [ ] Wear leveling stddev decreases or stays flat over time
28+
- [ ] No placeholder comments (`# TODO`, `# ... (no implementation)`) in critical paths
29+
30+
---
31+
32+
## Test coverage
33+
34+
- [ ] Unit tests added for all changed modules
35+
- [ ] Hypothesis property tests added if this touches ECC, FTL, or WL
36+
- [ ] Integration test updated if the write/read pipeline changed
37+
- [ ] `pytest --cov` still reports ≥ 80%
38+
39+
---
40+
41+
## Code quality
42+
43+
- [ ] `mypy src/` passes with 0 errors
44+
- [ ] `ruff check src/ tests/` reports 0 issues
45+
- [ ] All new public APIs have NumPy-style docstrings
46+
- [ ] CHANGELOG.md updated under `[Unreleased]`
47+
- [ ] ARCHITECTURE.md updated if the internal design changed
48+
- [ ] BENCHMARKS.md updated if new metrics or results are introduced
49+
50+
---
51+
52+
## Performance impact
53+
54+
<!-- If this changes any data structure or algorithm, fill this in.
55+
Otherwise delete this section. -->
56+
57+
| Operation | Before | After | Notes |
58+
|---|---|---|---|
59+
| Wear leveling select | O(N) | O(log N) | min-heap |
60+
61+
---
62+
63+
## Screenshots / plots
64+
65+
<!-- For visualization or dashboard changes, include a screenshot. -->
66+
<!-- For ECC or reliability changes, include a BLER or RBER curve if possible. -->

.github/workflows/build.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.9", "3.10", "3.11", "3.12"]
17+
python-version: ["3.10", "3.11", "3.12"]
1818

1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222

2323
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v5
24+
uses: actions/setup-python@v6
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727
cache: 'pip' # Automatic caching
@@ -42,13 +42,6 @@ jobs:
4242
--cov-report=xml \
4343
--cov-report=term
4444
45-
- name: Upload coverage to Codecov
46-
uses: codecov/codecov-action@v5
47-
with:
48-
files: ./coverage.xml
49-
flags: unittests
50-
verbose: true
51-
5245
- name: List installed packages (debug)
5346
run: pip list
5447
if: always() # Runs even if previous steps fail

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main", "v2.0.0-dev" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v6
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v6
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -e .[dev]
27+
28+
- name: Run tests with coverage
29+
run: |
30+
pytest --cov=src --cov-report=xml

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
lint:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v6
1414
- name: Set up Python
15-
uses: actions/setup-python@v5
15+
uses: actions/setup-python@v6
1616
with:
1717
python-version: '3.10'
1818
- name: Install dependencies

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
pypi-publish:
9+
name: Build and publish Python distribution to PyPI
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write # IMPORTANT: mandatory for trusted publishing
13+
contents: read # For checkout
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v6
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v6
21+
with:
22+
python-version: "3.10"
23+
24+
- name: Install build tools
25+
run: python -m pip install --upgrade pip build
26+
27+
- name: Build distribution
28+
run: python -m build
29+
30+
- name: Publish to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ results/
9999
*.log
100100

101101
# Configuration
102-
resources/config/secret.yaml
102+
docs/resources/config/secret.yaml
103103
config/local.yaml
104104
*.env
105105
.env.*
@@ -158,4 +158,4 @@ backup/
158158
*-backup
159159

160160
# Project-specific ignores
161-
resources/config/secret.yaml
161+
docs/resources/config/secret.yaml

0 commit comments

Comments
 (0)