Skip to content

Reuse parameter definitions and docstrings in thermal emission module models - #297

Open
samaloney wants to merge 3 commits into
sunpy:mainfrom
samaloney:thermal-model-composite-params
Open

Reuse parameter definitions and docstrings in thermal emission module models#297
samaloney wants to merge 3 commits into
sunpy:mainfrom
samaloney:thermal-model-composite-params

Conversation

@samaloney

@samaloney samaloney commented Aug 6, 2026

Copy link
Copy Markdown
Member

PR Description

Currently we essentially copy paste ~90 lines of parameter definitions across the model in the thermal module. This PR shares a single definition of the parameter across them all.

Also found and fixed a bug that meant the class docs were actually None if you did help(LimeEimmsion) etc and then also fixed the docstring so they work in the doc build.

AI Assistance Disclosure

AI tools were used for:

  • [ ] Code generation (e.g., when writing an implementation or fixing a bug)
  • [x ] Test/benchmark generation
  • [ ] Documentation (including examples)
  • [ ] Research and understanding
  • [ ] No AI tools were used

Regardless of AI use, the human contributor remains fully responsible for correctness, design choices, licensing compatibility, and long-term maintainability.

@samaloney samaloney changed the title Reuse parameter definitions and docstrings in thermal emission modules models Reuse parameter definitions and docstrings in thermal emission module models Aug 6, 2026


def _initialize_abundances(abundances: Column) -> tuple[float]:
def _initialize_abundances(abundances: Column) -> tuple[float, ...]:

@samaloney samaloney Aug 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not sure where the type annotation came from but updated the annotation and code to keep the language server happy

@samaloney samaloney mentioned this pull request Aug 6, 2026
@samaloney
samaloney requested a review from jajmitchell August 18, 2026 11:54
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