-
-
Notifications
You must be signed in to change notification settings - Fork 67
Expose the public API at the package top level #241
Open
Description
Problem Statement
The recommended spellings for building a simulation are long and repeat themselves, because every public class name already encodes its module name: ps.geometry.airplane.Airplane says "airplane" twice, and ps.steady_horseshoe_vortex_lattice_method.SteadyHorseshoeVortexLatticeMethodSolver spells the same name once in snake_case and once in CamelCase. The module path adds no disambiguation, since every public class name in the package is globally unique and self-describing. The package also already has a flat tier: load, save, and set_up_logging are exposed at the top level through the lazy-import tables in pterasoftware/__init__.py.
Location(s): pterasoftware/__init__.py, the example scripts in examples/, README.md
Proposed Solution
- Add every public class and function to the lazy-import tables in
pterasoftware/__init__.pyso they are importable directly from the package (ps.Airplane,ps.WingCrossSection,ps.SteadyHorseshoeVortexLatticeMethodSolver, and so on), keeping the imports deferred so the package's import time does not grow. - Keep the module-path spellings public and working. This change is purely additive, so nothing breaks and no deprecation warnings are needed.
- Update the example scripts,
README.md, and the documentation website to use the flat spellings as the recommended form.