refactor: rename inner package datamaxi/datamaxi -> datamaxi/resources (#1)#138
Merged
Merged
Conversation
The doubled 'datamaxi.datamaxi' package name read like an accident and leaked into tracebacks / __module__. Rename the inner package to 'resources' and update all internal imports, tests, and the docs mkdocstrings ':::' directives. Public surface unchanged: 'from datamaxi import Datamaxi' still works. setuptools auto-discovery picks up datamaxi.resources (verified via find_packages). Deep imports of 'datamaxi.datamaxi.*' (essentially internal) must move to 'datamaxi.resources.*'.
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
PR 4 of 4 (final) from the SDK-structure review — fixes issue #1, the doubled
datamaxi.datamaxipackage name that read like an accident and leaked into tracebacks /__module__.git mv datamaxi/datamaxi -> datamaxi/resources(git detected renames, mostly R100).datamaxi.datamaxi->datamaxi.resources: the inner__init__+ resource cross-imports, all test imports, and the docs mkdocstrings::: datamaxi.datamaxi.Xdirectives.packages=), andfind_packages()now returnsdatamaxi.resources.Public surface unchanged:
from datamaxi import Datamaxiand the wholeclient.cex.candle(...)tree work exactly as before.Verification
find_packages()->['datamaxi', 'datamaxi.resources', 'datamaxi.naver', 'datamaxi.telegram', 'datamaxi.lib']type(client.cex.candle)->datamaxi.resources.cex_candle.CexCandlepytest -m "not integration": 134 passed, 11 skippeddatamaxi/Breaking change (narrow)
Deep imports of the old inner path —
from datamaxi.datamaxi.cex_ticker import CexTicker— must move todatamaxi.resources.*. This path was essentially internal (used by our tests + doc-gen directives, not the advertisedfrom datamaxi import Datamaxientrypoint), so external impact should be minimal.If you'd rather not break it at all, I can add a thin deprecated compat shim at
datamaxi/datamaxi/__init__.pythat re-exports fromdatamaxi.resources(aliasing submodules insys.modules) with aDeprecationWarning— say the word and I'll push it to this branch.Known failures
None.