37 Commits
Author SHA1 Message Date
dextmorgn 88828c5f88 chore: wire flowsint-app into make lint/lint-fix
make lint was Python-only (PY_SRC never included flowsint-app) —
frontend prettier/eslint lived solely in flowsint-app's own yarn
scripts, disconnected from the repo's single lint entry point. Both
are 0-errors clean today (eslint's ~130 findings are all warnings),
same bar the Python side is already held to, so added as blocking
rather than a separate opt-in step. CONTRIBUTING.md updated to match.
2026-08-25 09:33:37 +02:00
dextmorgn 3a0ca88e10 fix(ci): resolve ruff once in the typecheck ratchet instead of per-file
Calling \`uv run ruff\` twice per changed file (up to ~500 subprocess
spawns on this branch) was flaky: some invocations intermittently
returned empty output, making the byte-for-byte comparison fail and
the file wrongly counted as semantically changed. Resolving the
binary path once via \`uv run which ruff\` and invoking it directly
in the loop is both correct and faster. Verified stable across
repeated runs.
2026-08-25 09:33:36 +02:00
dextmorgn a05fd1379f fix(lint): bring flowsint-api/alembic into ruff's scope
alembic/ was never in PY_SRC, so it never went through black/isort/
flake8 before, or ruff after — 31 files were unformatted. Adds it to
PY_SRC and reformats via ruff format + check --fix, plus a per-file-
ignore for env.py's star-import-from-models pattern (standard Alembic
autogenerate setup: needs every model's metadata visible under one
name, not enumerable without duplicating the model list here).
2026-08-25 09:33:36 +02:00
dextmorgn c421126fb1 fix(ci): exclude pure-formatting diffs from the mypy ratchet
The ratchet gates mypy on files this branch "touches" vs BASE_REF,
to avoid blocking every PR on the ~2200 pre-existing errors. The ruff
adoption reformatted the whole tree, so every .py file differs from
main by formatting alone — the ratchet degraded into gating the
entire backlog on this one PR.

A file now only counts as changed if re-running ruff (format + fix)
on the BASE_REF version doesn't reproduce today's content
byte-for-byte. Verified locally: 578 errors across 31 files dropped
to the files actually edited this session.
2026-08-25 09:33:36 +02:00
dextmorgn 8b49497965 build(python): replace black+isort+flake8 with ruff
One tool instead of three, one config instead of four duplicated
blocks. black/isort/flake8 dropped from every package's dev deps,
ruff added once; .flake8 deleted, [tool.black]/[tool.isort] blocks
deleted from all 4 sub-package pyproject.toml files.

Config lives once, at the workspace root: ruff walks up from any file
it's checking until it finds a pyproject.toml with a [tool.ruff]
table (verified empirically — a package's own pyproject.toml lacking
that table doesn't stop the search), so the root-level [tool.ruff]
applies to all four packages without duplication. That's the one real
win over the old per-package black/isort blocks, which had to be
copy-pasted four times and kept in sync by hand.

Same rule surface as before, not more: select = E/F/W/I (pycodestyle
+ pyflakes + isort-equivalent), matching exactly what flake8 checked.
ruff has other rule groups (UP/pyupgrade, B/bugbear) that would
surface real things — deliberately left off. Turning those on finds
new debt and is a separate decision with its own diff to review, not
a side effect of swapping the tool underneath an unchanged rule set.
Same E501 exclusion carried over too, same reasoning: the formatter
is the sole authority on line length.

known-first-party carries over unchanged (same isort concern this
repo already fixed once — see "app" vs "flowsint_api" in the ratchet
history) and the wildcard-import per-file-ignore for
flowsint_core/__init__.py still applies, verified directly.

Six files reformatted by `ruff format` where it disagreed with black
on edge cases (import grouping, ternary line-breaking, blank lines
after a class statement) — all cosmetic, no behavior change, reviewed
diff by diff. One real ruff-check finding (an import block ruff's
isort-equivalent wanted sorted differently) — took ruff check --fix.

Verified: `make lint` clean, `make test` green (all 4 packages),
lint-staged tested with a real staged-file run (not just config
inspection) to confirm `uv run ruff format` / `uv run ruff check --fix`
actually execute, mypy ratchet target unaffected (still fires on its
own pre-existing backlog, unrelated to this change).
2026-08-25 09:33:34 +02:00
dextmorgn 2fc60276ba ci: wire lint/typecheck/pre-commit gates that existed but never ran
flake8/mypy/eslint were configured (or, for eslint, declared) but no CI
job and no pre-commit hook ever executed them — black/isort/flake8 had
no line-length agreement either (flake8 defaulted to 79, black to 88).

- .flake8: align max-line-length with black, ignore black-conflicting
  codes, carve out the one file with an intentional wildcard-export API
- Makefile: `make lint` (black/isort/flake8, blocking — repo is clean),
  `make typecheck` (mypy, ratcheted to files the branch touched — ~2200
  pre-existing errors workspace-wide, not fixed blindly in one pass)
- .github/workflows/lint.yml: runs the above in CI, plus the frontend
  equivalents (prettier/eslint blocking where clean, eslint/tsc
  ratcheted where not)
- .github/workflows/tests.yml: add the vitest job that never existed
- flowsint-app/.eslintrc.cjs: parser was declared but never installed
  (yarn lint threw immediately) — install @typescript-eslint/*, add
  react-hooks/recommended; no-explicit-any set to warn (real backlog,
  not fixed blindly)
- lint-staged + husky pre-commit: mirrors the CI checks that are
  actually clean today (black/isort/flake8, prettier). eslint is left
  out of pre-commit on purpose — its backlog would block unrelated
  commits; it stays a CI-only ratchet until paid down.
2026-08-25 09:33:32 +02:00
dextmorgn 07584ebc4a ci: run python tests on pull requests and main
Single entrypoint: CI calls `make test`, same as local development,
so the two can't drift. uv handles Python (.python-version) and
dependency sync; cache keyed on uv.lock.

Also add flowsint-api to `make test` — its suite existed but was
never wired in.
2026-06-05 14:24:34 +02:00
dextmorgn 82925bec38 fix(deploy): serve prod from pre-built images
Frontend baked VITE_API_URL into the bundle at build time, so
published images pointed at whatever URL CI had — "fail to fetch"
for every other deployment. Bundle now defaults to same-origin
relative URLs and the frontend nginx proxies /api/ to the api
service over the Docker network; CORS becomes irrelevant.

- docker-compose.prod.yml: use ghcr images (FLOWSINT_VERSION,
  default latest), drop build sections; bind postgres/redis/neo4j/
  api ports to 127.0.0.1 — only 5173 faces the network
- nginx: /api/ reverse proxy, request-time DNS resolution, SSE
  support (proxy_buffering off)
- Makefile: prod pulls instead of building; remove dead deploy
  targets referencing nonexistent docker-compose.deploy.yml
- README: network/server deployment section (secrets checklist,
  version pinning, TLS via reverse proxy)
2026-06-05 14:04:16 +02:00
dextmorgn 85a85ed541 chore: switch to uv 2026-04-11 13:17:14 +02:00
dextmorgn 2032aeee0b feat: update makefile with new commands 2026-02-14 15:32:29 +01:00
dextmorgn a178ef1bcd feat(chore): update deploy components 2026-01-25 20:45:22 +01:00
dextmorgn f1ef843616 fix: Makefile 2026-01-25 15:57:13 +01:00
dextmorgn 6766c940bc fix: Makefile 2026-01-25 15:56:32 +01:00
dextmorgn f1c3cf1017 feat: migrations in prod 2026-01-25 12:21:02 +01:00
dextmorgn 154cc74e80 feat: more robust Makefile 2026-01-25 11:39:10 +01:00
dextmorgn 2f5443b074 feat: update deploy 2026-01-25 11:11:58 +01:00
dextmorgn 4b82d3749e feat: update Makefile to include migrations 2026-01-24 19:42:25 +01:00
dextmorgn b590ab0843 feat: add celery threads 2026-01-05 22:27:28 +01:00
dextmorgn 8d74c11506 feat: update makefile 2025-12-05 15:43:55 +01:00
dextmorgn 2123ea5b8d feat: complete refactor 2025-11-27 17:16:41 +01:00
dextmorgn ade74800aa feat: minifiy transform logic 2025-11-20 10:59:18 +01:00
dextmorgn cd0652f5fe feat: update docker kill in Makefile 2025-11-15 02:03:00 +01:00
dextmorgn d0417e0056 feat: upgrade deploy to use docker only 2025-10-27 11:24:58 +01:00
dextmorgn 7da4c7b2f3 fix(deploy): remove strict python version 2025-10-26 23:46:14 +01:00
dextmorgn 6df54261cb fix: use python 3.12 2025-10-24 13:52:12 +02:00
dextmorgn 9c645f2c59 fix: install 2025-10-24 11:04:38 +02:00
dextmorgn 46a2132740 fix: install instructions 2025-10-24 10:25:48 +02:00
dextmorgn a821232069 fix: makefile 2025-10-24 00:09:58 +02:00
dextmorgn d4a869d653 fix: readme 2025-10-24 00:08:11 +02:00
dextmorgn 58ec5b3d29 feat: docker production setup 2025-10-20 10:42:38 +02:00
dextmorgn 38fcde7750 feat: update makefile 2025-10-18 11:48:42 +02:00
dextmorgn b19fb086b8 feat: move to simple web app 2025-10-09 10:23:25 +02:00
dextmorgn a4cd507562 feat: add root directory to env checker 2025-09-16 16:10:16 +02:00
dextmorgn 715533f7dc feat: docker-compose.prod 2025-09-16 13:50:31 +02:00
dextmorgn b628c5ef4f feat: remove deprecated key 2025-09-16 12:31:43 +02:00
dextmorgn 0619550107 feat: update readme 2025-09-16 12:31:06 +02:00
dextmorgn 5499c41a98 feat: makefile 2025-09-16 12:18:52 +02:00