Skip to content

Some typing and QOL fixes#61

Open
archermarx wants to merge 30 commits intoeckelsjd:mainfrom
archermarx:main
Open

Some typing and QOL fixes#61
archermarx wants to merge 30 commits intoeckelsjd:mainfrom
archermarx:main

Conversation

@archermarx
Copy link
Copy Markdown

@archermarx archermarx commented Mar 3, 2026

Fixes some type hinting and adds an optional prefix for output directories

Fixes

  • Type errors eliminated in distributions.py, serialize.py, transform.py, and variable.py
  • Many other typing issues resolved (many optional default assignments fixed to have correct "| None" type)
  • Flaky tests on windows due to matplotlib trying to open interactive plots resolved by switching backend
  • Loggers for Component and System now use null handlers when None to make sure we always have a valid Logger object

Features

  • Add new args to loading a system from file: "timestamp_prefix" and "make_subdirs". The first allows you to change the name of the timestamped output file prefix from "amisc_" to something else, and the second disables the creation of timestamped subdirectories and dumps files directly in the specified root dir.

…hose accepting shape tuples and adding None option to domain and nominal
The logger property in System and Component now returns a shared
NullHandler logger as a fallback instead of None, making the return
type a non-optional logging.Logger. Setters are widened to accept
None to preserve the pickling behaviour in _remove_unpickleable.
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