-
Notifications
You must be signed in to change notification settings - Fork 1
Rename package from chipflow_lib to chipflow #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
robtaylor
wants to merge
7
commits into
refactor/restructure-codebase
Choose a base branch
from
rename-chipflow
base: refactor/restructure-codebase
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Phase 1 & 2 of doctest improvements: - Fix import path in chipflow-toml-guide.rst doctest (_parse_config_file from config.parser) - Add doctest_global_setup in conf.py with common imports for test examples - Existing doctest now passes The global setup imports common modules (Amaranth, ChipFlow signatures) so that doctests can focus on demonstrating API usage without repetitive imports. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Phase 3 of doctest improvements: - Convert complete MySoC examples to testcode blocks with assertions - Two examples converted: using-pin-signatures.rst and architecture.rst - Examples now validate that classes can be instantiated correctly - All doctests pass (3 tests total) Strategy: Convert only complete, self-contained examples that use documented public APIs. Keep illustrative fragments as code-block for readability. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Phase 4 of doctest improvements: - Add detailed comments in conf.py explaining testing philosophy - Clarify when to use testcode vs code-block - Document the selective testing approach for maintainability - Provide guidance for future contributors The strategy balances automatic validation with documentation readability, testing complete examples while keeping fragments illustrative. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Rename the main package from chipflow_lib to chipflow, maintaining full backward compatibility through a compatibility shim. Changes: - Renamed chipflow_lib/ directory to chipflow/ - Updated all internal imports from chipflow_lib to chipflow - Created chipflow_lib/ backward compatibility package that re-exports from chipflow with deprecation warnings - Updated pyproject.toml package name and references - Updated all documentation references from chipflow_lib to chipflow - Updated test imports and mock patches - Changed simulatable_interface default base from "com.chipflow.chipflow_lib" to "com.chipflow.chipflow" The chipflow_lib backward compatibility shim: - Shows deprecation warning on import - Re-exports all symbols from chipflow via __path__ manipulation - Allows existing code using chipflow_lib to continue working - Will be maintained temporarily before removal in future version All tests pass with the new package structure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
|
Replace wildcard import in chipflow_lib with explicit minimal API based on
actual usage in chipflow-digital-ip and chipflow-examples repositories.
Changes:
- chipflow_lib/__init__.py: Only export ChipFlowError, __version__, and
internal API functions (_parse_config, etc.)
- chipflow_lib/platforms/__init__.py: Stub module exporting pin signatures
and software build utilities used by dependent packages
- chipflow_lib/steps/{board,sim,software}.py: Stub modules exporting step
classes used by chipflow-examples
- chipflow_lib/config.py: Stub module proxying to chipflow.config
- tests/fixtures/mock.toml: Updated step references to use new module names
All backward compatibility stubs now show deprecation warnings encouraging
users to migrate to the new 'chipflow' package name.
Tests: 37 passed, 4 skipped. All backward compatibility imports verified.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add noqa: E402 annotations to imports that intentionally come after deprecation warnings. The imports need to be after warnings.warn() so users see the deprecation message when they import these modules. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
JTAGSignature is used by chipflow-examples mcu_soc project but was missing from the backward compatibility stub exports. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR renames the main package from
chipflow_libtochipflow, maintaining full backward compatibility through a compatibility shim.Changes Made
Package Structure
chipflow_lib/directory tochipflow/chipflow_lib/backward compatibility package that:chipflowvia__path__manipulationchipflow_libto continue working without modificationsCode Updates
chipflow_libtochipflowpyproject.toml:chipflow-lib→chipflowchipflow_lib.cli:run→chipflow.cli:runsimulatable_interface():com.chipflow.chipflow_lib→com.chipflow.chipflowDocumentation
chipflow_libtochipflowdocs/conf.pyto import fromchipflow.rstfiles with new package nameTests
chipflowchipflow_lib.*tochipflow.*Backward Compatibility
The
chipflow_libcompatibility shim ensures existing code continues to work:The deprecation warning encourages users to update:
Testing
✅ All 37 tests pass
✅ Backward compatibility verified -
import chipflow_libworks with deprecation warning✅ Submodule imports work:
from chipflow_lib.platforms import UARTSignature✅ New imports work:
from chipflow.platforms import UARTSignatureMigration Path
Users can migrate gradually:
chipflow_libcode continues to work (with warnings)chipflow_libtochipflowchipflow_libcompatibility shim🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com