Skip to content

Commit

Permalink
feat: QuantStudio Design & Analysis - add xls support and additional …
Browse files Browse the repository at this point in the history
…filter check for empty stage number column (#724)

- Add .xls to SUPPORTED_EXTENSIONS
- Add check to create_multicomponent_data for stage number column when
all values are null

---------

Signed-off-by: james-leinas <[email protected]>
  • Loading branch information
james-leinas authored Oct 16, 2024
1 parent 7e9dfe2 commit 76d06af
Show file tree
Hide file tree
Showing 4 changed files with 112,401 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


class DesignQuantstudioReader:
SUPPORTED_EXTENSIONS = "xlsx"
SUPPORTED_EXTENSIONS = "xlsx,xls"
header: SeriesData
data: dict[str, pd.DataFrame]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ def create_multicomponent_data(
stage_number = well_data.get("Stage Number")
stage_data = (
well_data
if header.pcr_stage_number is None or stage_number is None
if header.pcr_stage_number is None
or stage_number is None
or well_data["Stage Number"].isnull().all()
else assert_not_empty_df(
well_data[stage_number == header.pcr_stage_number], # type: ignore[arg-type]
msg=f"Unable to find multi component data for stage {header.pcr_stage_number}.",
Expand Down
Loading

0 comments on commit 76d06af

Please sign in to comment.