Skip to content

Clean up compute architecture API#7

Merged
aidankhogg merged 1 commit into
feat/lib/computecommonsfrom
codex/clean-up-architecture-related-modules
Jul 15, 2026
Merged

Clean up compute architecture API#7
aidankhogg merged 1 commit into
feat/lib/computecommonsfrom
codex/clean-up-architecture-related-modules

Conversation

@aidankhogg

Copy link
Copy Markdown
Contributor

Motivation

  • Unify the public architecture API so computecommons.compute exposes the canonical architecture enum and normalization helpers rather than a placeholder module or duplicate value objects.
  • Remove a misspelled compatibility shim that would otherwise leak a duplicate import path into the package surface.
  • Make tests validate the intended public architecture imports rather than only asserting that a placeholder module can be imported.

Description

  • Added builds/packages/base/internetworking/src/computecommons/compute/architecture.py that re-exports CPUArchitecture from computecommons.enums and ARCHITECTURE_ALIASES / normalize_architecture from computecommons.static and sets __all__ to expose the accepted helpers.
  • Updated builds/packages/base/internetworking/src/computecommons/compute/__init__.py to import and export ARCHITECTURE_ALIASES, CPUArchitecture, and normalize_architecture alongside the existing compute models.
  • Removed the misspelled compatibility shim compute/architechture.py to avoid duplicate/incorrect package surface before the stable v0.1 release.
  • Rewrote the placeholder test in builds/packages/base/internetworking/tests/test_compute.py to assert that the compute package re-exports the canonical enum and normalization function and that the module-level helpers match the static implementations.

Testing

  • Ran python -m ruff check tests/test_compute.py src/computecommons/compute/architecture.py src/computecommons/compute/__init__.py and applied an auto-fix for import formatting, which completed successfully.
  • Ran python -m pytest in builds/packages/base/internetworking and all tests passed (39 passed).
  • Ran python -m mypy src tests and it failed due to pre-existing typing issues in tests/test_empty_module_surface.py (unrelated to the architecture changes).

Codex Task

@aidankhogg aidankhogg self-assigned this Jul 15, 2026
@aidankhogg aidankhogg merged commit d169472 into feat/lib/computecommons Jul 15, 2026
@aidankhogg aidankhogg deleted the codex/clean-up-architecture-related-modules branch July 15, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant