Rename flexlibs2 package to flexicon - #241
Open
MattGyverLee wants to merge 4 commits into
Open
Conversation
#240) Two live-runtime defects and every executable flexlibs2 import scheduled for v5.0.0 removal are rewritten to the flexicon path. Docstring Usage:: blocks and broader test-suite sweeps still to follow in a later commit, along with the ratchet-guard test. - FLExGlobals.APIHelpFile: point at docs/flexiconAPI/flexicon.html so the documented entry point actually resolves. - FLExProject.BestStr(): use logging.getLogger(__name__) instead of the orphaned "flexlibs2" logger name so records aren't silently dropped. - flexicon/sync/tests/ (20 sites) + flexicon/examples/ (6 sites) + flexicon/tests/ (3 sites plus a stray flexlibs2.log filename): switch every executable "from flexlibs2..." / "import flexlibs2..." / "@patch('flexlibs2....')" to the flexicon path. - tests/ source-inspection tests: repoint hardcoded Path("flexlibs2/code/...") strings and executable imports to flexicon/code/... (test_write_enabled_fix, test_phoneme_duplicate_fix, test_lcm_api_usage, test_itsstring_fix, test_lcm_method_verification, test_wfianalysis_agent_import, test_custom_field_create_refusal). Refs: #240
The Usage:: blocks in the Operations classes were the largest source of externally-copied flexlibs2 imports -- every user pasting an example from a docstring wrote code that would break at v5.0.0. Rewrite the prose across flexicon/code/ (80 files) so the taught path is flexicon, matching what the executable imports already do. Also correct the flexicon/sync/tests/__init__.py module docstring, which still described itself as tests for "flexlibs2.sync". No behaviour change; docstrings and comments only. Refs: #240
Broader mechanical sweep so nothing internal walks the compatibility
alias -- imports, importlib.import_module() strings, source-inspection
Path() literals, and docstring >>> examples all now resolve through
flexicon. The remaining `"flexlibs2"` / `"flexlibs2/code"` string tokens
in tests/contract/extract_lcm_contract.py are the deliberate legacy
fallback candidates for extracting contracts from pre-rename checkouts;
they are bare tokens (no dotted `.subpath`) and stay out of the ratchet
regex.
- flexicon/sync/{__init__,diff,engine}.py: version comment plus two
docstring >>> examples switched to `from flexicon.sync import ...`.
- tests/ (70 files, ~667 executable-import sites + ~155 importlib string
targets + 9 Path() strings + prose): rewrite everything the previous
7-file scope missed. Includes tests/conftest.py, tests/operations/*,
tests/contract/*, and wrapper/collection/catalog tests.
No behaviour change; alias identity is preserved for external callers.
Refs: #240
…tchet (#240) Final wave of the internal `flexicon` rename: - examples/ (47 files) + demos/ (3) + tools/ (3) + stray top-level scripts (inspect_rule_final.py, research_phase2_lcm_api.py, test_undo_redo_mocked.py, verify_lcm_calls.py): ~80 executable imports, docstring examples, string literals (including a Windows path token in verify_lcm_calls.py and CLI identifiers in validate_lcm_properties.py) and prose all rewritten to flexicon. - tests/test_flexlibs2_alias_ratchet.py: ratchet guard that AST-parses the repo and asserts (a) no `from flexlibs2 [...]` / `import flexlibs2 [...]` outside the alias package and its own test, and (b) no dotted `flexlibs2.<subpath>` string literals (which reach the alias at runtime through unittest.mock.patch, importlib.import_module, etc.). Modelled on the existing source-inspection tests in tests/test_transaction_honesty.py. Passes cleanly against HEAD. Together with the earlier commits this closes every executable `flexlibs2` reference outside the alias package -- the alias is now inbound-only, as the v5.0.0 deprecation notice promises. Refs: #240
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
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 completes the package rename from
flexlibs2toflexiconacross the entire codebase. All internal imports, documentation, examples, and test references have been updated to use the new package name.Key Changes
import flexlibs2statements changed toimport flexiconflexlibs2.code.*toflexicon.code.*andflexlibs2.sync.*toflexicon.sync.*flexiconinstead offlexlibs2flexicontest_flexlibs2_alias_ratchet.pyto enforce that internal code does not reference the deprecatedflexlibs2alias (issue flexlibs2 is still the default runtime path internally; the alias should be inbound-only #240)Implementation Details
flexlibs2package remains as a compatibility alias for external callers onlyflexiconflexlibs2are accidentally introducedhttps://claude.ai/code/session_01G2kMG5PfSCn9tFsQfAVWeU