Skip to content

Modify the VP api so it can take its own objects.#2268

Merged
scarlehoff merged 2 commits into
masterfrom
api_extended_feb25
Feb 4, 2025
Merged

Modify the VP api so it can take its own objects.#2268
scarlehoff merged 2 commits into
masterfrom
api_extended_feb25

Conversation

@scarlehoff
Copy link
Copy Markdown
Member

@scarlehoff scarlehoff commented Feb 3, 2025

Right now the validphys api is limited to strings for PDFs. This small change allows to take either already loaded PDFs or other objects (such as the PDFs coming directly from n3fit).

Note: while from __future__ import annotations would allow using Union[str, PDF] in python 3.9, this in practice changes PDF to "PDF" (which was the old way) and this is not allowed/understood by reportengine. So for now the type annotation for the pdf name must be removed for parse_pdf to allow both strings and classes.

Copy link
Copy Markdown
Contributor

@tgiani tgiani left a comment

Choose a reason for hiding this comment

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

Looks good to me

@scarlehoff scarlehoff merged commit d7bfbd0 into master Feb 4, 2025
@scarlehoff scarlehoff deleted the api_extended_feb25 branch February 4, 2025 12:03
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.

2 participants