Skip to content

Commit

Permalink
Merge pull request #32 from msrosenberg/dev-branch
Browse files Browse the repository at this point in the history
Releases 3.16 and 3.17
  • Loading branch information
msrosenberg authored Oct 30, 2024
2 parents 783f171 + 97442ac commit c7c6fba
Show file tree
Hide file tree
Showing 8 changed files with 249 additions and 202 deletions.
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy~=1.26.1
PyQt6~=6.6.1
scipy~=1.11.3
matplotlib~=3.8.0
numpy>=1.26.1
PyQt6>=6.6.1
scipy>=1.11.3
matplotlib>=3.8.0
410 changes: 215 additions & 195 deletions src/MetaWinAnalysisFunctions.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/MetaWinConstants.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

MAJOR_VERSION = 3
MINOR_VERSION = 0
PATCH_VERSION = 15
PATCH_VERSION = 17

# validity check when fetching value from data matrix
VALUE_NUMBER = 0
Expand Down
3 changes: 3 additions & 0 deletions src/MetaWinData.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from MetaWinUtils import format_number
from MetaWinConstants import VALUE_STRING, VALUE_NUMBER
from MetaWinLanguage import get_text


class MetaWinValue:
Expand Down Expand Up @@ -76,6 +77,8 @@ def not_filtered(self) -> bool:
d = self.data.value(self.position(), c)
if d is not None:
d = d.value
else:
d = f"[{get_text("blanks")}]"
if str(d) in col.group_filter:
return False
return True
Expand Down
5 changes: 5 additions & 0 deletions src/MetaWinFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ def init_ui(self, data, column):
group_layout = QVBoxLayout()
group_data = []
c = data.col_number(column)
has_none = False
for r in range(data.nrows()):
g = data.value(r, c)
if g is not None:
group_data.append(str(g.value))
else:
has_none = True
self.group_names = sorted(set(group_data))
if has_none:
self.group_names.append(f"[{get_text("blanks")}]")
for group in self.group_names:
new_check_box = QCheckBox(group)
group_layout.addWidget(new_check_box)
Expand Down
7 changes: 7 additions & 0 deletions src/MetaWinLanguage.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@
"About MetaWin": "About MetaWin",
"Additional Options": "Additional Options",
"Analysis": "Analysis",
"Analysis Error Encountered": "Analysis Error Encountered",
"AE-singular": "The design matrix was singular and could not be inverted. This is most likely "
"caused by two or more categorical variables lacking independence, for example "
"if two data columns have identical values or perfectly reversed values.",
"AE-unknown": "An unexpected linear algebra error was encountered and the analysis could not "
"be completed. There is likely a problem with the data structure.",
"Analysis Options": "Analysis Options",
"available": "available",
"Automatically check for udpates": "Automatically check for udpates",
"Axes Titles": "Axes Titles",
"Bar Color": "Bar Color",
"Basic Meta-Analysis": "Basic Meta-Analysis",
"Between": "Between",
"blanks": "blanks",
"Bootstrap Mean Effect Size(s)": "Bootstrap Mean Effect Size(s)",
"bootstrap_caption": " Confidence intervals from a boostrap ({:,} iterations) procedure, "
"following {}, are indicated by {}; the bias-corrected bootstrap interval "
Expand Down
12 changes: 10 additions & 2 deletions src/MetaWinMain.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,17 @@ def refresh_data(self) -> None:
else:
new_item = QTableWidgetItem(dat.value)
if not not_filtered:
# if dat is None:
# new_item.setBackground(QColor(self.filtered_row_color))
# elif str(dat.value) in column.group_filter:
# new_item.setBackground(QColor(self.filtered_col_color))
# else:
# new_item.setBackground(QColor(self.filtered_row_color))
if dat is None:
new_item.setBackground(QColor(self.filtered_row_color))
elif str(dat.value) in column.group_filter:
dat_value = f"[{get_text("blanks")}]"
else:
dat_value = str(dat.value)
if dat_value in column.group_filter:
new_item.setBackground(QColor(self.filtered_col_color))
else:
new_item.setBackground(QColor(self.filtered_row_color))
Expand Down
4 changes: 4 additions & 0 deletions src/MetaWinUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def interval_to_str(lower_value, upper_value, decimal_places: int = 4) -> str:
format(upper_value, inline_float(decimal_places))


def strong_text(text: str) -> str:
return "<strong>" + text + "</strong>"


def strip_html(x: str) -> str:
"""
remove any stray html tags from within string
Expand Down

0 comments on commit c7c6fba

Please sign in to comment.