Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# matledger API configuration
# nilvar API configuration
# Copy to .env and modify as needed. All values shown are defaults.

# Path to SQLite database (inside the container, mount a volume to /data)
MATLEDGER_DB=/data/matledger.db
NILVAR_DB=/data/nilvar.db

# Python logging level: DEBUG, INFO, WARNING, ERROR
MATLEDGER_LOG_LEVEL=INFO
NILVAR_LOG_LEVEL=INFO

# CORS allowed origins (JSON array, empty = no CORS headers)
# MATLEDGER_CORS_ORIGINS=["http://localhost:3000"]
# NILVAR_CORS_ORIGINS=["http://localhost:3000"]
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Exclude non-source HTML (generated reports, docs) from GitHub language stats
# so the repo is correctly identified as Python, not HTML.
*.html linguist-documentation=true
fixtures/**/*.html linguist-generated=true
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ENV/
htmlcov/
.mypy_cache/

# matledger data
# nilvar data
*.db
smoke_report.*
smoke_bundle.json
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ RUN pip install --no-cache-dir build \
# --- runtime ---
FROM python:3.12-slim

RUN groupadd --gid 1000 matledger \
&& useradd --uid 1000 --gid matledger --create-home matledger
RUN groupadd --gid 1000 nilvar \
&& useradd --uid 1000 --gid nilvar --create-home nilvar

WORKDIR /app

Expand All @@ -22,13 +22,13 @@ RUN WHEEL=$(ls /tmp/*.whl) \
&& pip install --no-cache-dir "${WHEEL}[api,ingest,viz]" \
&& rm /tmp/*.whl

RUN mkdir -p /data && chown matledger:matledger /data
RUN mkdir -p /data && chown nilvar:nilvar /data

USER matledger
USER nilvar

EXPOSE 8000

ENV MATLEDGER_DB=/data/matledger.db \
MATLEDGER_LOG_LEVEL=INFO
ENV NILVAR_DB=/data/nilvar.db \
NILVAR_LOG_LEVEL=INFO

CMD ["uvicorn", "matledger.api.app:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "nilvar.api.app:app", "--host", "0.0.0.0", "--port", "8000"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test: ## Run tests
check: lint format typecheck test ## Run full quality gate (lint + format + typecheck + test)

coverage: ## Run tests with coverage report
pytest --cov=matledger --cov-report=term-missing --cov-fail-under=80
pytest --cov=nilvar --cov-report=term-missing --cov-fail-under=80

audit: ## Audit dependencies for vulnerabilities
pip-audit
Expand Down
8 changes: 4 additions & 4 deletions examples/notebook_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"id": "intro",
"metadata": {},
"source": [
"# matledger — Notebook Demo\n",
"# nilvar — Notebook Demo\n",
"\n",
"This notebook walks through a complete 3-iteration discovery campaign using the matledger SDK.\n",
"This notebook walks through a complete 3-iteration discovery campaign using the nilvar SDK.\n",
"We'll create a campaign, propose candidates, record results and failures, run all 11 trajectory\n",
"analytics, and generate a full report.\n",
"\n",
Expand All @@ -20,7 +20,7 @@
"id": "setup",
"metadata": {},
"outputs": [],
"source": "%matplotlib inline\nfrom matledger.sdk import CampaignClient\n\n# Create an in-memory campaign (use a file path for persistence)\nclient = CampaignClient(\":memory:\")\nclient.create_campaign(\n campaign_id=\"perovskite-opt\",\n goal=\"maximize bandgap\",\n budget_cap=50_000.0,\n)\nprint(\"Campaign created.\")"
"source": "%matplotlib inline\nfrom nilvar.sdk import CampaignClient\n\n# Create an in-memory campaign (use a file path for persistence)\nclient = CampaignClient(\":memory:\")\nclient.create_campaign(\n campaign_id=\"perovskite-opt\",\n goal=\"maximize bandgap\",\n budget_cap=50_000.0,\n)\nprint(\"Campaign created.\")"
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -108,7 +108,7 @@
"source": [
"## Trajectory Analytics\n",
"\n",
"These are matledger's differentiators — trajectory-level signals that CRUD experiment trackers cannot provide.\n",
"These are nilvar's differentiators — trajectory-level signals that CRUD experiment trackers cannot provide.\n",
"\n",
"Each analytic produces both a verdict (a structured assessment) and a chart (a matplotlib figure) so you can see the signal visually."
]
Expand Down
238 changes: 0 additions & 238 deletions sample_report.html

This file was deleted.

2,214 changes: 2,214 additions & 0 deletions uv.lock

Large diffs are not rendered by default.