Skip to content

refactor: rename inner package datamaxi/datamaxi -> datamaxi/resources (#1)#138

Merged
martinkersner merged 1 commit into
mainfrom
refactor/rename-inner-package
Jul 3, 2026
Merged

refactor: rename inner package datamaxi/datamaxi -> datamaxi/resources (#1)#138
martinkersner merged 1 commit into
mainfrom
refactor/rename-inner-package

Conversation

@martinkersner

Copy link
Copy Markdown
Member

Summary

PR 4 of 4 (final) from the SDK-structure review — fixes issue #1, the doubled datamaxi.datamaxi package name that read like an accident and leaked into tracebacks / __module__.

  • git mv datamaxi/datamaxi -> datamaxi/resources (git detected renames, mostly R100).
  • Updated every internal reference datamaxi.datamaxi -> datamaxi.resources: the inner __init__ + resource cross-imports, all test imports, and the docs mkdocstrings ::: datamaxi.datamaxi.X directives.
  • No packaging change needed — setuptools uses auto-discovery (no explicit packages=), and find_packages() now returns datamaxi.resources.

Public surface unchanged: from datamaxi import Datamaxi and the whole client.cex.candle(...) tree work exactly as before.

Verification

  • find_packages() -> ['datamaxi', 'datamaxi.resources', 'datamaxi.naver', 'datamaxi.telegram', 'datamaxi.lib']
  • Import smoke: type(client.cex.candle) -> datamaxi.resources.cex_candle.CexCandle
  • pytest -m "not integration": 134 passed, 11 skipped
  • black + flake8 clean across datamaxi/

Breaking change (narrow)

Deep imports of the old inner path — from datamaxi.datamaxi.cex_ticker import CexTicker — must move to datamaxi.resources.*. This path was essentially internal (used by our tests + doc-gen directives, not the advertised from datamaxi import Datamaxi entrypoint), 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__.py that re-exports from datamaxi.resources (aliasing submodules in sys.modules) with a DeprecationWarning — say the word and I'll push it to this branch.

Known failures

None.

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.*'.
@martinkersner martinkersner merged commit cf3b062 into main Jul 3, 2026
5 checks passed
@martinkersner martinkersner deleted the refactor/rename-inner-package branch July 3, 2026 05:55
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.

1 participant