repo stringclasses 454
values | file_path stringlengths 5 201 | extension stringclasses 1
value | content stringlengths 8 509k | num_lines int64 3 16.9k | size_bytes int64 8 511k |
|---|---|---|---|---|---|
scientific-agent-skills | tests/pysam/test_scripts.py | .py | """Tests for the pysam alignment helpers.
Reading a BAM needs pysam, but the decisions these scripts make before opening
one do not: the file-mode chosen from the suffix (`rb` vs `rc` vs `r` -- get it
wrong and htslib misreads the file), the argument validators, and the
destination checks that stop a filter run from o... | 287 | 11,490 |
scientific-agent-skills | tests/qiskit/test_scripts.py | .py | """Tests for the Qiskit environment, primitive, and backend-inspection scripts.
Three failure modes are worth guarding here. First, `run_local_primitives`
claims a specific piece of quantum mechanics: `ry(theta)` then `cx` prepares
cos(theta/2)|00> + sin(theta/2)|11>, so the sampler must only ever see `00` and
`11`, a... | 386 | 17,949 |
scientific-agent-skills | tests/rdkit/test_scripts.py | .py | """Tests for the RDKit cheminformatics helpers.
Every SMARTS pattern the skill ships is a claim about chemistry, and a pattern
that silently matches nothing is the failure mode: the filter reports "0 hits"
and looks like it worked. So the catalogue tests compile every pattern and then
prove each library actually match... | 274 | 11,529 |
scientific-agent-skills | tests/clinical-reports/test_scripts.py | .py | #!/usr/bin/env python3
"""Synthetic, dependency-free tests for clinical-reports local tooling."""
from __future__ import annotations
import json
import re
import sys
import tempfile
import unittest
from pathlib import Path
sys.dont_write_bytecode = True
SKILL_ROOT = Path(__file__).resolve().parents[2] / "skills" / ... | 498 | 21,609 |
scientific-agent-skills | tests/paper-lookup/test_scripts.py | .py | """Offline tests for the paper-lookup scripts.
No network. Every fixture is a trimmed copy of a real response captured on
2026-07-27, because the behavior under test *is* the shape of these payloads --
a synthetic JATS document with a tidy `<body>` would not exercise the case this
skill exists to catch.
One exception... | 587 | 27,416 |
scientific-agent-skills | tests/scholar-evaluation/test_scripts.py | .py | """Synthetic dependency-free tests for scholar-evaluation local tooling."""
from __future__ import annotations
import ast
import json
import sys
import tempfile
import unittest
from pathlib import Path
sys.dont_write_bytecode = True
SKILL_ROOT = Path(__file__).resolve().parents[2] / "skills" / "scholar-evaluation"
... | 408 | 16,628 |
scientific-agent-skills | tests/bids/test_scripts.py | .py | """Tests for the BIDS schema updater.
`update_schema.py` is a maintenance script that overwrites files in the skill's
own `references/` directory from the network. Neither of those is acceptable in
a test, so every test here redirects `REFERENCES_DIR` at a temporary directory
and replaces `fetch` with a stub. Nothing ... | 148 | 6,567 |
scientific-agent-skills | tests/timesfm-forecasting/test_scripts.py | .py | """Tests for the TimesFM preflight checker and CSV forecasting driver.
Neither script is exercised against real model weights -- the point of
`check_system.py` is to run *before* a 200M-parameter download, and
`forecast_csv.py` only reaches the network in `load_model()`, which nothing here
calls. What the tests cover ... | 694 | 31,203 |
scientific-agent-skills | tests/scientific-brainstorming/test_scripts.py | .py | """Synthetic tests for the standard-library scientific brainstorming CLIs."""
from __future__ import annotations
import json
import stat
import sys
import tempfile
import unittest
from pathlib import Path
SKILL_ROOT = Path(__file__).resolve().parents[2] / "skills" / "scientific-brainstorming"
SCRIPTS = SKILL_ROOT / ... | 286 | 11,276 |
scientific-agent-skills | tests/pptx-posters/test_scripts.py | .py | """Dependency-free synthetic tests for manifest and PPTX security helpers."""
from __future__ import annotations
import contextlib
import io
import json
import sys
import tempfile
import unittest
import zipfile
from pathlib import Path
SKILL_ROOT = Path(__file__).resolve().parents[2] / "skills" / "pptx-posters"
SCRI... | 670 | 28,494 |
scientific-agent-skills | tests/pptx-posters/test_generation_smoke.py | .py | """Exact-pinned synthetic PPTX generation and audit smoke test."""
from __future__ import annotations
import hashlib
import json
import stat
import sys
import tempfile
import unittest
import xml.etree.ElementTree as ET
import zipfile
from importlib.metadata import PackageNotFoundError, version
from pathlib import Pat... | 205 | 7,508 |
scientific-agent-skills | tests/pptx-posters/synthetic_posters.py | .py | """Synthetic manifest builders for local, claim-free tests."""
from __future__ import annotations
from typing import Any
def build_manifest(
manifest_content_hash: Any,
*,
include_image: bool = False,
image_sha256: str = "0" * 64,
image_path: str = "synthetic.png",
printer_color_mode: str = ... | 212 | 7,120 |
scientific-agent-skills | tests/pptx-posters/test_static.py | .py | """Static policy tests for the PPTX poster skill."""
from __future__ import annotations
import ast
import contextlib
import importlib
import io
import json
import re
import sys
import unittest
from pathlib import Path
SKILL_ROOT = Path(__file__).resolve().parents[2] / "skills" / "pptx-posters"
SCRIPTS = SKILL_ROOT /... | 215 | 7,919 |
scientific-agent-skills | tests/citation-management/test_scripts.py | .py | """Tests for the citation-management BibTeX tooling.
Four of this skill's scripts reach the network (Crossref, PubMed, OpenAlex,
Scholar); the parsing, rendering, and validation layers underneath them are
pure text processing. The pure half is where citation errors are actually
introduced -- a page range silently rewr... | 649 | 27,911 |
scientific-agent-skills | tests/iso-standards-readiness/test_scripts.py | .py | from __future__ import annotations
import hashlib
import json
import os
import subprocess
import sys
import tempfile
import unittest
from pathlib import Path
from typing import Any
ROOT = Path(__file__).resolve().parents[2] / "skills" / "iso-standards-readiness"
SCRIPTS = ROOT / "scripts"
CLI_NAMES = (
"gap_anal... | 679 | 25,483 |
scientific-agent-skills | tests/latchbio-integration/test_scripts.py | .py | """Tests for the Latch SDK inspector.
`inspect_latch_sdk.py` reports on whichever Latch SDK happens to be installed,
so almost none of it can be asserted against a fixed expectation. What *can* be
pinned is everything around that: the report shape, the exit-code contract, the
address scrubbing that makes two runs comp... | 266 | 10,794 |
scientific-agent-skills | tests/literature-review/test_scripts.py | .py | """Tests for the literature-review result processing.
`search_databases` is pure list manipulation over records from several
databases, so it is fully testable offline -- and worth testing, because every
function here can lose papers silently. Deduplication that trusts a title
merges two distinct papers; a year filter... | 275 | 11,486 |
scientific-agent-skills | tests/matchms/test_scripts.py | .py | """Tests for the matchms library-search helper.
`library_search.py` is a thin CLI over matchms, and almost everything that can
go wrong in it happens before or after the similarity calculation: the argument
validator that refuses pickle inputs and out-of-range thresholds, the
metric-name-to-class table that must cover... | 764 | 32,651 |
scientific-agent-skills | tests/deepchem/test_scripts.py | .py | """Tests for the DeepChem training scripts.
All three scripts end in a `model.fit(...)` that needs a GPU-scale budget and a
deep-learning backend, so none of them can be run to completion here. What can
be checked is everything that decides *what* gets trained, and that is where
these scripts can go wrong in ways a us... | 449 | 19,675 |
scientific-agent-skills | tests/pathogen-variant-surveillance/test_scripts.py | .py | """Unit tests for the pathogen-variant-surveillance skill scripts.
The offline tests stub every network call, so the suite runs without touching
GenSpectrum. A handful of live smoke tests are gated behind LAPIS_LIVE_TESTS=1;
they document the API behaviour the scripts were built against.
uv run --with pytest pyth... | 966 | 40,931 |
scientific-agent-skills | tests/liteparse/test_scripts.py | .py | """Tests for the liteparse batch directory parser.
Parsing is liteparse's job; the script owns file discovery, serialisation, and
error containment. All three are testable with a stub parser -- and the third
matters most: a batch run over a hundred documents must not abort because one
of them is corrupt.
`parse_one` ... | 220 | 8,100 |
scientific-agent-skills | tests/scientific-schematics/test_scripts.py | .py | """Tests for the scientific-schematics generator.
The environment-allowlist and CLI behaviour live in the shared contract, since
`latex-posters` and `literature-review` ship byte-identical copies of both
scripts. What is specific to this skill is its bundled `example_usage.sh` and
the document-type quality thresholds ... | 85 | 3,354 |
scientific-agent-skills | tests/pkpd-modeling/test_scripts.py | .py | """Tests for the pkpd-modeling skill scripts.
The value of this skill rests entirely on the numbers being right, so the tests
check against things that are true independently of the implementation:
* closed-form identities every linear PK model must satisfy (AUC = D/CL,
Vss = sum of volumes, MRT = Vss/CL, the Batem... | 868 | 42,920 |
scientific-agent-skills | tests/scanpy/test_scripts.py | .py | """Tests for the scanpy pipeline scripts.
Fifteen scripts share one `_common.py`, and that shared layer is where a
mistake propagates everywhere: a format dispatched to the wrong reader, an
output written without its parent directory, a summary that omits the
embeddings a later step depends on. So the tests concentrat... | 222 | 8,536 |
scientific-agent-skills | tests/deeptools/test_scripts.py | .py | """Tests for the deepTools helper scripts.
`workflow_generator` writes bash that a user is expected to run, so its input
sanitising is the security boundary of this skill: every path that reaches a
generated script passes `sanitize_path`, and every interpolation goes through
`shlex.quote`. Those tests come first, and ... | 320 | 13,128 |
scientific-agent-skills | tests/matplotlib/test_scripts.py | .py | """Tests for the matplotlib plotting templates and style configurator.
Rendering assertions are shallow by nature, so these tests go after the things
that can actually be wrong: that every style preset contains only rcParams
matplotlib recognises (a typo'd key is silently ignored, and the figure just
looks wrong), tha... | 237 | 9,541 |
scientific-agent-skills | tests/experimental-design/test_scripts.py | .py | """Tests for the experimental-design generators.
Randomisation and DOE code is easy to get subtly wrong in ways that no error
message reveals -- a block that does not actually balance, an allocation ratio
applied to the wrong arm, a design matrix decoded to the wrong real units. So
the assertions here are about the st... | 323 | 14,486 |
scientific-agent-skills | tests/pdf/test_scripts.py | .py | """Tests for the pdf skill's form tooling.
The coordinate transforms are the part worth pinning. PDF puts the origin at
the bottom-left and images put it at the top-left, so filling a form from
image-space boxes means flipping the y axis and scaling both axes. Getting the
flip backwards places every field on the wrong... | 288 | 11,343 |
scientific-agent-skills | tests/latex-posters/test_scripts.py | .py | """Tests for the latex-posters helpers.
The two schematic scripts are byte-identical to the copies in
`scientific-schematics` and `literature-review`, so their behaviour comes from
the shared contract. What is specific here is `review_poster.sh`, the shell
helper that renders and inspects a compiled poster.
"""
from ... | 116 | 4,405 |
scientific-agent-skills | tests/hypothesis-generation/test_scripts.py | .py | """Synthetic, dependency-free tests for the hypothesis-generation local CLIs."""
from __future__ import annotations
import ast
import csv
import json
import stat
import sys
import tempfile
import unittest
from pathlib import Path
sys.dont_write_bytecode = True
SKILL_ROOT = Path(__file__).resolve().parents[2] / "ski... | 401 | 17,272 |
scientific-agent-skills | tests/pylabrobot/test_clis.py | .py | """Deterministic tests for the PyLabRobot offline planning CLIs."""
from __future__ import annotations
import io
import json
import os
import sys
import tempfile
import unittest
from contextlib import redirect_stderr, redirect_stdout
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[2]
SKILL_ROOT... | 164 | 5,581 |
scientific-agent-skills | tests/bioservices/test_scripts.py | .py | """Tests for the BioServices cross-database workflow scripts.
BioServices *is* the network, so every service class is replaced here and the
tests assert on the request that would have been issued and on the parsing of a
canned response. Nothing in this file opens a connection.
The parsers are where these scripts can ... | 939 | 40,205 |
scientific-agent-skills | tests/protocolsio-integration/test_scripts.py | .py | """Dependency-free, mocked-network tests for protocols.io helper scripts."""
from __future__ import annotations
import io
import json
import os
import stat
import sys
import tempfile
import unittest
import urllib.error
from contextlib import redirect_stdout
from pathlib import Path
REPO_ROOT = Path(__file__).resolv... | 543 | 18,772 |
scientific-agent-skills | tests/scikit-survival/test_scripts.py | .py | #!/usr/bin/env python3
"""Synthetic, network-free tests for the scikit-survival helper CLIs."""
from __future__ import annotations
import ast
import json
import stat
import sys
import tempfile
import unittest
import pytest
from pathlib import Path
SKILL_ROOT = Path(__file__).resolve().parents[2] / "skills" / "scik... | 261 | 10,605 |
scientific-agent-skills | tests/openpiv/test_scripts.py | .py | """Tests for the OpenPIV processing and post-processing scripts.
A PIV pipeline can be wired up wrongly and still produce a plausible-looking
vector field, so the substantive tests here are built on fields whose answer is
known before the code runs. `run_openpiv` is driven with synthetic particle
image pairs displaced... | 494 | 22,313 |
scientific-agent-skills | tests/flowio/test_scripts.py | .py | """Tests for the FlowIO inspection helper.
`inspect_fcs` exists to read an untrusted FCS file without letting it decide how
much memory to allocate, so the guards are the product: the byte-size ceiling,
the estimated-array ceiling that is enforced *before* DATA is loaded, and the
multi-dataset offset walk that refuses... | 459 | 20,319 |
scientific-agent-skills | tests/clinical-decision-support/test_scripts.py | .py | """Synthetic tests for the research-only clinical-decision-support helpers."""
from __future__ import annotations
import ast
import copy
import json
import sys
import unittest
from pathlib import Path
sys.dont_write_bytecode = True
ROOT = Path(__file__).resolve().parents[2] / "skills" / "clinical-decision-support"
... | 257 | 11,281 |
scientific-agent-skills | tests/statistical-analysis/test_scripts.py | .py | """Tests for the statistical-analysis assumption checks.
These functions decide whether a parametric test is defensible, so the
assertions are constructed against data whose answer is known by construction:
a normal sample must pass Shapiro-Wilk, a lognormal one must fail; groups drawn
with equal variance must pass Le... | 214 | 8,697 |
scientific-agent-skills | tests/gtars/test_scripts.py | .py | """Dependency-free synthetic tests for Gtars skill helper CLIs."""
from __future__ import annotations
import base64
import contextlib
import hashlib
import io
import json
import os
import re
import sys
import tempfile
import unittest
from pathlib import Path
from unittest import mock
SKILL_ROOT = Path(__file__).res... | 432 | 15,245 |
scientific-agent-skills | tests/gtars/test_static.py | .py | """Static AST safety checks for bundled helper modules."""
from __future__ import annotations
import ast
import unittest
from pathlib import Path
SCRIPTS = Path(__file__).resolve().parents[2] / "skills" / "gtars" / "scripts"
def _word(*codepoints: int) -> str:
return "".join(chr(value) for value in codepoints... | 57 | 1,978 |
scientific-agent-skills | tests/pydeseq2/test_scripts.py | .py | """Tests for the PyDESeq2 analysis driver.
Everything expensive in this script happens inside PyDESeq2; what the script
itself owns is the data handling around it, and each piece of that is a way to
get a plausible-looking but wrong answer:
* orientation -- the counts file is genes x samples and DESeq2 wants samples ... | 411 | 17,681 |
scientific-agent-skills | tests/geopandas/test_scripts.py | .py | """Dependency-free help and exact-stack synthetic tests for local GeoPandas CLIs."""
from __future__ import annotations
import json
import os
import subprocess
import sys
import tempfile
import unittest
from importlib.metadata import version
from pathlib import Path
SKILL_ROOT = Path(__file__).resolve().parents[2] /... | 501 | 16,962 |
scientific-agent-skills | tests/geopandas/test_static.py | .py | """Static safety, packaging, provenance, and staleness checks."""
from __future__ import annotations
import ast
import re
import unittest
from pathlib import Path
SKILL_ROOT = Path(__file__).resolve().parents[2] / "skills" / "geopandas"
SCRIPTS = SKILL_ROOT / "scripts"
REFERENCES = SKILL_ROOT / "references"
CLI_NAME... | 222 | 8,460 |
scientific-agent-skills | tests/phylogenetics/test_scripts.py | .py | """Tests for the phylogenetics pipeline script.
The pipeline is a thin shell around MAFFT, IQ-TREE 2, and FastTree, none of
which are Python packages and none of which are installed here. What can still
be wrong -- and would only show up as a wasted multi-hour run -- is the *command
line* the script hands to them: MAF... | 508 | 22,901 |
scientific-agent-skills | tests/xlsx/test_scripts.py | .py | """Tests for the xlsx skill's recalculation helper.
The shared `office/` tree is covered by the contract. What is specific here is
`recalc`, which drives LibreOffice to recompute formulas -- and the safety
check in front of it.
That check is the interesting part. Recalculating a workbook whose formulas
point at *othe... | 186 | 6,957 |
scientific-agent-skills | tests/pyopenms/test_scripts.py | .py | """Tests for the pyOpenMS workflow scripts.
Sixteen scripts, most of them thin wrappers whose real content is a chain of
OpenMS algorithm calls that need instrument data to run. What can be checked
without a real LC-MS run is the part that goes wrong quietly, and that is what
these tests cover.
The mass arithmetic co... | 824 | 38,707 |
scientific-agent-skills | tests/relsa-severity-assessment/test_scripts.py | .py | """Tests for the relsa-severity-assessment scripts.
The anchor is external: the RELSA R package publishes a rendered worked example
(the "RELSA Score" vignette at https://talbotsr.com/RELSA/, from the `surgery`
dataset, animal Ca_001) that prints its own normalized values, RELSA weights,
and scores. `RParityTests` pin... | 618 | 28,367 |
scientific-agent-skills | tests/pathway-enrichment/test_scripts.py | .py | """Tests for the pathway-enrichment input handling.
The enrichment call itself goes to Enrichr or a local GMT, so what is worth
testing offline is everything that decides *which genes, in which order* get
sent -- and that is where enrichment analyses usually go wrong. A mouse symbol
left upper-cased silently matches n... | 233 | 9,721 |
scientific-agent-skills | tests/_meta/test_repo_contract.py | .py | """Repo-wide guards: every skill conforms, and every skill with scripts is tested.
This suite is deliberately not per-skill. It imports no skill code -- the
structural contract parses scripts with `ast` and never executes them -- so
running it across all skills in one interpreter is safe, and it is the only
place that... | 184 | 6,668 |
scientific-agent-skills | tests/neurokit2/test_scripts.py | .py | #!/usr/bin/env python3
"""Dependency-free and pinned-runtime tests for NeuroKit2 skill helpers."""
from __future__ import annotations
import ast
import importlib.util
import json
import os
import stat
import subprocess
import sys
import tempfile
import unittest
from pathlib import Path
SKILL_ROOT = Path(__file__).re... | 373 | 13,522 |
scientific-agent-skills | tests/pytorch-lightning/test_scripts.py | .py | """Tests for the PyTorch Lightning module, datamodule, and trainer templates.
A template is only useful if it runs, and these had three ways of not running.
`configure_optimizers` passed `verbose=True` to `ReduceLROnPlateau`, which
PyTorch removed, so every model built from the template raised TypeError before
the fir... | 444 | 20,141 |
scientific-agent-skills | tests/simpy/test_scripts.py | .py | #!/usr/bin/env python3
"""Synthetic, network-free tests for the SimPy skill scripts."""
from __future__ import annotations
import ast
import json
import math
import stat
import subprocess
import sys
import tempfile
import unittest
import pytest
from pathlib import Path
# Guarded so a bare project-environment run sk... | 460 | 17,700 |
scientific-agent-skills | tests/shap/test_scripts.py | .py | """Tests for the SHAP tabular report generator.
The report's one substantive claim is additivity: with an interventional
TreeExplainer in probability space, a row's base value plus its SHAP values must
reconstruct the model's predicted probability for that row. That identity is a
theorem about Shapley values, not a pr... | 343 | 15,186 |
scientific-agent-skills | tests/qutip/test_qutip_synthetic.py | .py | """Pinned, network-free synthetic physics tests for QuTiP 5.3.0."""
from __future__ import annotations
import inspect
import json
import math
import sys
import unittest
import pytest
from pathlib import Path
import numpy as np
# Guarded so a bare project-environment run skips cleanly instead of failing
# collection... | 328 | 11,200 |
scientific-agent-skills | tests/qutip/test_scripts.py | .py | """Dependency-free tests for QuTiP skill CLI safety and planners."""
from __future__ import annotations
import json
import stat
import sys
import tempfile
import unittest
from pathlib import Path
SKILL_ROOT = Path(__file__).resolve().parents[2] / "skills" / "qutip"
SCRIPTS = SKILL_ROOT / "scripts"
sys.path.insert(0... | 209 | 7,999 |
scientific-agent-skills | tests/qutip/test_qutip_graphics.py | .py | """Pinned plotting smoke tests for the QuTiP 5.3 graphics extra."""
from __future__ import annotations
import unittest
import pytest
# Guarded so a bare project-environment run skips cleanly instead of failing
# collection; the real run is `tests/run_all.py --isolated qutip`.
matplotlib = pytest.importorskip("matpl... | 70 | 2,015 |
scientific-agent-skills | tests/qutip/test_static.py | .py | """Static safety, provenance, and QuTiP 5 migration tests."""
from __future__ import annotations
import ast
import re
import unittest
from pathlib import Path
from urllib.parse import urlparse
SKILL_ROOT = Path(__file__).resolve().parents[2] / "skills" / "qutip"
SCRIPTS = SKILL_ROOT / "scripts"
REFERENCES = SKILL_R... | 187 | 7,327 |
scientific-agent-skills | tests/bulk-rnaseq/test_scripts.py | .py | """Tests for the bulk RNA-seq samplesheet validator and counts-matrix builder.
`validate_samplesheet` is the gate in front of an expensive pipeline run, and
the distinction it draws between an error and a warning is the whole product:
a duplicated FASTQ is fatal, the same sample across lanes is not. Every test
here as... | 385 | 16,776 |
scientific-agent-skills | skills/pydicom/scripts/dicom_inventory.py | .py | #!/usr/bin/env python3
"""Bounded metadata-only DICOM technical inventory and structural checks."""
from __future__ import annotations
import argparse
import sys
from collections import Counter
from typing import Any
from _common import (
DEFAULT_MAX_DECOMPRESSED_BYTES,
DEFAULT_MAX_FILES,
DEFAULT_MAX_FRA... | 403 | 13,597 |
scientific-agent-skills | skills/pydicom/scripts/deidentification_audit.py | .py | #!/usr/bin/env python3
"""Audit DICOM metadata for bounded de-identification review signals."""
from __future__ import annotations
import argparse
import sys
from collections import Counter
from typing import Any
from _common import (
DEFAULT_MAX_ELEMENTS,
DEFAULT_MAX_FILES,
DEFAULT_MAX_INPUT_BYTES,
... | 381 | 13,090 |
scientific-agent-skills | skills/pydicom/scripts/extract_metadata.py | .py | #!/usr/bin/env python3
"""Emit a redacted, allowlisted technical DICOM metadata inventory."""
from __future__ import annotations
import argparse
import sys
from collections import Counter
from typing import Any
from _common import (
DEFAULT_MAX_FILES,
DEFAULT_MAX_INPUT_BYTES,
HARD_MAX_FILES,
HARD_MAX... | 331 | 11,452 |
scientific-agent-skills | skills/pydicom/scripts/_common.py | .py | """Shared, dependency-light safety helpers for the pydicom skill CLIs."""
from __future__ import annotations
import hashlib
import hmac
import json
import os
import re
import stat
import sys
import tempfile
from collections import Counter
from collections.abc import Callable, Iterable, Mapping
from pathlib import Pat... | 917 | 29,812 |
scientific-agent-skills | skills/pydicom/scripts/pixel_frame_planner.py | .py | #!/usr/bin/env python3
"""Plan bounded DICOM frame decoding from metadata without loading pixels."""
from __future__ import annotations
import argparse
import re
import sys
from typing import Any
from _common import (
DEFAULT_MAX_DECOMPRESSED_BYTES,
DEFAULT_MAX_FRAMES,
DEFAULT_MAX_INPUT_BYTES,
HARD_M... | 304 | 10,130 |
scientific-agent-skills | skills/pydicom/scripts/anonymize_dicom.py | .py | #!/usr/bin/env python3
"""Create a bounded, pseudonymized DICOM derivative without compliance claims.
This local-only helper preserves the source file and writes a new output. DICOM
metadata, file names, private elements, overlays, structured content, and pixel
data may contain PHI. The starter profile is deliberately... | 714 | 25,805 |
scientific-agent-skills | skills/pydicom/scripts/transfer_syntax_inspector.py | .py | #!/usr/bin/env python3
"""Inspect installed pydicom transfer-syntax decoder/encoder capabilities."""
from __future__ import annotations
import argparse
import importlib.metadata
import sys
from pathlib import Path
from typing import Any
from _common import (
DEFAULT_MAX_INPUT_BYTES,
HARD_MAX_INPUT_BYTES,
... | 246 | 7,881 |
scientific-agent-skills | skills/pydicom/scripts/dicom_to_image.py | .py | #!/usr/bin/env python3
"""Render one bounded DICOM frame for non-diagnostic review."""
from __future__ import annotations
import argparse
import io
import sys
from pathlib import Path
from typing import Any
from _common import (
DEFAULT_MAX_DECOMPRESSED_BYTES,
DEFAULT_MAX_INPUT_BYTES,
DEFAULT_MAX_OUTPUT_... | 460 | 15,486 |
scientific-agent-skills | skills/pydicom/scripts/uid_mapping_validator.py | .py | #!/usr/bin/env python3
"""Validate bounded DICOM UID mapping consistency without printing UIDs."""
from __future__ import annotations
import argparse
import os
import stat
import sys
from collections import Counter
from collections.abc import Mapping
from pathlib import Path
from typing import Any
from _common impor... | 241 | 8,533 |
scientific-agent-skills | skills/opentrons-integration/scripts/basic_protocol_template.py | .py | """Minimal Opentrons Flex protocol template.
Simulate and analyze this protocol before any physical run. Replace the
labware, volumes, liquids, and deck layout with a validated wet-lab method.
"""
from opentrons import protocol_api
metadata = {
"protocolName": "Flex Basic Transfer Template",
"author": "Custo... | 69 | 1,851 |
scientific-agent-skills | skills/opentrons-integration/scripts/serial_dilution_template.py | .py | """Full-plate 1:2 serial dilution on Opentrons Flex.
Physical setup:
- Put at least 12 mL diluent in reservoir A1.
- Put 200 µL stock in every well of plate column 1.
- Leave plate columns 2-12 empty.
The protocol fills columns 2-12 with 100 µL diluent, serially transfers
100 µL across the plate, and removes 100 µL f... | 114 | 3,229 |
scientific-agent-skills | skills/opentrons-integration/scripts/absorbance_reader_template.py | .py | """Opentrons Flex Absorbance Plate Reader workflow template.
The module is Flex-only. Confirm plate compatibility, wavelengths, sample
volume, optical method, Gripper setup, and deck clearances. Simulated readings
are zeros and simulated runs do not write CSV output.
"""
from opentrons import protocol_api
metadata =... | 83 | 2,329 |
scientific-agent-skills | skills/opentrons-integration/scripts/pcr_setup_template.py | .py | """Eight-reaction PCR setup and cycling template for Opentrons Flex.
This is an automation example, not a validated PCR method. Confirm reagent
volumes, dead volume, temperatures, cycle profile, plate, seal, and tip policy
for the assay. Simulate and complete a nonhazardous dry run before use.
"""
from opentrons impo... | 147 | 4,440 |
scientific-agent-skills | skills/opentrons-integration/scripts/runtime_parameters_template.py | .py | """Flex runtime-parameter template with simulation-safe defaults.
The operator can choose sample count, transfer volume, and dry-run mode in the
Opentrons App without editing source code. Validate the full allowed parameter
space and volume budget before adapting this template to an assay.
"""
from opentrons import p... | 111 | 3,197 |
scientific-agent-skills | skills/opentrons-integration/scripts/ot2_basic_protocol_template.py | .py | """Minimal Opentrons OT-2 protocol template.
The OT-2 maximum at this skill's 2026-07-23 baseline is Protocol API 2.28.
Simulate and analyze this file in the OT-2 App before physical execution.
"""
from opentrons import protocol_api
metadata = {
"protocolName": "OT-2 Basic Transfer Template",
"author": "Cust... | 64 | 1,706 |
scientific-agent-skills | skills/primekg/scripts/query_primekg.py | .py | import pandas as pd
import os
import json
from typing import List, Dict, Optional, Union
# Where kg.csv lives. Override with the PRIMEKG_DATA environment variable, or
# by assigning to DATA_PATH before calling any query function.
DATA_PATH = os.environ.get("PRIMEKG_DATA", "data/PrimeKG/kg.csv")
def _load_kg():
""... | 129 | 5,013 |
scientific-agent-skills | skills/stable-baselines3/scripts/custom_env_template.py | .py | """
Template for creating custom Gymnasium environments compatible with Stable Baselines3.
This template demonstrates:
- Proper Gymnasium environment structure
- Observation and action space definition
- Step and reset implementation
- Validation with SB3's env_checker
- Registration with Gymnasium
"""
import gymnasi... | 315 | 9,350 |
scientific-agent-skills | skills/stable-baselines3/scripts/evaluate_agent.py | .py | """
Template script for evaluating trained RL agents with Stable Baselines3.
This template demonstrates:
- Loading trained models
- Evaluating performance with statistics
- Recording videos of agent behavior
- Visualizing agent performance
"""
import gymnasium as gym
import numpy as np
from stable_baselines3 import P... | 246 | 7,335 |
scientific-agent-skills | skills/stable-baselines3/scripts/train_rl_agent.py | .py | """
Template script for training RL agents with Stable Baselines3.
This template demonstrates best practices for:
- Setting up training with proper monitoring
- Using callbacks for evaluation and checkpointing
- Vectorized environments for efficiency
- TensorBoard integration
- Model saving and loading
"""
import gym... | 166 | 5,123 |
scientific-agent-skills | skills/pyhealth/assets/starter_pipeline.py | .py | """
PyHealth starter pipeline. Replace the four marked lines for a different
dataset/task/model/monitor. Everything else stays the same.
Run:
uv run python starter_pipeline.py
"""
from pyhealth.datasets import MIMIC3Dataset, split_by_patient, get_dataloader
from pyhealth.tasks import MortalityPredictionMIMIC3
fro... | 59 | 2,338 |
scientific-agent-skills | skills/lab-hardware-cad/scripts/_common.py | .py | """Shared helpers for the lab-hardware-cad scripts.
Import of build123d is deferred so that standard-library-only commands
(``check.py standards``) work in an environment without the CAD kernel.
"""
from __future__ import annotations
import hashlib
import importlib.util
import json
import sys
from pathlib import Pat... | 651 | 25,023 |
scientific-agent-skills | skills/lab-hardware-cad/scripts/gen.py | .py | #!/usr/bin/env python3
"""Generate fabrication artifacts from a parametric build123d model.
Runs a model file's ``build()``, exports STEP (authoritative) and STL (preview and
printing), and writes a manifest recording the source hash, resolved parameters,
library versions, and measured geometry.
python scripts/ge... | 265 | 10,764 |
scientific-agent-skills | skills/lab-hardware-cad/scripts/check.py | .py | #!/usr/bin/env python3
"""Deterministic checks on lab-hardware geometry.
python scripts/check.py standards --list
python scripts/check.py standards --show slas-microplate-footprint
python scripts/check.py facts out/carrier.step
python scripts/check.py interfaces out/carrier.manifest.json
python scr... | 646 | 27,155 |
scientific-agent-skills | skills/lab-hardware-cad/scripts/snapshot.py | .py | #!/usr/bin/env python3
"""Render a part to a multi-view PNG for mandatory visual review.
python scripts/snapshot.py out/carrier.step --out out/carrier.png
python scripts/snapshot.py carrier_model.py --out out/carrier.png --views iso,front,top
Renders offscreen through matplotlib's Agg backend, so it needs no ... | 279 | 10,909 |
scientific-agent-skills | skills/uncertainty-and-units/scripts/uncertainty_budget.py | .py | #!/usr/bin/env python3
"""Turn a list of uncertainty components into a GUM uncertainty budget.
Each component arrives the way it is actually stated on a certificate, a data
sheet, or a repeatability worksheet. The divisor that converts it to a standard
uncertainty depends on which of those it is, and getting that divi... | 364 | 13,396 |
scientific-agent-skills | skills/uncertainty-and-units/scripts/format_result.py | .py | #!/usr/bin/env python3
"""Round and render a measurement result the way JCGM 100:2008 7.2 requires.
The uncertainty is rounded to one or two significant digits first, and the
value is then rounded to that same decimal place. Doing it in the other order,
or not at all, produces the familiar `12.34567 +/- 0.1` that clai... | 327 | 11,707 |
scientific-agent-skills | skills/uncertainty-and-units/scripts/check_plausibility.py | .py | #!/usr/bin/env python3
"""Test a set of quantities against dimensionless groups and known physical scales.
Unit bookkeeping proves a calculation is dimensionally consistent. It cannot
say whether the answer is physically possible. A cell 2 m across, a Reynolds
number of 4e7 in a capillary, and a diffusion time of 300 ... | 895 | 34,751 |
scientific-agent-skills | skills/uncertainty-and-units/scripts/propagate_uncertainty.py | .py | #!/usr/bin/env python3
"""Propagate uncertainty through a measurement model two ways and compare them.
The GUM uncertainty framework (JCGM 100:2008) linearizes the model about the
best estimates. A Monte Carlo run (JCGM 101:2008) propagates the distributions
themselves. Clause 8 of JCGM 101 turns the difference betwee... | 663 | 26,346 |
scientific-agent-skills | skills/uncertainty-and-units/scripts/_common.py | .py | #!/usr/bin/env python3
"""Shared, standard-library-first helpers for the uncertainty and unit CLIs."""
from __future__ import annotations
import ast
import json
import math
import os
import stat
import tempfile
from pathlib import Path
from typing import Any, Callable, Iterable
MAX_INPUT_BYTES = 4 * 1024 * 1024
MAX... | 667 | 21,872 |
scientific-agent-skills | skills/uncertainty-and-units/scripts/audit_units.py | .py | #!/usr/bin/env python3
"""Scan Python source for the unit and uncertainty defects that stay silent.
Every rule here corresponds to code that runs, produces a plausible number, and
is wrong: a stripped unit, a rescaled covariance matrix, a destroyed
correlation, a population standard deviation used as a standard uncert... | 576 | 21,214 |
scientific-agent-skills | skills/uncertainty-and-units/scripts/convert_units.py | .py | #!/usr/bin/env python3
"""Convert a quantity between units, including the conversions that need a context.
Wavelength to photon energy, mass to amount of substance, and energy to
temperature are not dimensional conversions - they are physical relations that
pint only performs inside a named context. This CLI makes the... | 281 | 10,353 |
scientific-agent-skills | skills/venue-templates/scripts/query_template.py | .py | #!/usr/bin/env python3
"""List and query the templates actually bundled with venue-templates.
Examples:
python scripts/query_template.py --list-all
python scripts/query_template.py --venue NeurIPS --requirements
python scripts/query_template.py --type grants
python scripts/query_template.py --keyword a... | 203 | 7,991 |
scientific-agent-skills | skills/venue-templates/scripts/customize_template.py | .py | #!/usr/bin/env python3
"""
Customize Template Script
Customize LaTeX templates with author information and project details.
Usage:
python customize_template.py --template nature_article.tex --output my_paper.tex
python customize_template.py --template nature_article.tex --title "My Research" --output my_paper.... | 207 | 6,875 |
scientific-agent-skills | skills/venue-templates/scripts/validate_format.py | .py | #!/usr/bin/env python3
"""Inspect a submission PDF using a verified limit or an explicit source.
This tool does not infer where references or appendices begin and cannot prove
margin or font-size compliance. Supply --content-pages after counting pages
according to the official venue rule.
Examples:
python scripts... | 322 | 10,603 |
scientific-agent-skills | skills/treatment-plans/scripts/validate_traceability.py | .py | #!/usr/bin/env python3
"""Validate source-fact traceability without interpreting source content."""
from __future__ import annotations
import argparse
import sys
from _common import (
Issue,
ValidationError,
all_fact_references,
error_report,
load_package,
print_report,
report_payload,
... | 148 | 4,596 |
scientific-agent-skills | skills/treatment-plans/scripts/check_consistency.py | .py | #!/usr/bin/env python3
"""Check cross-record consistency without clinical interpretation."""
from __future__ import annotations
import argparse
import sys
from datetime import date
from typing import Any
from _common import (
Issue,
ValidationError,
load_package,
parse_iso_datetime,
print_report,... | 387 | 12,614 |
scientific-agent-skills | skills/treatment-plans/scripts/validate_treatment_plan.py | .py | #!/usr/bin/env python3
"""Validate strict JSON structure without evaluating clinical content."""
from __future__ import annotations
import argparse
import sys
from _common import (
TEMPLATE_FILES,
Issue,
ValidationError,
error_report,
load_target,
print_report,
report_payload,
validat... | 96 | 2,538 |
scientific-agent-skills | skills/treatment-plans/scripts/privacy_process_check.py | .py | #!/usr/bin/env python3
"""Check documented privacy process without determining compliance."""
from __future__ import annotations
import argparse
import sys
from _common import (
Issue,
ValidationError,
direct_identifier_key_paths,
error_report,
load_package,
print_report,
report_payload,
... | 214 | 6,583 |
scientific-agent-skills | skills/treatment-plans/scripts/_common.py | .py | #!/usr/bin/env python3
"""Bounded, dependency-free helpers for local treatment-plan JSON records."""
from __future__ import annotations
import json
import os
import re
import tempfile
from dataclasses import dataclass
from datetime import date, datetime
from pathlib import Path
from typing import Any, Iterable
SCHEM... | 1,161 | 39,558 |
scientific-agent-skills | skills/treatment-plans/scripts/timeline_generator.py | .py | #!/usr/bin/env python3
"""Create a schedule from explicitly supplied dates only."""
from __future__ import annotations
import argparse
import sys
from datetime import date
from _common import (
NOTICE,
SCHEMA_VERSION,
Issue,
ValidationError,
atomic_write_json,
error_report,
load_package,
... | 261 | 8,063 |
scientific-agent-skills | skills/treatment-plans/scripts/check_completeness.py | .py | #!/usr/bin/env python3
"""Check documentation gates without assessing clinical adequacy."""
from __future__ import annotations
import argparse
import sys
from _common import (
Issue,
ValidationError,
error_report,
load_package,
print_report,
report_payload,
validate_package_structure,
)
... | 573 | 18,545 |
scientific-agent-skills | skills/treatment-plans/scripts/generate_template.py | .py | #!/usr/bin/env python3
"""Generate a fail-closed local JSON documentation package."""
from __future__ import annotations
import argparse
import sys
from pathlib import Path
from _common import (
IDENTIFIER_RE,
TEMPLATE_FILES,
ValidationError,
atomic_write_json,
copy_template_document,
error_r... | 134 | 3,833 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.