Monorepo: consolidate 7 repos into one
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m5s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m5s
Combines shared, blog, market, cart, events, federation, and account into a single repository. Eliminates submodule sync, sibling model copying at build time, and per-app CI orchestration. Changes: - Remove per-app .git, .gitmodules, .gitea, submodule shared/ dirs - Remove stale sibling model copies from each app - Update all 6 Dockerfiles for monorepo build context (root = .) - Add build directives to docker-compose.yml - Add single .gitea/workflows/ci.yml with change detection - Add .dockerignore for monorepo build context - Create __init__.py for federation and account (cross-app imports)
This commit is contained in:
12
market/bp/browse/services/blacklist/category.py
Normal file
12
market/bp/browse/services/blacklist/category.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# suma_browser/category_blacklist.py
|
||||
from __future__ import annotations
|
||||
from typing import Optional
|
||||
from shared.config import config
|
||||
|
||||
def _norm(s: str) -> str:
|
||||
return (s or "").strip().lower().strip("/")
|
||||
|
||||
def is_category_blocked(top_slug: str, sub_slug: Optional[str] = None) -> bool:
|
||||
if sub_slug:
|
||||
return is_category_blocked(top_slug) or _norm(f"{top_slug}/{sub_slug}") in config()["blacklist"]["category"]
|
||||
return _norm(top_slug) in config()["blacklist"]["category"]
|
||||
15
market/bp/browse/services/blacklist/product.py
Normal file
15
market/bp/browse/services/blacklist/product.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from typing import Set, Optional
|
||||
from ..slugs import canonical_html_slug
|
||||
from shared.config import config
|
||||
|
||||
_blocked: Set[str] = set()
|
||||
_mtime: Optional[float] = None
|
||||
|
||||
def _norm(slug: str) -> str:
|
||||
slug = (slug or "").strip().strip("/").lower()
|
||||
if slug.startswith("product/"):
|
||||
slug = slug.split("/", 1)[1]
|
||||
return canonical_html_slug(slug)
|
||||
|
||||
def is_product_blocked(slug: str) -> bool:
|
||||
return _norm(slug) in config()["blacklist"]["product"]
|
||||
11
market/bp/browse/services/blacklist/product_details.py
Normal file
11
market/bp/browse/services/blacklist/product_details.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import re
|
||||
from shared.config import config
|
||||
|
||||
def _norm_title_key(t: str) -> str:
|
||||
t = (t or "").strip().lower()
|
||||
t = re.sub(r":\s*$", "", t)
|
||||
t = re.sub(r"\s+", " ", t)
|
||||
return t
|
||||
|
||||
def is_blacklisted_heading(title: str) -> bool:
|
||||
return _norm_title_key(title) in [s.lower() for s in config()["blacklist"]["product-details"]]
|
||||
Reference in New Issue
Block a user