Conversation
* docs: migrate from Jupyter Book to Docusaurus Port the existing documentation from Jupyter Book to a Docusaurus site under docs/, mirroring the layout and theming used by Delphi. Replace the gh-pages-based deploy job with the GitHub Pages artifact pipeline, and add a release workflow that handles version bumps, changelog updates, and Docusaurus version snapshots on labeled PRs into main. CHANGELOG is reformatted to Keep-a-Changelog so the release workflow's sed/awk drives the [Unreleased] header rewrite and comparison links. * docs: point repo URLs at MDO-Standards/Philote-Python Update Docusaurus config (url, organizationName, edit/footer links), release workflow REPO variable, and CHANGELOG comparison links to use the canonical MDO-Standards org instead of chrislupp. Also expand the Unreleased CHANGELOG entry with the docs migration, deploy workflow swap, and release workflow additions. * docs: add CLAUDE.md with release workflow documentation * fix: unbreak Sellar and ImplicitDiscipline.apply_linear tests The Sellar example set input defaults on the inner `cycle` subgroup, but `obj_cmp` promoted `x` and `z` to the top level with different defaults; newer OpenMDAO releases reject this during `final_setup`. Move the defaults to the top-level `SellarMDA` group so the promoted values agree. Also update `test_implicit_discipline_apply_linear_not_implemented` to pass the current six-argument signature; the stale three-argument call was raising `TypeError` before the `NotImplementedError` assertion could fire.
* feat: add discrete variable support Implement discrete variable handling across the full stack: - Discipline base class: add_discrete_input/add_discrete_output methods with VariableMetaData using kDiscreteInput/kDiscreteOutput types - Server: process_inputs demuxes VariableMessage oneof into continuous and discrete dicts; yields VariableMessage wrappers on output - Client: _assemble_input_messages wraps both Array and DiscreteVariable in VariableMessage; _recover_outputs handles discrete responses - OpenMDAO bindings: auto-discover discrete vars from server metadata, declare them via add_discrete_input/output, and forward through compute/apply_nonlinear/linearize calls Discrete values use google.protobuf.Value for language-interoperable serialization of scalars, lists, and nested structures. Updates proto submodule to feature/discrete_vars (DiscreteVariable message, VariableMessage wrapper, stream VariableMessage RPCs). Refs: #54 * fix: update tests for VariableMessage wrapper Wrap all raw data.Array messages in data.VariableMessage in test fixtures to match the new streaming protocol. Update OpenMDAO test assertions to include discrete_inputs parameters in expected calls. * test: add unit tests for discrete variable support Add comprehensive test suite covering all new discrete variable code paths: value conversion helpers, discipline base class, server/client discrete message handling, explicit/implicit server discrete dispatch, client discrete assembly/recovery, and OpenMDAO bindings. Coverage restored to 99% (remaining misses are import guards and an unreachable defensive branch). * ci: enforce 95% code coverage threshold Add codecov.yml requiring 95% coverage on both project total and patch (new/changed lines). Add fail_under = 95 to .coveragerc for local enforcement via coverage report. * chore: mark unreachable branches with pragma no cover Add coverage exclusion pragmas to three unreachable code paths: - _value_to_python else fallback (all protobuf Value kinds handled) - openmdao/__init__.py ImportError guard (requires uninstalling OpenMDAO) - examples/__init__.py ImportError guard (same) Also fixes bare except to except ImportError in examples/__init__.py. * test: add integration tests for discrete variable round-trip Add end-to-end integration tests using a ScaledParaboloid discipline that uses a discrete input (mode) to switch scaling behavior and a discrete output (label) to report the mode used. Tests cover: - Raw ExplicitClient compute with discrete inputs/outputs - Raw ExplicitClient compute_partials with discrete inputs - OpenMDAO RemoteExplicitComponent auto-discovery and forwarding of discrete variables through a real gRPC server * docs: update changelog with all discrete variable changes Add entries for coverage enforcement, pragma no cover annotations, and the bare except fix under the appropriate sections.
* feat: add support for struct (dict) discipline options (#49) Add kStruct DataType to the protocol and wire it through the Python stack so disciplines can declare and receive complex nested data as options. Changes: - Update proto submodule (kStruct = 4 in DataType enum) - Regenerate gRPC stubs - Map "dict" ↔ kStruct in server and client type mappings - Support dict type in OpenMDAO declare_options utility - Add tests for struct option round-trip - Update CHANGELOG * test: cover dict type in declare_options for 100% coverage * test: add gRPC integration test for struct option round-trip Adds a full end-to-end test that spins up a discipline with a dict option, discovers it via GetAvailableOptions, sends a nested dict, and verifies compute/partials use the struct values correctly.
* Add comprehensive input validation and error handling (#46) Introduce custom exception classes (PhiloteValidationError, PhiloteServerError), parameter validation in discipline base classes, gRPC error propagation via context.abort() in all server RPC methods, and client-side input validation with gRPC error wrapping. Fix missing space in RemoteImplicitComponent error message. * Add tests to restore 100% coverage Cover all previously uncovered error handling paths: PhiloteValidationError and general Exception branches in server RPC methods, gRPC error wrapping in all client methods, and num_par_fd validation in OpenMDAO components.
* Add comprehensive input validation and error handling (#46) Introduce custom exception classes (PhiloteValidationError, PhiloteServerError), parameter validation in discipline base classes, gRPC error propagation via context.abort() in all server RPC methods, and client-side input validation with gRPC error wrapping. Fix missing space in RemoteImplicitComponent error message. * Add tests to restore 100% coverage Cover all previously uncovered error handling paths: PhiloteValidationError and general Exception branches in server RPC methods, gRPC error wrapping in all client methods, and num_par_fd validation in OpenMDAO components. * Add dynamic shapes for inputs and outputs (MDO-Standards/Philote-MDO#6) Disciplines can now declare variables with `dynamic_shape=True` in `add_input`/`add_output`, indicating that the client is allowed to set the variable's shape at runtime. A new `SetVariableShapes` gRPC RPC lets clients send resolved shapes after querying variable definitions. Protocol changes: - Added `bool dynamic_shape` field to `VariableMetaData` in data.proto - Added `SetVariableShapes` streaming RPC to DisciplineService Server: - `add_input`/`add_output` accept `dynamic_shape` parameter - `SetVariableShapes` handler validates and updates shapes, including implicit residual entries - `preallocate_inputs` raises if a dynamic variable has no shape set Client: - `set_variable_shape`, `send_variable_shapes`, `get_dynamic_variables` helper methods OpenMDAO bindings: - Dynamic-shape variables map to `shape_by_conn=True` automatically - Resolved shapes are sent to the server before partials setup Includes FlexibleDiscipline example and 22 new tests (100% coverage).
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
"double"and"string"type aliases to the OpenMDAO type mapdynamic_shape=True,SetVariableShapesRPC)kStructdata typeRelease
This is a minor release (
0.7.0→0.8.0). Merge to trigger the release workflow.