Skip to content

physXAI 1.0.0 – Phase 0: foundation and AgentLib-MPC contract tests - #70

Merged
PatrickHenkel1 merged 1 commit into
refactoring_v1.0.0from
v1/phase-0-foundation
Nov 6, 2026
Merged

PatrickHenkel1 merged 1 commit into
refactoring_v1.0.0from
v1/phase-0-foundation

Conversation

@PatrickHenkel1

Copy link
Copy Markdown
Collaborator

Phase 0 of the physXAI 1.0.0 refactoring (foundation and safety net). Base: refactoring_v1.0.0.

Summary

  • Static versioning: version in pyproject.toml (1.0.0.dev0), physXAI.__version__ via importlib.metadata, CHANGELOG.md, version check workflow for release tags. setuptools-scm removed.
  • Packaging: Python >= 3.11; CI matrix 3.11–3.13 on Linux and Windows; casadi declared (was imported but missing); GitPython and the outdated requirements.txt removed; extras dev, agentlib, docs; ruff + pre-commit.
  • physXAI.io.Run replaces the global Logger for new code: explicit paths (no git root resolution, works when installed as a package), no interactive prompts, never deletes files, Windows-safe names.
  • save_for_agentlib / check_agentlib_compatibility: write exactly the files AgentLib-MPC reads and validate the AgentLib rules before training.
  • Contract tests against AgentLib-MPC (unittests/contract, skipped without agentlib_mpc):
    • generate_physxai_model end to end for an ANN (example_ci) and a LinReg on Change(T) with a derived input;
    • CasADi translation of every custom layer;
    • loading legacy .keras models;
    • the compatibility rules accept and reject exactly what AgentLib-MPC does.
  • The AgentLib example scripts use Run; the train_model signature and the output files are unchanged.

Test plan

  • pytest: 43 passed (21 existing, 22 new).
  • AgentLib-MPC tests/test_physXAI_plugin: 3 passed.
  • examples/one_room_mpc/physXAI_plugin/simple_mpc_nn_physXAI.run_example(testing=True) runs.
  • CI on Linux and Windows.

Bug #37 of the refactoring plan (coverage badge committed into PR branches) is not addressed yet; planned for phase 6.

🤖 Generated with Claude Code

- Static versioning in pyproject.toml (1.0.0.dev0), physXAI.__version__,
  CHANGELOG.md and a version check workflow; setuptools-scm removed
- Python >= 3.11, CI on Linux and Windows (3.11-3.13), casadi declared,
  GitPython and requirements.txt removed, ruff + pre-commit
- physXAI.io.Run replaces the global Logger for new code (explicit paths,
  no prompts, no git root resolution, Windows safe names)
- physXAI.io.save_for_agentlib / check_agentlib_compatibility
- Contract tests against AgentLib-MPC: generate_physxai_model end to end,
  CasADi translation of all custom layers, loading legacy models and
  agreement of the compatibility rules with AgentLib-MPC
- AgentLib example scripts migrated to Run (train_model signature unchanged)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 00:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@PatrickHenkel1
PatrickHenkel1 merged commit c42563b into refactoring_v1.0.0 Nov 6, 2026
@PatrickHenkel1
PatrickHenkel1 deleted the v1/phase-0-foundation branch November 6, 2026 00:09
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.

2 participants