Skip to content

Commit 8d360dd

Browse files
committed
Refresh README with product-focused overview
1 parent d22fd87 commit 8d360dd

19 files changed

Lines changed: 833 additions & 467 deletions

File tree

README.md

Lines changed: 186 additions & 178 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ keywords = [
2929
"sprite",
3030
]
3131
classifiers = [
32-
"Development Status :: 4 - Beta",
32+
"Development Status :: 5 - Production/Stable",
3333
"Environment :: Console",
3434
"Intended Audience :: Science/Research",
3535
"Programming Language :: Python :: 3",

src/pcr_audit/config.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ class OrdinalConfig:
6161
"stage",
6262
"likert",
6363
"rating",
64-
"评分",
65-
"等级",
66-
"分级",
6764
)
6865

6966

src/pcr_audit/crosscheck.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@
2323
# ---------------------------------------------------------------------------
2424

2525
COLUMN_PATTERNS: dict[str, list[str]] = {
26-
"N": [r"^n$", r"^sample[_ ]?size$", r"^cases?$", r"^number$", r"samplesize", r"样本量", r"例数", r"人数"],
27-
"Mean": [r"^mean$", r"^means$", r"^average$", r"均值", r"均数", r"平均值", r"平均数"],
28-
"SD": [r"^sd$", r"^std$", r"^stdev$", r"标准差", r"stdev"],
29-
"SE": [r"^se$", r"^sem$", r"^standard[_ ]?error$", r"标准误", r"sterr"],
30-
"CI_low": [r"cilow", r"cilower", r"ci[_\- ]?l", r"lcl", r"^lower$", r"置信区间下限", r"下限", r"^low$"],
31-
"CI_high": [r"cihigh", r"ciupper", r"ci[_\- ]?u", r"ucl", r"^upper$", r"置信区间上限", r"上限", r"^high$"],
32-
"count": [r"^count$", r"n[_\- ]?pos", r"^freq$", r"频数", r"计数"],
33-
"percent": [r"percent", r"percentage", r"^prop$", r"^rate$", r"百分比", r"比例", r"率"],
34-
"effect": [r"^or$", r"oddsratio", r"^rr$", r"riskratio", r"^hr$", r"hazardratio", r"效应量", r"比值比", r"风险比"],
35-
"t": [r"^t$", r"t[_\- ]?value", r"t[_\- ]?stat", r"t统计"],
36-
"df": [r"^df$", r"^dof$", r"自由度", r"degreeoffreedom"],
37-
"p": [r"^p$", r"p[_\- ]?value", r"^pval$", r"p值"],
26+
"N": [r"^n$", r"^sample[_ ]?size$", r"^cases?$", r"^number$", r"samplesize"],
27+
"Mean": [r"^mean$", r"^means$", r"^average$"],
28+
"SD": [r"^sd$", r"^std$", r"^stdev$"],
29+
"SE": [r"^se$", r"^sem$", r"^standard[_ ]?error$", r"sterr"],
30+
"CI_low": [r"cilow", r"cilower", r"ci[_\- ]?l", r"lcl", r"^lower$", r"^low$"],
31+
"CI_high": [r"cihigh", r"ciupper", r"ci[_\- ]?u", r"ucl", r"^upper$", r"^high$"],
32+
"count": [r"^count$", r"n[_\- ]?pos", r"^freq$"],
33+
"percent": [r"percent", r"percentage", r"^prop$", r"^rate$"],
34+
"effect": [r"^or$", r"oddsratio", r"^rr$", r"riskratio", r"^hr$", r"hazardratio"],
35+
"t": [r"^t$", r"t[_\- ]?value", r"t[_\- ]?stat"],
36+
"df": [r"^df$", r"^dof$", r"degreeoffreedom"],
37+
"p": [r"^p$", r"p[_\- ]?value", r"^pval$"],
3838
}
3939

4040

src/pcr_audit/data_trace.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818

1919

2020
STAT_NAMES = {
21-
"n": ("n", "sample_size", "cases", "samplesize", "number", "样本量", "例数", "人数"),
22-
"mean": ("mean", "means", "average", "均值", "均数", "平均值", "平均数"),
23-
"sd": ("sd", "std", "stdev", "标准差"),
24-
"se": ("se", "sem", "standard_error", "标准误", "sterr"),
25-
"count": ("count", "freq", "frequency", "n_pos", "频数", "计数"),
26-
"percent": ("percent", "percentage", "prop", "rate", "百分比", "比例", "率"),
21+
"n": ("n", "sample_size", "cases", "samplesize", "number"),
22+
"mean": ("mean", "means", "average"),
23+
"sd": ("sd", "std", "stdev"),
24+
"se": ("se", "sem", "standard_error", "sterr"),
25+
"count": ("count", "freq", "frequency", "n_pos"),
26+
"percent": ("percent", "percentage", "prop", "rate"),
2727
}
2828

2929

src/pcr_audit/detectors/p_values.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _p_columns(df: pd.DataFrame) -> list[str]:
4040
for col in df.columns:
4141
normalized = _normalize_name(col)
4242
raw = str(col).lower()
43-
if re.search(r"^p$", normalized) or re.search(r"pvalue", normalized) or re.search(r"p[_ ]?value", raw) or re.search(r"^pval", normalized) or re.search(r"p值", raw):
43+
if re.search(r"^p$", normalized) or re.search(r"pvalue", normalized) or re.search(r"p[_ ]?value", raw) or re.search(r"^pval", normalized):
4444
columns.append(str(col))
4545
return columns
4646

src/pcr_audit/detectors/r/adapters.py

Lines changed: 45 additions & 45 deletions
Large diffs are not rendered by default.

src/pcr_audit/detectors/raw.py

Lines changed: 62 additions & 158 deletions
Large diffs are not rendered by default.

src/pcr_audit/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def enrich_finding_explanation(finding: Finding) -> None:
9898
if not finding.location:
9999
finding.location = finding.table
100100
if not finding.review_actions:
101-
finding.review_actions = finding.review_steps
101+
finding.review_actions = finding.review_steps or finding.suggestion
102102
if not finding.confidence_basis:
103103
finding.confidence_basis = (
104104
"Generated from deterministic rules or reproducible formulas; still requires human judgment considering study design, original records, and material extraction quality."

src/pcr_audit/product/common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
"man-made brainpower": "artificial intelligence",
3939
}
4040

41-
TEXT_TOKEN_RE = re.compile(r"[A-Za-z0-9\u4e00-\u9fff]{2,}")
41+
TEXT_TOKEN_RE = re.compile(r"[A-Za-z0-9]{2,}")
4242
EMAIL_RE = re.compile(r"\b[A-Z0-9._%+-]+@([A-Z0-9.-]+\.[A-Z]{2,})\b", re.I)
43-
AUTHOR_LINE_RE = re.compile(r"^\s*(?:authors?|作者)\s*[::]\s*(?P<value>.+)$", re.I | re.M)
44-
INSTITUTION_LINE_RE = re.compile(r"^\s*(?:affiliations?|institutions?|单位|机构)\s*[::]\s*(?P<value>.+)$", re.I | re.M)
43+
AUTHOR_LINE_RE = re.compile(r"^\s*(?:authors?)\s*[::]\s*(?P<value>.+)$", re.I | re.M)
44+
INSTITUTION_LINE_RE = re.compile(r"^\s*(?:affiliations?|institutions?)\s*[::]\s*(?P<value>.+)$", re.I | re.M)
4545

4646

4747
@dataclass

0 commit comments

Comments
 (0)