v2.2.0
fmdtools v2.2.0 brings a bunch of new features as well as improved, more maintainable back-end classes for modeling and simulation.
As a major release, this comes with some breaking changes which may require updated to both syntaxes and dependencies on the users end. Particularly, the project has made the move to more recent versions of Python and numpy and has changed syntaxes related to Simulable classes (e.g., Function, FunctionArchitecture) as well as keyword arguments to propagate.
This release has also come with some major improvements to fmdtools usage, including the ability to readily simulate all Blocks/Architectures directly (without using a propagate) method, transparent and consistent console representations for all modelling classes, Simulation time objects that are more useful for defining behavior, removing the requirement to give classes slots, and (in general) more consistent behavior throughout.
See a full list of what has changed below:
What's Changed
- All Simulables and Containers now have a uniform, consistent text-based representation in the console that can be used to verify state/attribute information. This was the case for certain classes (Function, FunctionArchitectures, Flow, etc), but not for others and there was no standard way to display this information. See: https://babelfish.arc.nasa.gov/jira/browse/RAD-523
- Removal of the time argument to behavior methods. Instead, the internal Time object is updated consistently such that this argument is not needed. See: https://babelfish.arc.nasa.gov/jira/browse/RAD-514, https://babelfish.arc.nasa.gov/jira/browse/RAD-522
- All Simulables (blocks, architectures, and their subclasses) can now be simulated using the call method, as in:
mdl = ModelClass() mdl(time=5.0)
will instantiate the model and simulate it until time t=5.0. see: https://babelfish.arc.nasa.gov/jira/browse/RAD-513 - All simulables now may be simulated in both dynamic and static configurations with
dynamic_behaviorandstatic_behaviormethods, see: https://babelfish.arc.nasa.gov/jira/browse/RAD-524 - Addition of doctests for all simulables (Components, Actions, etc and their architectures) using the above syntax
- Refactoring of the propagate module to use a class-based architecture for simulations. This gives us more flexibility for sampling faults in the future, since it gives us better underlying interfaces (Simulation objects as opposed to helper methods) that have defined doctests describing their behavior. We also now have more control/traceability of simulation arguments/settings used by the module. See: https://babelfish.arc.nasa.gov/jira/browse/RAD-525, https://babelfish.arc.nasa.gov/jira/browse/RAD-477
*Auto-generation of the slots attribute of fmdtools classes, making it so the user does not need to define these slots themselves, which was a confusing syntax. See: https://babelfish.arc.nasa.gov/jira/browse/RAD-528 - Incorporation of feature, state, point, and collection definition into the Coords class as opposed to the CoordsParam. This came in conjunction with the cleanup and unification of the BaseObject backend, which removed "roledict" attributes (which were attributes defined in an external parameter). The result is that Coords can be more readily defined with less syntax, often not needing an external parameter to be defined fully. Note that this may break some usages that may need to be adapted or re-icorporated into Coords. See: https://babelfish.arc.nasa.gov/jira/browse/RAD-529
- The desired_result argument has been renamed to to_return
*The find_result method is now called classify and optionally takes the nominal history (rather than the full history) and the scenario as input. The full history is no longer provide since the faulty/current history is already a part of the Simulable object at mdl.h and because the history input to this method previously had inconsistent behavior (sometimes just the nominal history, sometimes both the nominal and current history) that made it difficult to work with. - Ability to export graphs as draw.io diagrams by @zainkhatri in #25
- fmdtools 2.2.0 now depends on more recent packages and versions of Python (3.11-3.13) and packages (numpy >2.0 and recordclass==0.23.1). Future point releases will improve the integration with numpy 2.0+
See the main issue for more description: https://babelfish.arc.nasa.gov/jira/browse/RAD-519
Full Changelog: v2.1.3...v2.2.0
Release Checklist
<style> </style>| Step | Description | Complete? | Comment |
|---|---|---|---|
| 1 | Sync appropriate branches into release branch using git sync-into-dev |
x | Synced in zain's contributions |
| 2 | Update version numbers in appropriate files | x | |
| 2a | "Check files conf.py LICENSE.py README.py Intro_to_fmdtools.md pyproject.toml init.py" | x | Updated required depencencies also (numpy>2.0, recordclass=0.23.1) |
| 2b | "Run a repository-wide search for the version number" | x | |
| 3 | Allow (or force) Bamboo CI to build tests and docs | x | Tests pass |
| 4 | "Release to GitHub/remotes using git release v2.x.x ''Version 2.x.x'' " |
x | |
| 5 | Create a release in GitHub | x | |
| 5a | "incorporate a narrative summary of features and changes" | x | |
| 5b | "incorporate the auto-generated bitbucket release notes." | x | |
| 6 | "Update project plan" | x | |
| 6a | "Include any changed dependencies" | x | |
| 6b | "Include version in schedule" | x | |
| 6c | "Identify and include additional changes/activities" | x | |
| 7 | Update/check external CI resources as needed | x | |
| 7a | "Toggle CodeFactor so it updates" | x | 36 issues->19 issues (5 new) |
| 7b | "Check upload to PyPi" | x |