text
stringlengths
185
73.3k
repo
stringlengths
7
100
path
stringlengths
4
146
language
stringclasses
7 values
hash
stringlengths
16
16
score
float64
7
8.5
stars
int64
0
237k
from importlib.metadata import entry_points from typing import TYPE_CHECKING from druks.apps import App from .exceptions import AppImportError, AppNotFound, MalformedApp if TYPE_CHECKING: from importlib.metadata import EntryPoint from types import ModuleType from fastapi import FastAPI _GROUP = "druks....
czpython/druks
backend/druks/apps/loader.py
.py
a3836b9608f5e1f5
7.48
8
import importlib import pkgutil from collections.abc import Callable from types import ModuleType from typing import Any # Leaf-module names that carry self-registering capabilities. ``autodiscover`` # imports exactly these (``routes`` defines routers the loader mounts; the rest # fire registration as an import side e...
czpython/druks
backend/druks/apps/registry.py
.py
524b0fb98af62071
7.48
8
import asyncio import json import shlex import tempfile from pathlib import Path from urllib.parse import urlsplit import asyncssh from fastapi import WebSocket from druks.browser import exceptions from druks.browser.constants import ( LOGIN_WINDOW_KEY_PREFIX, LOGIN_WINDOW_TTL_SECONDS, SCREEN_CHUNK_BYTES,...
czpython/druks
backend/druks/browser/login.py
.py
824f86d67ceb4721
7.48
8
import json import tempfile from contextlib import asynccontextmanager from dataclasses import dataclass, field from pathlib import Path from druks.apps.registry import browser_sessions from druks.browser.constants import ( SESSION_EXPORT_TIMEOUT_SECONDS, SESSION_LAUNCH_TIMEOUT_SECONDS, ) from druks.browser.en...
czpython/druks
backend/druks/browser/sessions.py
.py
34e93749cf7f0f87
7.48
8
from typing import Self from druks.contrib.review.schemas import ReviewSummary from druks.workflows import Subject class PullRequest(Subject): """The pull request a review is about. Druks keeps no row for one, so the handle is the whole record — ``owner/repo#7`` is what everything else reads back out of, ...
czpython/druks
backend/druks/contrib/review/datastructures.py
.py
adefc77b552f186f
7.48
8
"""Fixtures for the cross-product GxP validation example. All VIP core fixtures (vip_config, connect_client, workbench_client, expected_r_versions, expected_python_versions, page, etc.) are available automatically via the VIP plugin. This conftest adds only the fixtures unique to this example: - check_packages --...
posit-dev/vip
examples/cross_product_validation/conftest.py
.py
7fa52c50a280b24b
7.98
8
"""Example custom test - extend VIP with site-specific checks. Place this file (and its .feature file) in a directory, then configure VIP to include it: [general] extension_dirs = ["/path/to/custom_tests"] Or on the command line: vip verify --config vip.toml --extensions /path/to/custom_tests This is t...
posit-dev/vip
examples/custom_tests/test_custom_check.py
.py
b420ee0d2f79e4ae
7.98
8
"""Generate feature matrix JSON — test areas × products cross-tab. USAGE: uv run python scripts/generate-feature-matrix.py [--output PATH] Derives semantic "test areas" by normalising feature file stems across categories, then cross-tabulates which products each area covers. For cross-cutting categories (cross_p...
posit-dev/vip
scripts/generate-feature-matrix.py
.py
353fc2d99ad82a08
7.48
8
"""Generate a test catalog JSON file from Gherkin feature files. USAGE: uv run python scripts/generate-test-catalog.py [--output PATH] Walks ``tests/`` for all ``*.feature`` files, parses them with ``vip.gherkin.parse_feature_file``, groups by category, and writes a JSON catalog to ``website/src/data/test-catalog...
posit-dev/vip
scripts/generate-test-catalog.py
.py
227b4c09e1ee2afc
7.98
8
"""Compute the next calver release version from the last tag and today's date. USAGE: uv run python scripts/next_version.py [--last-tag TAG] [--today YYYY-MM-DD] VIP releases on a calendar-versioned, weekly train: the first release of a calendar month is ``YYYY.M.0``; every later release that month bumps the patc...
posit-dev/vip
scripts/next_version.py
.py
bc3659961c4852c3
7.48
8
"""Selftest fixtures. These tests verify the VIP framework itself and can run without any Posit products. They are separate from the ``tests/`` directory which contains the actual verification suite. """ from __future__ import annotations from pathlib import Path import pytest # Enable the pytester fixture for pl...
posit-dev/vip
selftests/conftest.py
.py
a259a277ddc08f30
7.98
8
"""Tests for the `vip install` CLI command.""" from __future__ import annotations import subprocess from pathlib import Path import pytest def test_vip_install_help_lists_command(): cp = subprocess.run(["uv", "run", "vip", "--help"], capture_output=True, text=True, check=True) assert "install" in cp.stdout...
posit-dev/vip
selftests/install/test_cli_install.py
.py
8d4ca147e9ff59e1
7.98
8
"""Tests for src/vip/install/playwright.py.""" from __future__ import annotations from io import StringIO from pathlib import Path import pytest from vip.install import playwright as pw def test_default_cache_dir_linux(monkeypatch, tmp_path: Path): monkeypatch.setattr(pw.sys, "platform", "linux") monkeypa...
posit-dev/vip
selftests/install/test_playwright.py
.py
f6a7956841047969
7.98
8
"""The --proxy / --no-proxy CLI flags must emit a correct [proxy] TOML section. ``vip verify`` with URL flags (no --config) synthesizes a temp vip.toml via ``_generate_temp_config``. These tests exercise that generator directly and load the result back through ``load_config`` to confirm the flags round-trip into a Pro...
posit-dev/vip
selftests/test_cli_proxy.py
.py
962fa217d08b389b
7.98
8
"""Tests for ``vip --version`` and the ``vip version`` subcommand.""" from __future__ import annotations import sys import pytest class TestMinimumSupportedVersion: """The declared MINIMUM_SUPPORTED_POSIT_TEAM support floor.""" def test_parses_as_posit_calendar_version(self): from vip.version impo...
posit-dev/vip
selftests/test_cli_version.py
.py
e4a9e6293cdd5662
7.98
8
"""Guards VIP's published dependency-pinning policy (issue #399). The wheel published to PyPI carries whatever version constraints live in ``pyproject.toml``'s ``[project.dependencies]``. To keep ``uv tool install posit-vip`` / ``pip install posit-vip`` producing predictable output, the dependencies that shape a ``vip...
posit-dev/vip
selftests/test_dependency_pins.py
.py
39f9dfd0cc7282c4
7.98
8
"""Guard that .dockerignore keeps up with pyproject's forced includes. ``.dockerignore`` excludes ``examples/*`` wholesale and then re-includes, by hand, the directories that ``[tool.hatch.build.targets.wheel.force-include]`` pulls into the wheel. Those two lists are separate files with no mechanical link, so adding a...
posit-dev/vip
selftests/test_dockerignore_force_includes.py
.py
697f7b3c0a795cc8
7.98
8
"""Regression tests for extension-directory fixture visibility (issue #609). pytest scopes ``conftest.py`` fixtures by directory ancestry. Before this fix, VIP's core fixtures (``vip_config``, ``connect_client``, etc.) and BDD step definitions lived only in ``src/vip_tests/conftest.py``, so a test collected from a di...
posit-dev/vip
selftests/test_extension_fixtures.py
.py
43faf5b5e4e92d2d
7.98
8
"""Tests for vip.http_semantics helpers. Placed in selftests/ so they run in CI without a real Posit deployment. """ from __future__ import annotations import httpx import pytest from vip.http_semantics import denied_by_external_gateway def _resp( status_code: int, *, request_url: str = "https://conne...
posit-dev/vip
selftests/test_http_semantics.py
.py
d423f1349579ccab
7.98
8
"""Tests for vip.idp module — IdP form strategy dispatch.""" from __future__ import annotations from unittest.mock import MagicMock, patch import pytest from vip.auth import AuthConfigError from vip.idp import SUPPORTED_IDPS, _fill_snowflake_login, get_idp_strategy class TestGetIdpStrategy: def test_keycloak_...
posit-dev/vip
selftests/test_idp.py
.py
0e258b87e83dcdee
7.98
8
"""Tests for scripts/next_version.py's calver release computation. ``scripts/`` is release machinery, not part of the installed package, so it is never on the default import path. ``testpaths`` in ``pyproject.toml`` also points at ``src/vip_tests``, not here -- both mean this module needs an explicit ``sys.path`` inse...
posit-dev/vip
selftests/test_next_version.py
.py
676f545005af5b6b
7.98
8
"""Tests for versioned Workbench page-object resolution. Covers ``get_homepage`` (versioned page-object factory) and ``get_new_session_dialog_close_strategy`` (version-keyed behavior strategy dict), both in ``vip_tests.workbench.pages.homepage``, plus the cross-build coverage of the ``RStudioSession`` Workbench Jobs s...
posit-dev/vip
selftests/test_pages.py
.py
46cb6f7425d179ad
7.98
8
#!/usr/bin/env python3 """ 自动 Skill 匹配引擎 根据用户需求自动推荐最合适的 Skill,并进行安全审核 """ from __future__ import annotations import json import re from dataclasses import dataclass from pathlib import Path from typing import List, Dict, Any, Optional, Tuple import sys @dataclass class SkillMatch: """Skill 匹配结果""" name: str...
AIPMAndy/soskill
scripts/auto_skill_matcher.py
.py
67938369ffa50da4
7.54
11
#!/usr/bin/env python3 """Optimized skill fetcher with incremental updates, caching, and quality scoring.""" from __future__ import annotations import argparse import csv import hashlib import json import os import re import sys import time from dataclasses import dataclass, field from datetime import datetime, timed...
AIPMAndy/soskill
scripts/fetcher_v2.py
.py
c34b37b75ded0f63
7.54
11
#!/usr/bin/env python3 """ SoSkill 推荐引擎 - 极简版 根据用户需求推荐 Skill,支持自动安装 """ import json import subprocess import sys from pathlib import Path from typing import List, Dict # 添加项目根目录到 Python 路径 project_root = Path(__file__).parent.parent sys.path.insert(0, str(project_root)) from scripts.auto_skill_matcher import SkillMa...
AIPMAndy/soskill
scripts/recommend_skill.py
.py
26edcec43c891e4c
7.54
11
"""Output composition metrics (Axe C): what the assistant actually produced. This module turns assistant ``tool_use`` blocks into **metrics only** -- it never persists a byte of the source code Claude wrote. From a file-editing tool call it derives: * the **language** (mapped from the ``file_path`` extension), * the ...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/compose.py
.py
1194fec3cc401a8a
7.65
19
"""Configuration loading and environment handling. :func:`load_config` is a pure read: it never creates files. The default ``config.yml`` is written explicitly via :func:`write_default_config` (exposed as the ``config init`` CLI subcommand). """ from __future__ import annotations import copy from pathlib import Path...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/config.py
.py
b5e194e5abfe0e15
7.65
19
"""Shared ECharts layer for the dashboard. The dashboard's only chart engine: Apache ECharts via ``streamlit-echarts`` (it replaced the former Plotly render path, see ``docs/MIGRATION-ECHARTS.md``). Color *semantics* (token types, model families, categories, project colors) and the typographic helpers stay in ``theme....
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/dashboard/echarts.py
.py
3fd81b18e82a337f
7.65
19
"""Models page: how usage, cost and per-session spend split across models. The subscription-vs-usage cost comparison (Claude plans, GitHub Copilot) lives on the Quotas page. Migrated to Apache ECharts (``docs/MIGRATION-ECHARTS.md``). Every view is on the *model* dimension, so each one is a cross-filter **emitter** — ...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/dashboard/pages/2_models.py
.py
f4ab35c1df180b2c
7.65
19
"""Session depth: what a prompt costs — and what it's made of — as a session deepens. The showcase of prompt-level positioning (8.4). Two linked stories, read top to bottom: 1. **Cost** — a box plot of what *one* prompt costs at each depth band (median line, box = middle 50%, whiskers = p5–p95; the y-axis is clipp...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/dashboard/pages/4_session_depth.py
.py
dce8d9744a7df841
7.65
19
"""Sessions page: where the money goes by project/session, plus a drill-down. Migrated to Apache ECharts (``docs/MIGRATION-ECHARTS.md``). Emitters (§4): * the **project pareto** is a cross-filter emitter -- clicking a bar narrows the whole dashboard to that project (``filters.KEY_PROJECTS``); * the **treemap** is a...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/dashboard/pages/5_sessions.py
.py
7517b637077a1a7b
7.65
19
"""Optimize page: the prescriptive analyses (7.4) — what to do, with numbers. Reworked for clarity (browser review: the three raw analyses read as a jargon heavy dump with no takeaway). The page now leads with a headline — how much cache spend looks *avoidable* and which lever dominates — then tells one story in three...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/dashboard/pages/6_optimize.py
.py
46fef88e0a8713bb
7.65
19
"""Compare page: before vs after a switch date, in workload-normalized ratios. The capstone transverse view (Axe E / DASH2). Pick a *switch date* — when you installed a tool, scoped a CLAUDE.md, changed a model — and the page splits the whole extracted history on it and reads it as **before (left) vs after (right)**. ...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/dashboard/pages/9_compare.py
.py
5cfb224e64712bf8
7.65
19
"""Shared in-cell colour scaling for the Explorer tables. The Prompt Explorer and the File Explorer show the same kinds of magnitude -- plain **counts** (edits, lines, reads, prompts, chars) and **costs** (context $, load, rent, prompt cost). Both shade each cell by its magnitude (a per-column heat scale), counts in b...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/dashboard/tables.py
.py
4518d64261fd2bfd
7.65
19
"""Semantic embeddings — the single door to the vector model (Axe B1). The semantic layer (mono-label classifier B1, taxonomy audit B1.2, task clustering B2) all read prompt text as **vectors in one shared space**. This module is that space, and the *only* place the embedding model is touched. Design, decided 2026-06...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/embeddings.py
.py
cbd7a7b129535182
7.65
19
"""Shared filesystem locations (Claude config dir, parse cache). Single source of truth for the two machine-dependent roots (08 m1/m2): * the Claude Code data directory -- ``~/.claude`` by default, overridable with ``CLAUDE_CONFIG_DIR`` exactly like Claude Code itself (previously honored by ``snapshot`` but not b...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/paths.py
.py
43c4f3521d77bcd7
7.65
19
"""Model pricing lookup utilities.""" from __future__ import annotations import importlib.resources import re from pathlib import Path from typing import Any, cast import yaml __all__ = [ "load_pricing", "get_model_pricing", "get_per_request", "load_plans", "is_long_context", "clear_cache", ...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/pricing.py
.py
f07787c932bc5ceb
7.65
19
"""Rendering of :class:`~prompt_analytics.analytics.TableResult` results. One entry point, :func:`render`, honoring ``--format table|csv|json`` (7.4): * ``table`` -- a rich table on stdout, notes dimmed below it. * ``csv`` -- raw values on stdout (header = column keys), notes on stderr so the CSV stream stays mac...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/render.py
.py
fbc4ae2df90e0cb3
7.65
19
"""Snapshot Claude quota utilization via the undocumented OAuth usage endpoint. WARNING — read before using: 1. **Token reuse**: This command reads ``~/.claude/.credentials.json`` and reuses the OAuth session token that Claude Code uses to authenticate with Anthropic. That token grants access to your Anthropic...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/snapshot.py
.py
0d92795f6fa24a14
7.65
19
"""Safe file writing helpers shared by all CSV/JSON producers. Single implementation of the write-temp-then-rename pattern (R4/A4): a crash mid-write can never leave a truncated or half-written file behind, because the target is only ever replaced atomically via :func:`os.replace`. """ from __future__ import annotati...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/storage.py
.py
2d70eb661b69c384
7.65
19
"""Task attribution (Axe B2): the unit of work is the task, not the prompt. The parlant level of aggregation is neither the prompt nor the category but the **task** -- "implement feature X", "debug Y". The prompt that *launches* the work is the centre of gravity; the ones around it (prepare, plan, then refine, "add th...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/tasks.py
.py
ccbe2e1b9232cb94
7.65
19
"""Local token counting (``tiktoken`` at the core, with an offline fallback). The prose/code output split (Axe C) prorates a message's *real* output tokens by the token weight of its ``text`` blocks vs its ``tool_use`` blocks. We count those weights with a **local** tokenizer so nothing ever leaves the machine. ``tik...
romainfjgaspard/prompt-analytics-for-claude-code
prompt_analytics/tokenizer.py
.py
2191c07ec379127c
7.65
19
"""Capture an anonymized parsing fixture from a real Claude Code JSONL log. Per the ccusage maintainers' advice ("pin your parsing against fixture files per version"), we keep one fixture directory per JSONL *format* version under ``tests/fixtures/claude-code-<version>/``. This script turns one of your own ``~/.claude...
romainfjgaspard/prompt-analytics-for-claude-code
scripts/capture_fixture.py
.py
eea2c41a9f5871c7
7.65
19
"""Fetch the GitHub Copilot per-model pricing grid from the official docs. Scrapes https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing (the page the ``copilot`` pricing provider is based on -- it lists per-token USD prices per 1 million tokens, including Claude Fable 5) and emits a machine-...
romainfjgaspard/prompt-analytics-for-claude-code
scripts/fetch_copilot_pricing.py
.py
5aaa0a06ba7ccb76
7.65
19
"""Reconcile prompt-analytics token totals against ccusage (milestone J2). Compares, day by day and model by model, the token totals produced by our parser (global dedup, latest usage snapshot per message, all files including subagents) with the output of ``bunx ccusage daily --json`` on the real local history (``~/.c...
romainfjgaspard/prompt-analytics-for-claude-code
scripts/reconcile_ccusage.py
.py
82e1e6e8d6c11029
7.65
19
import json import shutil from pathlib import Path from types import SimpleNamespace import pytest FIXTURES_DIR = Path(__file__).parent / "fixtures" @pytest.fixture(autouse=True) def _isolated_env(tmp_path, monkeypatch): """Keep machine-specific environment out of every test. ``CLAUDE_CONFIG_DIR`` must not...
romainfjgaspard/prompt-analytics-for-claude-code
tests/conftest.py
.py
cfe3580a8fc7d956
8.15
19
""" yaml_validator.models ===================== Dataclasses and enums shared across the package. Severity — CRITICAL / HIGH / MEDIUM / LOW / INFO ValidationIssue — one problem found in a YAML file ValidationResult — full result for one file ToolAvailability — which external tools are present """ from...
pooyanazad/YAML-validator
yaml_validator/models.py
.py
3dd653eb14133d6d
7.52
10
"""Retry-policy coverage for `TidalAPI._fetch_with_retry`. The HTTP layer is faked (a client whose `.fetch` yields a scripted sequence of results/exceptions) so the policy — 429 backoff, no-retry on 4xx, bounded network retries — is exercised deterministically. `sleep`/jitter are patched. """ from __future__ import an...
np3ir/tiddl-elvigilante
tests/test_api_retry.py
.py
ec6ba44717b9f58b
7.92
6
"""[P2, audit finding #14] Regression coverage for the root callback's retained-staging startup notice (`tiddl/cli/app.py`). An earlier version of this code's comment claimed the notice was "safe on every invocation, including --help" — that claim was never actually tested, and is false: Click/Typer's `--help` is an e...
np3ir/tiddl-elvigilante
tests/test_app_startup_notice.py
.py
c384fb4e4e2f096f
7.92
6
"""Regression coverage for `save_auth_data`/`load_auth_data` after extracting the temp+fsync+replace dance into `tiddl.core.utils.fsio.atomic_write_bytes` (see tests/test_fsio.py for the generic helper coverage). This file exists to prove the extraction changed nothing observable about the auth file: still atomic, stil...
np3ir/tiddl-elvigilante
tests/test_auth_core.py
.py
e2454c66cda7ebdb
7.92
6
"""Tests for Config loading and validator behaviour.""" import logging from pathlib import Path from tiddl.cli.config import DEFAULT_DOWNLOAD_PATH, DEFAULT_TEMPLATE, Config class TestTemplatesConfig: def test_specific_templates_inherit_default(self): cfg = Config.parse_obj({"templates": {"default": "cust...
np3ir/tiddl-elvigilante
tests/test_config.py
.py
17c7abcb3fca346c
7.92
6
from __future__ import annotations import unittest import unicodedata from tiddl.core.utils.strings import remove_zalgo, sanitize_filename, get_alpha_bucket class TestCulturalRegression(unittest.TestCase): """ # Cultural regression tests # These tests protect linguistic and artistic integrity. Cu...
np3ir/tiddl-elvigilante
tests/test_cultural_regression.py
.py
9a099f3d0b36695b
7.92
6
"""End-to-end coverage for `tiddl destination trust/status/forget` — the only commands allowed to mutate destination-anchor trust state (see `tiddl.core.utils.destination_anchor` and PROPOSAL_destination_volume_identity_v2_1.md §2, kept local/untracked). Uses Typer's CliRunner against the real `app`, isolated to a tmp...
np3ir/tiddl-elvigilante
tests/test_destination_cli.py
.py
5004806192b07949
7.92
6
"""Focused unit coverage for `tiddl.core.utils.publish.publish_verified_file`, independent of the full download/CLI machinery that exercises it indirectly elsewhere (`test_downloader.py`, `test_recover_cli.py`). Each test here pins one specific finding from the third audit review of the retained-staging- recovery branc...
np3ir/tiddl-elvigilante
tests/test_publish.py
.py
5ad7fe89d9aec4c0
7.92
6
"""Reaching `max_tracks_per_session` must STOP the run, not just refuse further downloads while the dispatcher keeps enumerating the remaining resources. The reproduced bug: after printing "Límite de sesión alcanzado … Reinicia para continuar", the engine kept emitting `[53/69]`, `[54/69]` and hitting the API for the ...
np3ir/tiddl-elvigilante
tests/test_session_limit_stop.py
.py
1f41059c8581d547
7.92
6
"""Unit coverage for `plan_stereo_resolution`, the pure decision that drives both the direct-album and the artist-expansion stereo paths in `tiddl.cli.commands.download`. The only behavioural difference between the two call sites is `keep_original`: a direct album URL is skipped when no stereo edition qualifies, while...
np3ir/tiddl-elvigilante
tests/test_stereo_plan.py
.py
892f8f38a0ca1be4
7.92
6
from __future__ import annotations import importlib.metadata import sys import typer import click import logging from rich.console import Console from rich.logging import RichHandler # Force UTF-8 output on Windows so Rich's Braille spinners and Unicode # characters in file paths don't crash with cp1252 UnicodeEncodeE...
np3ir/tiddl-elvigilante
tiddl/cli/app.py
.py
a74dbf38dc6e4545
7.42
6
"""`tiddl destination trust/status/forget` — administer destination-volume identity trust records (see `tiddl.core.utils.destination_anchor`). Deliberately the ONLY place that mutates anchor state. A download or `tiddl recover` never creates, replaces, adopts, or rotates an anchor, under any flag, in any mode (PROPOSA...
np3ir/tiddl-elvigilante
tiddl/cli/commands/destination.py
.py
50c20aa031408daa
7.42
6
from __future__ import annotations import typer from logging import getLogger from rich.console import Console # from typing_extensions import Annotated from tiddl.cli.ctx import Context from tiddl.cli.commands.subcommands import url_subcommand from tiddl.cli.commands.auth import refresh export_command = typer.Typer...
np3ir/tiddl-elvigilante
tiddl/cli/commands/export.py
.py
4a1d1b840964d2bb
7.42
6
import awkward as ak import numpy as np import pytest import vector import pybes3 as p3 @pytest.mark.parametrize("with_error", [True, False]) def test_helix_obj_1(flat_helix_arr, with_error, flat_helix_err_arr): """Test initialization, momentum, position, charge, and pivot of helix_obj.""" raw_pivot = (0, 0,...
mrzimu/pybes3
tests/tracks/test_helix.py
.py
e727290134736ca2
7.95
7
import json from fastapi import APIRouter, Depends from sqlalchemy import or_ from sqlalchemy.orm import Session from app import schemas from app.api.deps import get_owned_album, get_owned_image from app.auth import get_current_user from app.db.models import Album, AlbumImage, FileType, Image, ImageTag, Tag, User fro...
pasqualkreher/rollfilm
backend/app/api/routes/albums.py
.py
de2595a94d0f9372
7.52
10
from pathlib import Path from fastapi import APIRouter, Depends, File, Form, HTTPException, UploadFile from fastapi.responses import FileResponse from sqlalchemy.orm import Session from starlette.background import BackgroundTask from app import schemas from app.auth import get_current_user from app.db.models import U...
pasqualkreher/rollfilm
backend/app/api/routes/maintenance.py
.py
6774ce06d89a0aa8
7.52
10
from fastapi import APIRouter, Depends from sqlalchemy import or_ from sqlalchemy.orm import Session from app import schemas from app.auth import get_current_user from app.db.models import Album, AlbumImage, FileType, Image, User from app.db.session import get_db from app.services import immich as immich_service from ...
pasqualkreher/rollfilm
backend/app/api/routes/settings.py
.py
70a6361e6b63924a
7.52
10
import shutil from pathlib import Path from fastapi import APIRouter, Depends, HTTPException from sqlalchemy import func from sqlalchemy.orm import Session from app import schemas from app.auth import get_current_user from app.db.models import Image, ImportStagedFile, SourceRoot, User from app.db.session import get_d...
pasqualkreher/rollfilm
backend/app/api/routes/sources.py
.py
adf0a2612f650d56
7.52
10
from fastapi import APIRouter, Depends, HTTPException from sqlalchemy import func from sqlalchemy.orm import Session from app import schemas from app.auth import get_current_user from app.db.models import ImageTag, Tag, User from app.db.session import get_db router = APIRouter(prefix="/tags", tags=["tags"]) @router...
pasqualkreher/rollfilm
backend/app/api/routes/tags.py
.py
6eb54075e7ccbc06
7.52
10
import tempfile from pathlib import Path from pydantic import Field, model_validator from pydantic_settings import BaseSettings, SettingsConfigDict def _default_data_dir() -> Path: """Where app data lives when nothing else is configured (native desktop run). The Electron shell overrides this via PM_DATA_DIR...
pasqualkreher/rollfilm
backend/app/config.py
.py
6b956d0ea7675d31
7.52
10
"""add rating and color label to staged files Revision ID: 278b43ae8e54 Revises: aa093e250449 Create Date: 2026-07-08 19:57:20.456260 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = '278b43ae8e54' down_revision: Union[st...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/278b43ae8e54_add_rating_and_color_label_to_staged_.py
.py
10ea3c62907bdb38
7.52
10
"""initial schema Revision ID: 55be4bd74c10 Revises: Create Date: 2026-07-08 18:12:15.668645 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = '55be4bd74c10' down_revision: Union[str, None] = None branch_labels: Union[str...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/55be4bd74c10_initial_schema.py
.py
9299825f116e8245
7.52
10
"""add tags Revision ID: 6f7d1d2406d0 Revises: c4794094b725 Create Date: 2026-07-08 21:10:04.284652 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = '6f7d1d2406d0' down_revision: Union[str, None] = 'c4794094b725' branch_l...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/6f7d1d2406d0_add_tags.py
.py
3bf38a31f7a8af4d
7.52
10
"""add mist (pro-mist diffusion) edit Revision ID: a0c1d2e3f4b5 Revises: f9b0c1d2e3a4 Create Date: 2026-07-11 19:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa revision: str = "a0c1d2e3f4b5" down_revision: Union[str, None] = "f9b0c1d2e3a4" branch_labels: Union[st...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/a0c1d2e3f4b5_add_mist.py
.py
fa8cdc18365dc41d
7.52
10
"""add immich_sync flag to images and albums (selective Immich sync) Revision ID: a1b2c3d4e5f6 Revises: f7a8b9c0d1e2 Create Date: 2026-07-14 00:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = 'a1b2c3d4e5f6' ...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/a1b2c3d4e5f6_add_immich_sync_flags.py
.py
792ef671849ce727
7.52
10
"""add blacks/whites tonal + lens distortion edits Revision ID: a3c4d5e6f7b8 Revises: f2b3c4d5e6a7 Create Date: 2026-07-11 09:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa revision: str = "a3c4d5e6f7b8" down_revision: Union[str, None] = "f2b3c4d5e6a7" branch_lab...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/a3c4d5e6f7b8_add_blacks_whites_distortion.py
.py
e95eb8eb214bb848
7.52
10
"""add albums.tag_filter (tag-rule album membership) Revision ID: a4b5c6d7e8f9 Revises: f3a4b5c6d7e8 Create Date: 2026-07-29 12:00:00.000000 An album can now carry a list of tag names (stored as JSON): photos with any of those tags count as members automatically, alongside the manually added ones. NULL = a plain manu...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/a4b5c6d7e8f9_add_album_tag_filter.py
.py
32ba2496b69bbcee
7.52
10
"""add in-batch duplicate tracking Revision ID: aa093e250449 Revises: 55be4bd74c10 Create Date: 2026-07-08 18:28:56.398712 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = 'aa093e250449' down_revision: Union[str, None] = ...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/aa093e250449_add_in_batch_duplicate_tracking.py
.py
bf2ec2b40c3009e0
7.52
10
"""add deleted_at (in-app trash) to images Revision ID: b1c2d3e4f5a6 Revises: a0c1d2e3f4b5 Create Date: 2026-07-12 12:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa revision: str = "b1c2d3e4f5a6" down_revision: Union[str, None] = "a0c1d2e3f4b5" branch_labels: Uni...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/b1c2d3e4f5a6_add_trash_deleted_at.py
.py
2f35605c5eedb3e1
7.52
10
"""add app settings key-value store Revision ID: b2f1c7a4d9e0 Revises: 6f7d1d2406d0 Create Date: 2026-07-09 12:30:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = 'b2f1c7a4d9e0' down_revision: Union[str, None] =...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/b2f1c7a4d9e0_add_app_settings.py
.py
bd119c8019dc7331
7.52
10
"""add dehaze / grain / denoise effect edits Revision ID: b4d5e6f7a8c9 Revises: a3c4d5e6f7b8 Create Date: 2026-07-11 10:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa revision: str = "b4d5e6f7a8c9" down_revision: Union[str, None] = "a3c4d5e6f7b8" branch_labels: U...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/b4d5e6f7a8c9_add_dehaze_grain_denoise.py
.py
cda1e7e68054d13f
7.52
10
"""add images.lens_model (lens read from EXIF) Revision ID: b5c6d7e8f9a1 Revises: a4b5c6d7e8f9 Create Date: 2026-07-31 12:00:00.000000 The lens name (EXIF LensModel / XMP Lens / decoded LensID) is now read at import time and filterable in the library. Existing rows are backfilled once in the background on app start (...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/b5c6d7e8f9a1_add_lens_model.py
.py
136a1f50bf1c72f6
7.52
10
"""add immich_sync flag to import_staged_files (flag photos for selective Immich sync during import review) Revision ID: b7c8d9e0f1a2 Revises: a1b2c3d4e5f6 Create Date: 2026-07-14 00:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by A...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/b7c8d9e0f1a2_add_immich_sync_to_staged_files.py
.py
85f6b4cd98d4929e
7.52
10
"""add images.description (free-text note written in the lightbox) Revision ID: c1d2e3f4a5b6 Revises: d7e8f9a0b1c3 Create Date: 2026-08-07 10:00:00.000000 A per-photo description the user types in the detail view. Lives in the database only - the original file is never rewritten, same as every other edit in this app....
pasqualkreher/rollfilm
backend/app/db/migrations/versions/c1d2e3f4a5b6_add_image_description.py
.py
03699f79649740c6
7.52
10
"""add manual rotation and crop to images Revision ID: c4794094b725 Revises: 278b43ae8e54 Create Date: 2026-07-08 20:24:28.245590 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = 'c4794094b725' down_revision: Union[str, N...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/c4794094b725_add_manual_rotation_and_crop_to_images.py
.py
4c7ce6a7a6e695ab
7.52
10
"""add clarity + sharpness detail edits Revision ID: c5e6f7a8b9d0 Revises: b4d5e6f7a8c9 Create Date: 2026-07-11 11:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa revision: str = "c5e6f7a8b9d0" down_revision: Union[str, None] = "b4d5e6f7a8c9" branch_labels: Union[...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/c5e6f7a8b9d0_add_clarity_sharpness.py
.py
07bea7fe82b2b89e
7.52
10
"""add denormalized EXIF columns to import_staged_files Revision ID: c6d7e8f9a0b2 Revises: b5c6d7e8f9a1 Create Date: 2026-08-01 12:00:00.000000 The review grid's /files poll used to json.loads every staged file's exif_json on every poll - real CPU per second on multi-thousand imports. The fields the grid needs (captu...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/c6d7e8f9a0b2_add_staged_exif_columns.py
.py
7d9514d7dd524db8
7.52
10
"""add external source roots (scan-in-place) Revision ID: c9a2e5f1b30d Revises: b2f1c7a4d9e0 Create Date: 2026-07-09 14:30:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = 'c9a2e5f1b30d' down_revision: Union[str...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/c9a2e5f1b30d_add_source_roots.py
.py
7af59b4cfdac1d73
7.52
10
"""add immich_asset_id to images and the immich_pending_deletions table (remove permanently deleted photos from Immich) Revision ID: c9d0e1f2a3b4 Revises: b7c8d9e0f1a2 Create Date: 2026-07-14 00:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifier...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/c9d0e1f2a3b4_add_immich_asset_tracking.py
.py
abf2498b80e16937
7.52
10
"""add processed flag to import_staged_files (background analysis: the copy phase creates rows unprocessed, a worker fills in analysis and flips this) Revision ID: d0e1f2a3b4c5 Revises: c9d0e1f2a3b4 Create Date: 2026-07-19 00:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchem...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/d0e1f2a3b4c5_add_processed_to_staged_files.py
.py
6211fa74b223ca5f
7.52
10
"""add flip and straighten to images Revision ID: d5e6f7a8b9c0 Revises: b1c2d3e4f5a6 Create Date: 2026-07-13 00:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = 'd5e6f7a8b9c0' down_revision: Union[str, None] ...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/d5e6f7a8b9c0_add_flip_and_straighten_to_images.py
.py
411675a38788338a
7.52
10
"""add global colour tint (hue shift) to the mixer Revision ID: d6f7a8b9c0e1 Revises: c5e6f7a8b9d0 Create Date: 2026-07-11 12:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa revision: str = "d6f7a8b9c0e1" down_revision: Union[str, None] = "c5e6f7a8b9d0" branch_lab...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/d6f7a8b9c0e1_add_color_tint.py
.py
0002221f9d8d045d
7.52
10
"""make import_staged_files.sha256 nullable (hash moves to analysis) Revision ID: d7e8f9a0b1c3 Revises: c6d7e8f9a0b2 Create Date: 2026-08-01 14:00:00.000000 The staging copy is now a dumb native kernel copy at full media speed; the sha256 is computed by the background analysis right after the file lands (reading from...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/d7e8f9a0b1c3_staged_sha256_nullable.py
.py
72050d2444ce66e8
7.52
10
"""add tonal/color adjustment edits to images Revision ID: e1f2a3b4c5d6 Revises: c9a2e5f1b30d Create Date: 2026-07-10 12:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = 'e1f2a3b4c5d6' down_revision: Union[st...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/e1f2a3b4c5d6_add_image_adjustments.py
.py
2aaf1070f53bbb88
7.52
10
"""add perspective (keystone) to images Revision ID: e6f7a8b9c0d1 Revises: d5e6f7a8b9c0 Create Date: 2026-07-13 00:10:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = 'e6f7a8b9c0d1' down_revision: Union[str, Non...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/e6f7a8b9c0d1_add_perspective_to_images.py
.py
b5d750a06b0fff62
8.02
10
"""add grain size Revision ID: e7a8b9c0d1f2 Revises: d6f7a8b9c0e1 Create Date: 2026-07-11 13:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa revision: str = "e7a8b9c0d1f2" down_revision: Union[str, None] = "d6f7a8b9c0e1" branch_labels: Union[str, Sequence[str], No...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/e7a8b9c0d1f2_add_grain_size.py
.py
6f42bb834c7031e8
7.52
10
"""add color mixer + vignette edits to images Revision ID: f2b3c4d5e6a7 Revises: e1f2a3b4c5d6 Create Date: 2026-07-10 13:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa revision: str = "f2b3c4d5e6a7" down_revision: Union[str, None] = "e1f2a3b4c5d6" branch_labels: ...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/f2b3c4d5e6a7_add_color_mixer_and_vignette.py
.py
7d339808dfbfeba5
7.52
10
"""add applied_adjustments (develop JSON baked into a saved copy) Revision ID: f3a4b5c6d7e8 Revises: e2f3a4b5c6d7 Create Date: 2026-07-23 12:00:00.000000 "Save copy" flattens the edit into a new JPEG, so the develop settings that produced it were lost. They now get stored on the copy row so the auto-develop suggestio...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/f3a4b5c6d7e8_add_applied_adjustments.py
.py
6a7c00caa75b9c1f
7.52
10
"""add gps_country (reverse-geocoded region) to images Revision ID: f7a8b9c0d1e2 Revises: e6f7a8b9c0d1 Create Date: 2026-07-13 00:20:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = 'f7a8b9c0d1e2' down_revision:...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/f7a8b9c0d1e2_add_gps_country_to_images.py
.py
097938671a6bc01c
7.52
10
"""add fuji color chrome effect / chrome fx blue Revision ID: f9b0c1d2e3a4 Revises: e7a8b9c0d1f2 Create Date: 2026-07-11 17:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa revision: str = "f9b0c1d2e3a4" down_revision: Union[str, None] = "e7a8b9c0d1f2" branch_label...
pasqualkreher/rollfilm
backend/app/db/migrations/versions/f9b0c1d2e3a4_add_chrome_effect.py
.py
813aa1d7fbf8ca23
7.52
10
"""Minimal HTTP wrapper around Microsoft MarkItDown. Exposes POST /convert, which accepts a single uploaded file and returns `{ "markdown": "...", "title": ..., "filename": ... }`. This is the shape the n8n "MarkItDown Convert" node expects. MarkItDown ships as a CLI/library, not a server, so this thin FastAPI wrapper...
Mfrostbutter/n8n-workflow-templates
workflows/document-fabric-drive-to-qdrant/markitdown-service/app.py
.py
877e9b136014a62e
7.63
17
"""Apply ``PATH=VALUE`` config overrides from a command line. A launcher parses ``--override step.lr=3e-4`` off the command line and hands the strings here; this module owns the config-side mechanics -- path traversal, field validation, and type coercion -- so the launcher keeps only its argparse wiring. An override ...
rekursiv-ai/configgle
configgle/cli_override.py
.py
3cbb980d671d763c
7.54
11
"""Custom types for config module.""" # ty type system feature overview: https://github.com/astral-sh/ty/issues/1889 from __future__ import annotations from typing import ( Any, ClassVar, Protocol, Self, override, runtime_checkable, ) from typing_extensions import TypeVar import dataclasses ...
rekursiv-ai/configgle
configgle/custom_types.py
.py
bb008d82d6236316
7.54
11
"""Decorator to auto-generate a Config dataclass from __init__ parameters.""" from __future__ import annotations from typing import TYPE_CHECKING, get_type_hints, overload import inspect from configgle.custom_types import HasRelaxedConfig from configgle.fig import Fig, FigMeta if TYPE_CHECKING: from collectio...
rekursiv-ai/configgle
configgle/decorator.py
.py
d5c0d8e5250b51f5
7.54
11