Skip to content

Commit bef2df0

Browse files
authored
Merge pull request #135 from GetTechAPI/chore/cleanup-leftovers
chore: correct the landing site, the development guide and repository metadata
2 parents ff4e11e + c63f668 commit bef2df0

13 files changed

Lines changed: 103 additions & 146 deletions

File tree

‎.env.example‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
DATABASE_URL=sqlite:///./techapi.db
66
DATABASE_POOL_SIZE=10
77

8-
# === Supabase (production Postgres host) ===
9-
SUPABASE_URL=https://xxx.supabase.co
10-
SUPABASE_ANON_KEY=eyJ...
11-
SUPABASE_SERVICE_KEY=eyJ... # secret, never expose to clients
12-
138
# === API ===
149
API_HOST=0.0.0.0
1510
API_PORT=8000
@@ -22,10 +17,6 @@ CORS_ORIGINS=http://localhost:3000,https://techpicks.app
2217

2318
# === Logging ===
2419
LOG_LEVEL=INFO
25-
SENTRY_DSN=https://... # optional
26-
27-
# === External Services ===
28-
REDIS_URL=redis://localhost:6379 # optional (Phase 2+)
2920

3021
# === Scoring ===
3122
SCORING_CONFIG_PATH=./config/scoring.yaml

‎.github/CODEOWNERS‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
# Default owners for everything in the repo.
2-
* @GetTechAPI/maintainers
3-
4-
/app/ @GetTechAPI/maintainers
1+
# Default owner for everything in the repo.
2+
* @Seungpyo1007

‎.github/ISSUE_TEMPLATE/bug_report.yml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "🐛 Bug report"
2-
description: Report a bug in the API or tooling
2+
description: Report a bug in the validator, API server, dump generator, collectors or verification
33
labels: ["type:bug"]
44
body:
55
- type: textarea
@@ -13,9 +13,10 @@ body:
1313
id: reproduce
1414
attributes:
1515
label: Steps to reproduce
16-
description: Include the exact request (curl) where possible.
16+
description: Include the exact command or request, and the TechEngine commit you ran.
1717
placeholder: |
18-
curl https://api.techapi.dev/v1/smartphones/galaxy-s25
18+
python -m app.validate
19+
curl http://localhost:8000/v1/smartphones/galaxy-s25
1920
validations:
2021
required: true
2122
- type: textarea
@@ -28,4 +29,4 @@ body:
2829
id: request-id
2930
attributes:
3031
label: request_id (if any)
31-
description: The `request_id` from the error response helps us trace it.
32+
description: For API errors, the `request_id` from the error response.

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Missing or incorrect data
4+
url: https://github.com/GetTechAPI/TechAPI/issues/new/choose
5+
about: This repository holds no data. Report a missing record or a wrong value in the TechAPI repository.
6+
- name: Video games
7+
url: https://github.com/GetTechAPI/game-catalog/issues
8+
about: Game records live in the game-catalog repository.

‎.github/ISSUE_TEMPLATE/data_addition.yml‎

Lines changed: 0 additions & 29 deletions
This file was deleted.

‎.github/ISSUE_TEMPLATE/data_correction.yml‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎.gitignore‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@ env/
2323
# TECHAPI_DATA_DIR); the dataset is never committed here.
2424
/TechAPI/
2525

26-
# Generated static dump (build artifact; published by refresh-data workflow)
26+
# Generated static dump (build artifact; deploy-pages.yml publishes it)
2727
/dump/
2828

2929
# Local-only handoff notes (private; never committed to the public repo)
3030
*.local.md
3131

32-
# Note: data/_staging/ (raw collected candidate pool) is intentionally tracked —
33-
# comprehensive data collection is a purpose of this repo.
34-
3532
# Local Wikipedia GPU backfill cache and dry-run reports (never a TechAPI write)
3633
.wikipedia-gpu-backfill/
3734

@@ -55,6 +52,3 @@ coverage.xml
5552

5653
# Local Wikipedia SoC backfill cache and reports (never commit)
5754
.wikipedia-soc-backfill/
58-
59-
# Recomputable verifier cache
60-
/data/_verify/state/

‎Dockerfile‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ COPY pyproject.toml README.md ./
1111
COPY app ./app
1212
RUN pip install --no-cache-dir .
1313

14-
# Runtime assets.
15-
COPY data ./data
16-
COPY scripts ./scripts
14+
# Runtime assets. The dataset is not part of the image: mount a TechAPI
15+
# checkout's data/ at /data (see docker-compose.yml).
16+
COPY config ./config
17+
ENV TECHAPI_DATA_DIR=/data
1718

1819
# Run as a non-root user.
1920
RUN useradd --create-home --uid 10001 appuser \

‎README.md‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ tests/ # unit/, integration/, verify/
3939
site/ # Astro landing page, deployed to GitHub Pages
4040
docs/ # SPEC, DATA_PIPELINE, DEVELOPMENT
4141
.github/workflows/ # CI; every workflow is listed below
42-
Dockerfile, docker-compose.yml # stale, do not build (see Docker)
42+
Dockerfile, docker-compose.yml # API + Postgres, dataset mounted (see Docker)
4343
```
4444

4545
Routes under `/v1`: `health`, `version`, `brands`, `socs`, `smartphones`,
@@ -115,11 +115,19 @@ Smartphones continue to require numeric values for both fields.
115115

116116
### Docker
117117

118-
`Dockerfile` and `docker-compose.yml` predate the split from TechAPI and do
119-
not work as they are: the Dockerfile copies `data/` and `scripts/`, which no
120-
longer exist here, so the image does not build, and the compose file mounts no
121-
TechAPI checkout for `app.seed` to read. No workflow builds or uses them. Use
122-
the Quickstart above; for Postgres, point `DATABASE_URL` at your own instance.
118+
The image holds the engine only and expects the dataset at `/data`
119+
(`TECHAPI_DATA_DIR`). `docker-compose.yml` starts Postgres and the API, and
120+
mounts `../TechAPI/data` read-only at that path, so clone the two repos side by
121+
side:
122+
123+
```text
124+
<parent>/TechEngine # this repo; run `docker compose up --build` here
125+
<parent>/TechAPI # the dataset
126+
```
127+
128+
The API seeds the database from the mount before it serves, which takes a
129+
while on the full dataset. The image has no git, so record timestamps are the
130+
seed time. No workflow builds or uses these files.
123131

124132
## Roadmap
125133

‎docker-compose.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ services:
2525
API_ENV: development
2626
ports:
2727
- "8000:8000"
28+
# The dataset comes from a TechAPI checkout next to this repo:
29+
# <parent>/TechEngine (this repo; run docker compose here)
30+
# <parent>/TechAPI (git clone https://github.com/GetTechAPI/TechAPI.git)
31+
# Its data/ is mounted read-only where the image's TECHAPI_DATA_DIR points.
32+
volumes:
33+
- ../TechAPI/data:/data:ro
2834
# Seed the database, then serve. Idempotent: re-running skips existing rows.
2935
command: >
3036
sh -c "python -m app.seed && uvicorn app.main:app --host 0.0.0.0 --port 8000"

0 commit comments

Comments
 (0)