Skip to content

Conversation

@GiggleLiu
Copy link
Member

Summary

This PR transforms BPDecoderPlus from a winter school training project into a professional, production-ready Python package following modern open-source standards.

Closes #28

What's Changed

🆕 Added

  • LICENSE file (MIT License) - Legal requirement for open source distribution
  • CONTRIBUTING.md - Development guidelines, setup instructions, and contribution process
  • CHANGELOG.md - Following Keep a Changelog format
  • .pre-commit-config.yaml - Automated code quality checks (ruff, security, file validation)
  • .editorconfig - Consistent coding styles across all editors
  • Project metadata in pyproject.toml:
    • Project URLs (Homepage, Documentation, Repository, Issues, Changelog)
    • Maintainers field
  • Development tooling:
    • Ruff configuration (linting & formatting, line-length: 100)
    • Updated dev dependencies: pytest, pytest-cov, ruff, pre-commit, mypy
    • New Makefile targets: format, lint, lint-fix, type-check, pre-commit, check, dev-setup

📦 Changed

  • Dataset reorganization - Single-source flat structure:
    • All dataset files moved from subdirectories to datasets/ root
    • Visualization PNGs moved to datasets/visualizations/
    • Updated CLI default path: datasets/noisy_circuitsdatasets
    • Updated documentation to reflect new structure
  • Documentation updates:
    • README.md focused on Python implementation
    • Removed winter school training references
    • Removed Julia code examples (kept as reference links)
  • Configuration improvements:
    • Fixed pyproject.toml structure (dependencies before project.urls)
    • Migrated deprecated tool.uv.dev-dependenciesdependency-groups.dev
  • File organization:
    • Moved lecture notes from docs/ to note/ directory
    • Updated .gitignore with development tools and binary file patterns

❌ Removed

  • Duplicate dataset files from subdirectories (circuits/, dems/, uais/, syndromes/, noisy_circuits/)
  • Julia code examples from README (kept as reference implementations)
  • Winter school training context from project description

Testing

✅ All 71 tests pass
✅ Package builds and imports correctly
✅ Dataset structure validated
✅ No regressions in functionality

Validation Checklist

  • LICENSE file exists (MIT)
  • pyproject.toml package path correct: packages = ["bpdecoderplus"]
  • All tests pass with new dataset structure
  • No duplicate dataset files (single-source structure)
  • No binary PDF/Typst files in docs/ (moved to note/)
  • All standard files present: CONTRIBUTING.md, CHANGELOG.md
  • Package imports correctly (v0.1.0)

Next Steps

After merging:

  1. Run make dev-setup to install pre-commit hooks
  2. Use new Makefile targets for development workflow
  3. Follow CONTRIBUTING.md for future contributions

🤖 Generated with Claude Code

Transform BPDecoderPlus from training project to production-ready package.
Resolves #28

## Added
- LICENSE file (MIT License)
- CONTRIBUTING.md with development guidelines and setup instructions
- CHANGELOG.md following Keep a Changelog format
- .pre-commit-config.yaml with ruff, security checks, and file validation
- .editorconfig for consistent coding styles across editors
- Project URLs in pyproject.toml (Homepage, Documentation, Repository, Issues)
- Maintainers field in package metadata
- Ruff configuration for linting and formatting (line-length: 100)
- Development dependencies: ruff, pre-commit, mypy
- New Makefile targets: format, lint, lint-fix, type-check, pre-commit, check, dev-setup

## Changed
- Reorganized dataset structure to single-source flat layout in datasets/
- Moved all dataset files from subdirectories to datasets/ root
- Moved visualization PNGs to datasets/visualizations/
- Updated CLI default dataset path from datasets/noisy_circuits to datasets
- Updated README.md to focus on Python implementation
- Updated dataset documentation to reflect new structure
- Fixed pyproject.toml structure (dependencies before project.urls)
- Migrated tool.uv.dev-dependencies to dependency-groups.dev
- Updated Makefile dataset generation paths
- Moved lecture notes from docs/ to note/ directory
- Updated .gitignore with development tools and binary file patterns

## Removed
- Duplicate dataset files from subdirectories (circuits/, dems/, uais/, syndromes/, noisy_circuits/)
- Julia code examples and references from README
- Winter school training references from project description

## Testing
- All 71 tests pass
- Package builds and imports correctly
- Dataset structure validated

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures BPDecoderPlus from a winter school training project into a professional, production-ready Python package for v0.1 release. The changes include adding standard open-source project files, reorganizing the dataset structure into a flat hierarchy, and modernizing the development toolchain.

Changes:

  • Added standard project files (LICENSE, CONTRIBUTING.md, CHANGELOG.md) and development tools (.pre-commit-config.yaml, .editorconfig)
  • Reorganized datasets from nested subdirectories to a flat structure in datasets/ root with visualizations separated
  • Updated CLI default output path from datasets/noisy_circuits to datasets with corresponding test updates

Reviewed changes

Copilot reviewed 17 out of 37 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_cli.py Updated test to verify new CLI default path datasets
src/bpdecoderplus/cli.py Changed CLI default output directory to datasets
pyproject.toml Added project metadata, URLs, maintainers; migrated dev dependencies; configured ruff; contains package path issue
note/lecture_note.typ Moved lecture notes to note/ directory (new comprehensive documentation)
datasets/*.stim, datasets/*.npz Dataset files reorganized to flat structure in root
datasets/visualizations/*.png Visualization files separated into subdirectory
datasets/syndromes/test.npz Test syndrome data (retained in subdirectory)
LICENSE Added MIT License for open source distribution

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

pyproject.toml Outdated

[tool.hatch.build.targets.wheel]
packages = ["src/bpdecoderplus"]
packages = ["bpdecoderplus"]
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package path configuration appears incorrect. The packages field should point to the source directory containing the package code. Since the package source is located at src/bpdecoderplus/, the correct configuration should be packages = ["src/bpdecoderplus"] rather than packages = ["bpdecoderplus"]. This may cause the package to fail to build or install correctly.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Copy link
Contributor

Copilot AI commented Jan 20, 2026

@GiggleLiu I've opened a new pull request, #36, to work on those changes. Once the pull request is ready, I'll request review from you.

* Initial plan

* fix: Correct package path configuration to src/bpdecoderplus

Co-authored-by: GiggleLiu <6257240+GiggleLiu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: GiggleLiu <6257240+GiggleLiu@users.noreply.github.com>
@GiggleLiu GiggleLiu merged commit e1cce29 into main Jan 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor on the completion of v0.1

2 participants