diff --git a/.gitignore b/.gitignore index 02ed1d9c8..7f31d3996 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,8 @@ logs/ *.mp3 *.flac .coverage -fixtures/journal/agents/*.jsonl -fixtures/journal/tokens/*.json +tests/fixtures/journal/agents/*.jsonl +tests/fixtures/journal/tokens/*.json *.sqlite *.log /config*.py diff --git a/AGENTS.md b/AGENTS.md index e199ef0d4..f329d5995 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -42,8 +42,7 @@ solstone/ ├── convey/ # Web app frontend & backend ├── apps/ # Convey app extensions (see docs/APPS.md) ├── muse/ # Agent/generator configs + Agent Skills (muse/*/SKILL.md) -├── tests/ # Pytest test suites -├── fixtures/ # Test data (mock journal) +├── tests/ # Pytest test suites + test fixtures under tests/fixtures/ ├── docs/ # All documentation (*.md files) ├── AGENTS.md # Development guidelines (this file) ├── CLAUDE.md # Symlink to AGENTS.md for Claude Code @@ -55,7 +54,7 @@ Each package has a README.md symlink pointing to its documentation in `docs/`. ### Package Organization * **Python**: Requires Python 3.10+ -* **Modules**: Each top-level folder is a Python package with `__init__.py` unless it is data-only (e.g., `fixtures/`) +* **Modules**: Each top-level folder is a Python package with `__init__.py` unless it is data-only (e.g., `tests/fixtures/`) * **Imports**: Prefer absolute imports (e.g., `from think.utils import setup_cli`) whenever feasible * **Entry Points**: Commands are registered in `sol.py`'s `COMMANDS` dict (pyproject.toml just defines the `sol` entry point) * **Journal**: Data stored under `JOURNAL_PATH` (see Environment Management below) @@ -87,11 +86,11 @@ The unified CLI is `sol`. Run `sol` to see status and available commands. Use `s ```python # Use comprehensive mock journal data for testing -os.environ["JOURNAL_PATH"] = "fixtures/journal" +os.environ["JOURNAL_PATH"] = "tests/fixtures/journal" # Now all journal operations work with test data ``` -The `fixtures/journal/` directory contains a complete mock journal structure with sample facets, agents, transcripts, and indexed data for testing. +The `tests/fixtures/journal/` directory contains a complete mock journal structure with sample facets, agents, transcripts, and indexed data for testing. --- @@ -132,7 +131,7 @@ Use `//` comments for JavaScript files. * **Framework**: pytest with coverage reporting * **Unit Tests**: `tests/` root directory - Fast, no external API calls - - Use `fixtures/journal/` mock data + - Use `tests/fixtures/journal/` mock data - Test individual functions and modules * **Integration Tests**: `tests/integration/` subdirectory - Test real backends (Anthropic, OpenAI, Google) @@ -228,7 +227,7 @@ make clean-install # Clean and reinstall ### File Locations * **Entry Points**: `sol.py` `COMMANDS` dict -* **Test Fixtures**: `fixtures/journal/` - complete mock journal +* **Test Fixtures**: `tests/fixtures/journal/` - complete mock journal * **Live Logs**: `$JOURNAL_PATH/health/.log` * **Agent Personas**: `muse/*.md` (apps can add their own in `muse/`, see [docs/APPS.md](docs/APPS.md)) * **Generator Templates**: `muse/*.md` (apps can add their own in `muse/`, see [docs/APPS.md](docs/APPS.md)) diff --git a/Makefile b/Makefile index 7366b4784..2974f83dd 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ skills: fi # Test environment - use fixtures journal for all tests -TEST_ENV = JOURNAL_PATH=fixtures/journal +TEST_ENV = JOURNAL_PATH=tests/fixtures/journal # Venv tool shortcuts PYTEST := $(VENV_BIN)/pytest diff --git a/apps/todos/tests/test_tools.py b/apps/todos/tests/test_tools.py index 5cae70261..ef4b9caf8 100644 --- a/apps/todos/tests/test_tools.py +++ b/apps/todos/tests/test_tools.py @@ -19,7 +19,9 @@ def call_tool(tool, *args, **kwargs): return tool(*args, **kwargs) -FIXTURES_JOURNAL = Path(__file__).resolve().parents[3] / "fixtures" / "journal" +FIXTURES_JOURNAL = ( + Path(__file__).resolve().parents[3] / "tests" / "fixtures" / "journal" +) def test_todo_list_returns_numbered_view(todo_env): @@ -183,7 +185,7 @@ def test_todo_add_extracts_time(todo_env): def test_todo_tool_pack_round_trip(tmp_path, monkeypatch): """Exercise add/done/cancel flow against a copied fixture journal.""" if not FIXTURES_JOURNAL.exists(): - pytest.skip("fixtures/journal not found") + pytest.skip("tests/fixtures/journal not found") journal_copy = tmp_path / "journal" shutil.copytree(FIXTURES_JOURNAL, journal_copy) diff --git a/apps/transcripts/tests/conftest.py b/apps/transcripts/tests/conftest.py index 8fe550a19..2f0a102c1 100644 --- a/apps/transcripts/tests/conftest.py +++ b/apps/transcripts/tests/conftest.py @@ -11,4 +11,6 @@ import pytest @pytest.fixture(autouse=True) def _journal_env(monkeypatch): """Point JOURNAL_PATH at the test fixtures.""" - monkeypatch.setenv("JOURNAL_PATH", os.path.join(os.getcwd(), "fixtures", "journal")) + monkeypatch.setenv( + "JOURNAL_PATH", os.path.join(os.getcwd(), "tests", "fixtures", "journal") + ) diff --git a/docs/BACKLOG.md b/docs/BACKLOG.md index 188811eb7..ca6886bf5 100644 --- a/docs/BACKLOG.md +++ b/docs/BACKLOG.md @@ -37,5 +37,5 @@ Tactical work items prioritized for implementation. ## Testing -- [ ] Move fixtures/ into tests/ +- [x] Move fixtures/ into tests/ - [ ] Enable clean fixture-based service startup (Convey on dynamic port) for integration/dev testing with screenshots diff --git a/docs/PROVIDERS.md b/docs/PROVIDERS.md index bd1cab0f8..05d342618 100644 --- a/docs/PROVIDERS.md +++ b/docs/PROVIDERS.md @@ -289,7 +289,7 @@ providers: - 2 = FLASH (balanced) - 3 = LITE (fast/cheap) -See `fixtures/journal/config/journal.json` for a complete example and `think/models.py` `PROVIDER_DEFAULTS` for tier-to-model mappings. +See `tests/fixtures/journal/config/journal.json` for a complete example and `think/models.py` `PROVIDER_DEFAULTS` for tier-to-model mappings. ## Testing @@ -354,7 +354,7 @@ This allows reusing much of the OpenAI provider's patterns for request/response **Testing:** 11. Create unit tests in `tests/test_.py` 12. Create integration tests in `tests/integration/test__backend.py` -13. Add test contexts to `fixtures/journal/config/journal.json` +13. Add test contexts to `tests/fixtures/journal/config/journal.json` **Documentation:** 14. Update `think/providers/__init__.py` docstring diff --git a/fixtures/000000_audio.json b/fixtures/000000_audio.json deleted file mode 100644 index 60d8ddf9c..000000000 --- a/fixtures/000000_audio.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - {"start": "00:00:00", "source": "mic", "speaker": 1, "text": "So, all other companies, software vendors, like our competitors are using it.", "description": "speaking with a slight accent, technical discussion tone"}, - {"start": "00:00:07", "source": "mic", "speaker": 2, "text": "But at the moment its use case is on legacy systems. So the developer, the analyst is syncing the data, and then they go to run the process. So the challenge that we have is making sure that it receives data from the Data Hub. From back when I worked at a previous company, I recall that the Data Hub goes idle after the initial sync, and then it's not sending new data, I don't think. And we would want to see if there's any way that we can have an ALWAYS-ON data stream to our listener from the Data Hub, or if the Data Hub terminates the session completely. If not, then we'd have to devise a way that as soon as the Data Hub is queried, it sends data to our service. We have to assume it has an empty cache at that point. It might sync the first 10% of the data and then start its process and continue syncing in the background. So that was one of the questions to your team was how much access to the data stream is there from the Data Hub during an idle session?", "description": "calm informative tone, clear and articulate"}, - {"start": "00:01:09", "source": "mic", "speaker": 1, "text": "It's dependent on the system architecture, but most of them currently don't maintain an active data stream when a session is closed.", "description": "explaining with technical tone"}, - {"topics": "API integration, data synchronization, real-time data, system architecture, Data Hub", "setting": "workplace"} -] \ No newline at end of file diff --git a/fixtures/000000_monitor_0_diff.json b/fixtures/000000_monitor_0_diff.json deleted file mode 100644 index a5991f9f0..000000000 --- a/fixtures/000000_monitor_0_diff.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "app": "Team Chat App", - "app_title": "Anna Koval, Leo Maxwell, Nina Patel (DM) - DataSystems - Team Chat App", - "visual_description": "The screenshot shows a Team Chat App conversation. On the left is the main conversation window with messages from Leo Maxwell, Nina Patel, and Alex. On the right is a 'Thread' window with replies to Alex's message. The messages contain text, emojis, and timestamps. Below the main conversation is a message input field with formatting options and an area where users can type a message. The 'Thread' window shows replies from Alex and Leo Maxwell, along with a reply input field.", - "full_ocr": "Thread\nAlex 2 minutes ago\nsounds like leo wants Synapse-link with Omni-net\n1 reply\nLeo Maxwell 1 minute ago\nI do want that. Productivity > privacy\nReply...\nAlso send to the group\nAa", - "meeting_status": "No meeting is currently active", - "activity_category": "Communication" -} \ No newline at end of file diff --git a/fixtures/000000_screen.json b/fixtures/000000_screen.json deleted file mode 100644 index 90c36c9a9..000000000 --- a/fixtures/000000_screen.json +++ /dev/null @@ -1,18 +0,0 @@ -## 09:10 - 09:15 Summary - -During this five-minute window, the user was actively engaged in a meeting, likely taking or reviewing project notes, within an **Internal Wiki Editor**. - -### Detailed Activity: - -At **09:12:07**, the user was viewing and potentially drafting or editing an internal wiki page titled "**Project-Helios_Q2-Sprint-Review_Notes_10JUNE2025.wiki - Saved**". - -The document appears to be project review notes, containing detailed discussions and action items related to various technical and project management topics, including: -* **Storage Protocol SP-450**: Mention of a cross-team sync date update to Q3. -* **Tier-3 Archive Spec**: Editorial work ongoing, with sections 2.1 and 2 expected to be completed by Q4 2025, and full document completion by Q1 2026. Stress and performance tests are planned for Q2 2026, with code review in Q3 2026, and final release by January 2027. -* **Security Council (SC) Review**: Discussion about the SC issuing a new guideline reclassifying a legacy database schema for Project "Neptune" work. -* **Quarterly Milestone Sync (QMS)**: Work on a white paper for end of Q2, requiring Enterprise Architecture (EA) and Security Council (SC) coordination before the Product Review Committee (PRC) meeting. Task Force 4.1 is available for joining, and the "Glacier" storage tier codification in the 'Service Catalog' was discussed, including its dual-use nature. A recommendation to the August PRC on new work is pending. -* **Client-Side Caching Spec**: The partner consultation just opened, and the Final Draft Review (FDR) is now July 2025. VeriData has waived standard licensing requirements for external partner participation. -* **Project "Orion"** and **Frontend UI Spec**: No new updates were noted. -* **Action Items**: A table of action items was visible, including "A-113 Brief Marcus Thorne ENG-400" assigned to Liam with a status of "IN PROGRESS". - -The presence of video conferencing controls at the bottom of the screen, with the "Unmute" button indicating the microphone was muted, confirms the user was participating in an **active meeting** while reviewing or drafting these notes. The activity was categorized as "Drafting". \ No newline at end of file diff --git a/fixtures/journal_stats.json b/fixtures/journal_stats.json deleted file mode 100644 index 246936540..000000000 --- a/fixtures/journal_stats.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "days": { - "20240101": { - "audio_flac": 1, - "audio_json": 0, - "repair_observe": 2, - "diff_png": 0, - "desc_json": 1, - "screen_md": 1, - "repair_reduce": 1, - "entities": 1, - "repair_entity": 0, - "outputs_processed": 3, - "outputs_pending": 8, - "audio_seconds": 0.0, - "audio_bytes": 5, - "image_bytes": 0, - "activity": 18 - } - }, - "totals": { - "audio_flac": 1, - "audio_json": 0, - "repair_observe": 2, - "diff_png": 0, - "desc_json": 1, - "screen_md": 1, - "repair_reduce": 1, - "entities": 1, - "repair_entity": 0, - "outputs_processed": 3, - "outputs_pending": 8 - }, - "total_audio_seconds": 0.0, - "total_audio_bytes": 5, - "total_image_bytes": 0, - "topic_counts": {}, - "topic_minutes": {}, - "heatmap": [ - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - ] -} \ No newline at end of file diff --git a/tests/conftest.py b/tests/conftest.py index f1165e37d..ba8236563 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -14,7 +14,7 @@ from think.utils import now_ms @pytest.fixture(autouse=True) def set_test_journal_path(request, monkeypatch): - """Set JOURNAL_PATH to fixtures/journal for all unit tests. + """Set JOURNAL_PATH to tests/fixtures/journal for all unit tests. This ensures all tests have a valid JOURNAL_PATH without needing to explicitly set it in each test. Integration tests are excluded. @@ -23,8 +23,8 @@ def set_test_journal_path(request, monkeypatch): if "integration" in request.node.keywords: return - # Set JOURNAL_PATH to fixtures/journal for all unit tests - monkeypatch.setenv("JOURNAL_PATH", "fixtures/journal") + # Set JOURNAL_PATH to tests/fixtures/journal for all unit tests + monkeypatch.setenv("JOURNAL_PATH", "tests/fixtures/journal") @pytest.fixture(autouse=True) diff --git a/fixtures/journal/20240101/123456_300/audio.json b/tests/fixtures/journal/20240101/123456_300/audio.json similarity index 100% rename from fixtures/journal/20240101/123456_300/audio.json rename to tests/fixtures/journal/20240101/123456_300/audio.json diff --git a/fixtures/journal/20240101/123456_300/audio.jsonl b/tests/fixtures/journal/20240101/123456_300/audio.jsonl similarity index 100% rename from fixtures/journal/20240101/123456_300/audio.jsonl rename to tests/fixtures/journal/20240101/123456_300/audio.jsonl diff --git a/fixtures/journal/20240101/123456_300/audio.md b/tests/fixtures/journal/20240101/123456_300/audio.md similarity index 100% rename from fixtures/journal/20240101/123456_300/audio.md rename to tests/fixtures/journal/20240101/123456_300/audio.md diff --git a/fixtures/journal/20240101/123456_300/monitor_1_diff.json b/tests/fixtures/journal/20240101/123456_300/monitor_1_diff.json similarity index 100% rename from fixtures/journal/20240101/123456_300/monitor_1_diff.json rename to tests/fixtures/journal/20240101/123456_300/monitor_1_diff.json diff --git a/fixtures/journal/20240101/123456_300/monitor_1_diff.png b/tests/fixtures/journal/20240101/123456_300/monitor_1_diff.png similarity index 100% rename from fixtures/journal/20240101/123456_300/monitor_1_diff.png rename to tests/fixtures/journal/20240101/123456_300/monitor_1_diff.png diff --git a/fixtures/journal/20240101/123456_300/monitor_1_diff_box.json b/tests/fixtures/journal/20240101/123456_300/monitor_1_diff_box.json similarity index 100% rename from fixtures/journal/20240101/123456_300/monitor_1_diff_box.json rename to tests/fixtures/journal/20240101/123456_300/monitor_1_diff_box.json diff --git a/fixtures/journal/20240101/123456_300/screen.jsonl b/tests/fixtures/journal/20240101/123456_300/screen.jsonl similarity index 100% rename from fixtures/journal/20240101/123456_300/screen.jsonl rename to tests/fixtures/journal/20240101/123456_300/screen.jsonl diff --git a/fixtures/journal/20240101/123456_300/screen.md b/tests/fixtures/journal/20240101/123456_300/screen.md similarity index 100% rename from fixtures/journal/20240101/123456_300/screen.md rename to tests/fixtures/journal/20240101/123456_300/screen.md diff --git a/fixtures/journal/20240101/agents/flow.md b/tests/fixtures/journal/20240101/agents/flow.md similarity index 100% rename from fixtures/journal/20240101/agents/flow.md rename to tests/fixtures/journal/20240101/agents/flow.md diff --git a/fixtures/journal/20240101/agents/meetings.md b/tests/fixtures/journal/20240101/agents/meetings.md similarity index 100% rename from fixtures/journal/20240101/agents/meetings.md rename to tests/fixtures/journal/20240101/agents/meetings.md diff --git a/fixtures/journal/20240101/indexer/transcripts.sqlite b/tests/fixtures/journal/20240101/indexer/transcripts.sqlite similarity index 100% rename from fixtures/journal/20240101/indexer/transcripts.sqlite rename to tests/fixtures/journal/20240101/indexer/transcripts.sqlite diff --git a/fixtures/journal/20240102/234567_300/audio.json b/tests/fixtures/journal/20240102/234567_300/audio.json similarity index 100% rename from fixtures/journal/20240102/234567_300/audio.json rename to tests/fixtures/journal/20240102/234567_300/audio.json diff --git a/fixtures/journal/20240102/234567_300/audio.jsonl b/tests/fixtures/journal/20240102/234567_300/audio.jsonl similarity index 100% rename from fixtures/journal/20240102/234567_300/audio.jsonl rename to tests/fixtures/journal/20240102/234567_300/audio.jsonl diff --git a/fixtures/journal/20240102/234567_300/audio.md b/tests/fixtures/journal/20240102/234567_300/audio.md similarity index 100% rename from fixtures/journal/20240102/234567_300/audio.md rename to tests/fixtures/journal/20240102/234567_300/audio.md diff --git a/fixtures/journal/20240102/234567_300/monitor_1_diff.json b/tests/fixtures/journal/20240102/234567_300/monitor_1_diff.json similarity index 100% rename from fixtures/journal/20240102/234567_300/monitor_1_diff.json rename to tests/fixtures/journal/20240102/234567_300/monitor_1_diff.json diff --git a/fixtures/journal/20240102/234567_300/screen.jsonl b/tests/fixtures/journal/20240102/234567_300/screen.jsonl similarity index 100% rename from fixtures/journal/20240102/234567_300/screen.jsonl rename to tests/fixtures/journal/20240102/234567_300/screen.jsonl diff --git a/fixtures/journal/20240102/234567_300/screen.md b/tests/fixtures/journal/20240102/234567_300/screen.md similarity index 100% rename from fixtures/journal/20240102/234567_300/screen.md rename to tests/fixtures/journal/20240102/234567_300/screen.md diff --git a/fixtures/journal/20240102/agents/flow.md b/tests/fixtures/journal/20240102/agents/flow.md similarity index 100% rename from fixtures/journal/20240102/agents/flow.md rename to tests/fixtures/journal/20240102/agents/flow.md diff --git a/fixtures/journal/20240102/indexer/transcripts.sqlite b/tests/fixtures/journal/20240102/indexer/transcripts.sqlite similarity index 100% rename from fixtures/journal/20240102/indexer/transcripts.sqlite rename to tests/fixtures/journal/20240102/indexer/transcripts.sqlite diff --git a/fixtures/journal/20250124/TODO.md b/tests/fixtures/journal/20250124/TODO.md similarity index 100% rename from fixtures/journal/20250124/TODO.md rename to tests/fixtures/journal/20250124/TODO.md diff --git a/fixtures/journal/agents/1700000000001.jsonl b/tests/fixtures/journal/agents/1700000000001.jsonl similarity index 100% rename from fixtures/journal/agents/1700000000001.jsonl rename to tests/fixtures/journal/agents/1700000000001.jsonl diff --git a/fixtures/journal/apps/chat/chats/1764019444672.json b/tests/fixtures/journal/apps/chat/chats/1764019444672.json similarity index 100% rename from fixtures/journal/apps/chat/chats/1764019444672.json rename to tests/fixtures/journal/apps/chat/chats/1764019444672.json diff --git a/fixtures/journal/apps/chat/chats/1764019602551.json b/tests/fixtures/journal/apps/chat/chats/1764019602551.json similarity index 100% rename from fixtures/journal/apps/chat/chats/1764019602551.json rename to tests/fixtures/journal/apps/chat/chats/1764019602551.json diff --git a/fixtures/journal/apps/chat/chats/1764019955580.json b/tests/fixtures/journal/apps/chat/chats/1764019955580.json similarity index 100% rename from fixtures/journal/apps/chat/chats/1764019955580.json rename to tests/fixtures/journal/apps/chat/chats/1764019955580.json diff --git a/fixtures/journal/config/convey.json b/tests/fixtures/journal/config/convey.json similarity index 100% rename from fixtures/journal/config/convey.json rename to tests/fixtures/journal/config/convey.json diff --git a/fixtures/journal/config/journal.json b/tests/fixtures/journal/config/journal.json similarity index 100% rename from fixtures/journal/config/journal.json rename to tests/fixtures/journal/config/journal.json diff --git a/fixtures/journal/entities.md b/tests/fixtures/journal/entities.md similarity index 100% rename from fixtures/journal/entities.md rename to tests/fixtures/journal/entities.md diff --git a/fixtures/journal/entities/acme_corp/entity.json b/tests/fixtures/journal/entities/acme_corp/entity.json similarity index 100% rename from fixtures/journal/entities/acme_corp/entity.json rename to tests/fixtures/journal/entities/acme_corp/entity.json diff --git a/fixtures/journal/entities/alice_johnson/entity.json b/tests/fixtures/journal/entities/alice_johnson/entity.json similarity index 100% rename from fixtures/journal/entities/alice_johnson/entity.json rename to tests/fixtures/journal/entities/alice_johnson/entity.json diff --git a/fixtures/journal/entities/api_optimization/entity.json b/tests/fixtures/journal/entities/api_optimization/entity.json similarity index 100% rename from fixtures/journal/entities/api_optimization/entity.json rename to tests/fixtures/journal/entities/api_optimization/entity.json diff --git a/fixtures/journal/entities/bob_smith/entity.json b/tests/fixtures/journal/entities/bob_smith/entity.json similarity index 100% rename from fixtures/journal/entities/bob_smith/entity.json rename to tests/fixtures/journal/entities/bob_smith/entity.json diff --git a/fixtures/journal/entities/bob_wilson/entity.json b/tests/fixtures/journal/entities/bob_wilson/entity.json similarity index 100% rename from fixtures/journal/entities/bob_wilson/entity.json rename to tests/fixtures/journal/entities/bob_wilson/entity.json diff --git a/fixtures/journal/entities/dashboard_redesign/entity.json b/tests/fixtures/journal/entities/dashboard_redesign/entity.json similarity index 100% rename from fixtures/journal/entities/dashboard_redesign/entity.json rename to tests/fixtures/journal/entities/dashboard_redesign/entity.json diff --git a/fixtures/journal/entities/docker/entity.json b/tests/fixtures/journal/entities/docker/entity.json similarity index 100% rename from fixtures/journal/entities/docker/entity.json rename to tests/fixtures/journal/entities/docker/entity.json diff --git a/fixtures/journal/entities/first_test_entity/entity.json b/tests/fixtures/journal/entities/first_test_entity/entity.json similarity index 100% rename from fixtures/journal/entities/first_test_entity/entity.json rename to tests/fixtures/journal/entities/first_test_entity/entity.json diff --git a/fixtures/journal/entities/jane_doe/entity.json b/tests/fixtures/journal/entities/jane_doe/entity.json similarity index 100% rename from fixtures/journal/entities/jane_doe/entity.json rename to tests/fixtures/journal/entities/jane_doe/entity.json diff --git a/fixtures/journal/entities/john_smith/entity.json b/tests/fixtures/journal/entities/john_smith/entity.json similarity index 100% rename from fixtures/journal/entities/john_smith/entity.json rename to tests/fixtures/journal/entities/john_smith/entity.json diff --git a/fixtures/journal/entities/postgresql/entity.json b/tests/fixtures/journal/entities/postgresql/entity.json similarity index 100% rename from fixtures/journal/entities/postgresql/entity.json rename to tests/fixtures/journal/entities/postgresql/entity.json diff --git a/fixtures/journal/entities/second_test_entity/entity.json b/tests/fixtures/journal/entities/second_test_entity/entity.json similarity index 100% rename from fixtures/journal/entities/second_test_entity/entity.json rename to tests/fixtures/journal/entities/second_test_entity/entity.json diff --git a/fixtures/journal/entities/tech_solutions_inc/entity.json b/tests/fixtures/journal/entities/tech_solutions_inc/entity.json similarity index 100% rename from fixtures/journal/entities/tech_solutions_inc/entity.json rename to tests/fixtures/journal/entities/tech_solutions_inc/entity.json diff --git a/fixtures/journal/entities/third_test_entity_with_description/entity.json b/tests/fixtures/journal/entities/third_test_entity_with_description/entity.json similarity index 100% rename from fixtures/journal/entities/third_test_entity_with_description/entity.json rename to tests/fixtures/journal/entities/third_test_entity_with_description/entity.json diff --git a/fixtures/journal/entities/visual_studio_code/entity.json b/tests/fixtures/journal/entities/visual_studio_code/entity.json similarity index 100% rename from fixtures/journal/entities/visual_studio_code/entity.json rename to tests/fixtures/journal/entities/visual_studio_code/entity.json diff --git a/fixtures/journal/entity_review.log b/tests/fixtures/journal/entity_review.log similarity index 100% rename from fixtures/journal/entity_review.log rename to tests/fixtures/journal/entity_review.log diff --git a/fixtures/journal/facets/broken-facet/.gitkeep b/tests/fixtures/journal/facets/broken-facet/.gitkeep similarity index 100% rename from fixtures/journal/facets/broken-facet/.gitkeep rename to tests/fixtures/journal/facets/broken-facet/.gitkeep diff --git a/fixtures/journal/facets/empty-entities/entities.md b/tests/fixtures/journal/facets/empty-entities/entities.md similarity index 100% rename from fixtures/journal/facets/empty-entities/entities.md rename to tests/fixtures/journal/facets/empty-entities/entities.md diff --git a/fixtures/journal/facets/empty-entities/facet.json b/tests/fixtures/journal/facets/empty-entities/facet.json similarity index 100% rename from fixtures/journal/facets/empty-entities/facet.json rename to tests/fixtures/journal/facets/empty-entities/facet.json diff --git a/fixtures/journal/facets/full-featured/activities/activities.jsonl b/tests/fixtures/journal/facets/full-featured/activities/activities.jsonl similarity index 100% rename from fixtures/journal/facets/full-featured/activities/activities.jsonl rename to tests/fixtures/journal/facets/full-featured/activities/activities.jsonl diff --git a/fixtures/journal/facets/full-featured/entities/20250101.jsonl b/tests/fixtures/journal/facets/full-featured/entities/20250101.jsonl similarity index 100% rename from fixtures/journal/facets/full-featured/entities/20250101.jsonl rename to tests/fixtures/journal/facets/full-featured/entities/20250101.jsonl diff --git a/fixtures/journal/facets/full-featured/entities/first_test_entity/entity.json b/tests/fixtures/journal/facets/full-featured/entities/first_test_entity/entity.json similarity index 100% rename from fixtures/journal/facets/full-featured/entities/first_test_entity/entity.json rename to tests/fixtures/journal/facets/full-featured/entities/first_test_entity/entity.json diff --git a/fixtures/journal/facets/full-featured/entities/second_test_entity/entity.json b/tests/fixtures/journal/facets/full-featured/entities/second_test_entity/entity.json similarity index 100% rename from fixtures/journal/facets/full-featured/entities/second_test_entity/entity.json rename to tests/fixtures/journal/facets/full-featured/entities/second_test_entity/entity.json diff --git a/fixtures/journal/facets/full-featured/entities/third_test_entity_with_description/entity.json b/tests/fixtures/journal/facets/full-featured/entities/third_test_entity_with_description/entity.json similarity index 100% rename from fixtures/journal/facets/full-featured/entities/third_test_entity_with_description/entity.json rename to tests/fixtures/journal/facets/full-featured/entities/third_test_entity_with_description/entity.json diff --git a/fixtures/journal/facets/full-featured/facet.json b/tests/fixtures/journal/facets/full-featured/facet.json similarity index 100% rename from fixtures/journal/facets/full-featured/facet.json rename to tests/fixtures/journal/facets/full-featured/facet.json diff --git a/fixtures/journal/facets/minimal-facet/facet.json b/tests/fixtures/journal/facets/minimal-facet/facet.json similarity index 100% rename from fixtures/journal/facets/minimal-facet/facet.json rename to tests/fixtures/journal/facets/minimal-facet/facet.json diff --git a/fixtures/journal/facets/personal/entities/20250101.jsonl b/tests/fixtures/journal/facets/personal/entities/20250101.jsonl similarity index 100% rename from fixtures/journal/facets/personal/entities/20250101.jsonl rename to tests/fixtures/journal/facets/personal/entities/20250101.jsonl diff --git a/fixtures/journal/facets/personal/entities/20250102.jsonl b/tests/fixtures/journal/facets/personal/entities/20250102.jsonl similarity index 100% rename from fixtures/journal/facets/personal/entities/20250102.jsonl rename to tests/fixtures/journal/facets/personal/entities/20250102.jsonl diff --git a/fixtures/journal/facets/personal/entities/acme_corp/entity.json b/tests/fixtures/journal/facets/personal/entities/acme_corp/entity.json similarity index 100% rename from fixtures/journal/facets/personal/entities/acme_corp/entity.json rename to tests/fixtures/journal/facets/personal/entities/acme_corp/entity.json diff --git a/fixtures/journal/facets/personal/entities/alice_johnson/entity.json b/tests/fixtures/journal/facets/personal/entities/alice_johnson/entity.json similarity index 100% rename from fixtures/journal/facets/personal/entities/alice_johnson/entity.json rename to tests/fixtures/journal/facets/personal/entities/alice_johnson/entity.json diff --git a/fixtures/journal/facets/personal/entities/bob_smith/entity.json b/tests/fixtures/journal/facets/personal/entities/bob_smith/entity.json similarity index 100% rename from fixtures/journal/facets/personal/entities/bob_smith/entity.json rename to tests/fixtures/journal/facets/personal/entities/bob_smith/entity.json diff --git a/fixtures/journal/facets/personal/events/20240101.jsonl b/tests/fixtures/journal/facets/personal/events/20240101.jsonl similarity index 100% rename from fixtures/journal/facets/personal/events/20240101.jsonl rename to tests/fixtures/journal/facets/personal/events/20240101.jsonl diff --git a/fixtures/journal/facets/personal/todos/20240101.jsonl b/tests/fixtures/journal/facets/personal/todos/20240101.jsonl similarity index 100% rename from fixtures/journal/facets/personal/todos/20240101.jsonl rename to tests/fixtures/journal/facets/personal/todos/20240101.jsonl diff --git a/fixtures/journal/facets/priority-test/facet.json b/tests/fixtures/journal/facets/priority-test/facet.json similarity index 100% rename from fixtures/journal/facets/priority-test/facet.json rename to tests/fixtures/journal/facets/priority-test/facet.json diff --git a/fixtures/journal/facets/test-facet/entities/acme_corp/entity.json b/tests/fixtures/journal/facets/test-facet/entities/acme_corp/entity.json similarity index 100% rename from fixtures/journal/facets/test-facet/entities/acme_corp/entity.json rename to tests/fixtures/journal/facets/test-facet/entities/acme_corp/entity.json diff --git a/fixtures/journal/facets/test-facet/entities/api_optimization/entity.json b/tests/fixtures/journal/facets/test-facet/entities/api_optimization/entity.json similarity index 100% rename from fixtures/journal/facets/test-facet/entities/api_optimization/entity.json rename to tests/fixtures/journal/facets/test-facet/entities/api_optimization/entity.json diff --git a/fixtures/journal/facets/test-facet/entities/bob_wilson/entity.json b/tests/fixtures/journal/facets/test-facet/entities/bob_wilson/entity.json similarity index 100% rename from fixtures/journal/facets/test-facet/entities/bob_wilson/entity.json rename to tests/fixtures/journal/facets/test-facet/entities/bob_wilson/entity.json diff --git a/fixtures/journal/facets/test-facet/entities/dashboard_redesign/entity.json b/tests/fixtures/journal/facets/test-facet/entities/dashboard_redesign/entity.json similarity index 100% rename from fixtures/journal/facets/test-facet/entities/dashboard_redesign/entity.json rename to tests/fixtures/journal/facets/test-facet/entities/dashboard_redesign/entity.json diff --git a/fixtures/journal/facets/test-facet/entities/docker/entity.json b/tests/fixtures/journal/facets/test-facet/entities/docker/entity.json similarity index 100% rename from fixtures/journal/facets/test-facet/entities/docker/entity.json rename to tests/fixtures/journal/facets/test-facet/entities/docker/entity.json diff --git a/fixtures/journal/facets/test-facet/entities/jane_doe/entity.json b/tests/fixtures/journal/facets/test-facet/entities/jane_doe/entity.json similarity index 100% rename from fixtures/journal/facets/test-facet/entities/jane_doe/entity.json rename to tests/fixtures/journal/facets/test-facet/entities/jane_doe/entity.json diff --git a/fixtures/journal/facets/test-facet/entities/john_smith/entity.json b/tests/fixtures/journal/facets/test-facet/entities/john_smith/entity.json similarity index 100% rename from fixtures/journal/facets/test-facet/entities/john_smith/entity.json rename to tests/fixtures/journal/facets/test-facet/entities/john_smith/entity.json diff --git a/fixtures/journal/facets/test-facet/entities/postgresql/entity.json b/tests/fixtures/journal/facets/test-facet/entities/postgresql/entity.json similarity index 100% rename from fixtures/journal/facets/test-facet/entities/postgresql/entity.json rename to tests/fixtures/journal/facets/test-facet/entities/postgresql/entity.json diff --git a/fixtures/journal/facets/test-facet/entities/tech_solutions_inc/entity.json b/tests/fixtures/journal/facets/test-facet/entities/tech_solutions_inc/entity.json similarity index 100% rename from fixtures/journal/facets/test-facet/entities/tech_solutions_inc/entity.json rename to tests/fixtures/journal/facets/test-facet/entities/tech_solutions_inc/entity.json diff --git a/fixtures/journal/facets/test-facet/entities/visual_studio_code/entity.json b/tests/fixtures/journal/facets/test-facet/entities/visual_studio_code/entity.json similarity index 100% rename from fixtures/journal/facets/test-facet/entities/visual_studio_code/entity.json rename to tests/fixtures/journal/facets/test-facet/entities/visual_studio_code/entity.json diff --git a/fixtures/journal/facets/test-facet/facet.json b/tests/fixtures/journal/facets/test-facet/facet.json similarity index 100% rename from fixtures/journal/facets/test-facet/facet.json rename to tests/fixtures/journal/facets/test-facet/facet.json diff --git a/fixtures/journal/facets/work/events/20240101.jsonl b/tests/fixtures/journal/facets/work/events/20240101.jsonl similarity index 100% rename from fixtures/journal/facets/work/events/20240101.jsonl rename to tests/fixtures/journal/facets/work/events/20240101.jsonl diff --git a/fixtures/journal/facets/work/events/20240105.jsonl b/tests/fixtures/journal/facets/work/events/20240105.jsonl similarity index 100% rename from fixtures/journal/facets/work/events/20240105.jsonl rename to tests/fixtures/journal/facets/work/events/20240105.jsonl diff --git a/fixtures/journal/facets/work/news/20240101.md b/tests/fixtures/journal/facets/work/news/20240101.md similarity index 100% rename from fixtures/journal/facets/work/news/20240101.md rename to tests/fixtures/journal/facets/work/news/20240101.md diff --git a/fixtures/journal/summary.md b/tests/fixtures/journal/summary.md similarity index 100% rename from fixtures/journal/summary.md rename to tests/fixtures/journal/summary.md diff --git a/fixtures/journal/tokens/.gitignore b/tests/fixtures/journal/tokens/.gitignore similarity index 100% rename from fixtures/journal/tokens/.gitignore rename to tests/fixtures/journal/tokens/.gitignore diff --git a/fixtures/journal/tokens/20250823.jsonl b/tests/fixtures/journal/tokens/20250823.jsonl similarity index 100% rename from fixtures/journal/tokens/20250823.jsonl rename to tests/fixtures/journal/tokens/20250823.jsonl diff --git a/fixtures/journal/tokens/20250824.jsonl b/tests/fixtures/journal/tokens/20250824.jsonl similarity index 100% rename from fixtures/journal/tokens/20250824.jsonl rename to tests/fixtures/journal/tokens/20250824.jsonl diff --git a/fixtures/journal/tokens/20250825.jsonl b/tests/fixtures/journal/tokens/20250825.jsonl similarity index 100% rename from fixtures/journal/tokens/20250825.jsonl rename to tests/fixtures/journal/tokens/20250825.jsonl diff --git a/fixtures/journal/tokens/20250826.jsonl b/tests/fixtures/journal/tokens/20250826.jsonl similarity index 100% rename from fixtures/journal/tokens/20250826.jsonl rename to tests/fixtures/journal/tokens/20250826.jsonl diff --git a/fixtures/journal/tokens/20250827.jsonl b/tests/fixtures/journal/tokens/20250827.jsonl similarity index 100% rename from fixtures/journal/tokens/20250827.jsonl rename to tests/fixtures/journal/tokens/20250827.jsonl diff --git a/fixtures/journal/tokens/20250828.jsonl b/tests/fixtures/journal/tokens/20250828.jsonl similarity index 100% rename from fixtures/journal/tokens/20250828.jsonl rename to tests/fixtures/journal/tokens/20250828.jsonl diff --git a/fixtures/journal/tokens/20250905.jsonl b/tests/fixtures/journal/tokens/20250905.jsonl similarity index 100% rename from fixtures/journal/tokens/20250905.jsonl rename to tests/fixtures/journal/tokens/20250905.jsonl diff --git a/fixtures/journal/tokens/20250908.jsonl b/tests/fixtures/journal/tokens/20250908.jsonl similarity index 100% rename from fixtures/journal/tokens/20250908.jsonl rename to tests/fixtures/journal/tokens/20250908.jsonl diff --git a/fixtures/journal/tokens/20250909.jsonl b/tests/fixtures/journal/tokens/20250909.jsonl similarity index 100% rename from fixtures/journal/tokens/20250909.jsonl rename to tests/fixtures/journal/tokens/20250909.jsonl diff --git a/fixtures/journal/tokens/20250914.jsonl b/tests/fixtures/journal/tokens/20250914.jsonl similarity index 100% rename from fixtures/journal/tokens/20250914.jsonl rename to tests/fixtures/journal/tokens/20250914.jsonl diff --git a/fixtures/journal/tokens/20250915.jsonl b/tests/fixtures/journal/tokens/20250915.jsonl similarity index 100% rename from fixtures/journal/tokens/20250915.jsonl rename to tests/fixtures/journal/tokens/20250915.jsonl diff --git a/fixtures/journal/tokens/20250916.jsonl b/tests/fixtures/journal/tokens/20250916.jsonl similarity index 100% rename from fixtures/journal/tokens/20250916.jsonl rename to tests/fixtures/journal/tokens/20250916.jsonl diff --git a/fixtures/journal/tokens/20250919.jsonl b/tests/fixtures/journal/tokens/20250919.jsonl similarity index 100% rename from fixtures/journal/tokens/20250919.jsonl rename to tests/fixtures/journal/tokens/20250919.jsonl diff --git a/fixtures/journal/tokens/20250920.jsonl b/tests/fixtures/journal/tokens/20250920.jsonl similarity index 100% rename from fixtures/journal/tokens/20250920.jsonl rename to tests/fixtures/journal/tokens/20250920.jsonl diff --git a/fixtures/journal/tokens/20250926.jsonl b/tests/fixtures/journal/tokens/20250926.jsonl similarity index 100% rename from fixtures/journal/tokens/20250926.jsonl rename to tests/fixtures/journal/tokens/20250926.jsonl diff --git a/fixtures/journal/tokens/20250927.jsonl b/tests/fixtures/journal/tokens/20250927.jsonl similarity index 100% rename from fixtures/journal/tokens/20250927.jsonl rename to tests/fixtures/journal/tokens/20250927.jsonl diff --git a/fixtures/journal/tokens/20251003.jsonl b/tests/fixtures/journal/tokens/20251003.jsonl similarity index 100% rename from fixtures/journal/tokens/20251003.jsonl rename to tests/fixtures/journal/tokens/20251003.jsonl diff --git a/fixtures/journal/tokens/20251004.jsonl b/tests/fixtures/journal/tokens/20251004.jsonl similarity index 100% rename from fixtures/journal/tokens/20251004.jsonl rename to tests/fixtures/journal/tokens/20251004.jsonl diff --git a/fixtures/journal/tokens/20251005.jsonl b/tests/fixtures/journal/tokens/20251005.jsonl similarity index 100% rename from fixtures/journal/tokens/20251005.jsonl rename to tests/fixtures/journal/tokens/20251005.jsonl diff --git a/fixtures/journal/tokens/20251006.jsonl b/tests/fixtures/journal/tokens/20251006.jsonl similarity index 100% rename from fixtures/journal/tokens/20251006.jsonl rename to tests/fixtures/journal/tokens/20251006.jsonl diff --git a/fixtures/journal/tokens/20251011.jsonl b/tests/fixtures/journal/tokens/20251011.jsonl similarity index 100% rename from fixtures/journal/tokens/20251011.jsonl rename to tests/fixtures/journal/tokens/20251011.jsonl diff --git a/fixtures/journal/tokens/20251012.jsonl b/tests/fixtures/journal/tokens/20251012.jsonl similarity index 100% rename from fixtures/journal/tokens/20251012.jsonl rename to tests/fixtures/journal/tokens/20251012.jsonl diff --git a/fixtures/journal/tokens/20251015.jsonl b/tests/fixtures/journal/tokens/20251015.jsonl similarity index 100% rename from fixtures/journal/tokens/20251015.jsonl rename to tests/fixtures/journal/tokens/20251015.jsonl diff --git a/fixtures/journal/tokens/20251024.jsonl b/tests/fixtures/journal/tokens/20251024.jsonl similarity index 100% rename from fixtures/journal/tokens/20251024.jsonl rename to tests/fixtures/journal/tokens/20251024.jsonl diff --git a/fixtures/revai.json b/tests/fixtures/revai.json similarity index 100% rename from fixtures/revai.json rename to tests/fixtures/revai.json diff --git a/tests/integration/test_anthropic_provider.py b/tests/integration/test_anthropic_provider.py index 34b4fd881..cb0755a90 100644 --- a/tests/integration/test_anthropic_provider.py +++ b/tests/integration/test_anthropic_provider.py @@ -16,8 +16,8 @@ from think.models import CLAUDE_SONNET_4 def get_fixtures_env(): - """Load the fixtures/.env file and return the environment.""" - fixtures_env = Path(__file__).parent.parent.parent / "fixtures" / ".env" + """Load the tests/fixtures/.env file and return the environment.""" + fixtures_env = Path(__file__).parent.parent / "fixtures" / ".env" if not fixtures_env.exists(): return None, None, None @@ -38,13 +38,13 @@ def test_anthropic_provider_basic(): fixtures_env, api_key, journal_path = get_fixtures_env() if not fixtures_env: - pytest.skip("fixtures/.env not found") + pytest.skip("tests/fixtures/.env not found") if not api_key: - pytest.skip("ANTHROPIC_API_KEY not found in fixtures/.env file") + pytest.skip("ANTHROPIC_API_KEY not found in tests/fixtures/.env file") if not journal_path: - pytest.skip("JOURNAL_PATH not found in fixtures/.env file") + pytest.skip("JOURNAL_PATH not found in tests/fixtures/.env file") # Prepare environment env = os.environ.copy() @@ -146,13 +146,13 @@ def test_anthropic_provider_with_thinking(): fixtures_env, api_key, journal_path = get_fixtures_env() if not fixtures_env: - pytest.skip("fixtures/.env not found") + pytest.skip("tests/fixtures/.env not found") if not api_key: - pytest.skip("ANTHROPIC_API_KEY not found in fixtures/.env file") + pytest.skip("ANTHROPIC_API_KEY not found in tests/fixtures/.env file") if not journal_path: - pytest.skip("JOURNAL_PATH not found in fixtures/.env file") + pytest.skip("JOURNAL_PATH not found in tests/fixtures/.env file") # Prepare environment env = os.environ.copy() @@ -233,10 +233,10 @@ def test_anthropic_json_truncation_detection(): fixtures_env, api_key, _ = get_fixtures_env() if not fixtures_env: - pytest.skip("fixtures/.env not found") + pytest.skip("tests/fixtures/.env not found") if not api_key: - pytest.skip("ANTHROPIC_API_KEY not found in fixtures/.env file") + pytest.skip("ANTHROPIC_API_KEY not found in tests/fixtures/.env file") # Import provider directly for this test from think.providers import anthropic as anthropic_provider diff --git a/tests/integration/test_google_provider.py b/tests/integration/test_google_provider.py index a9cbbdb7a..2bc4f4b62 100644 --- a/tests/integration/test_google_provider.py +++ b/tests/integration/test_google_provider.py @@ -16,8 +16,8 @@ from think.models import GEMINI_FLASH, GEMINI_PRO def get_fixtures_env(): - """Load the fixtures/.env file and return the environment.""" - fixtures_env = Path(__file__).parent.parent.parent / "fixtures" / ".env" + """Load the tests/fixtures/.env file and return the environment.""" + fixtures_env = Path(__file__).parent.parent / "fixtures" / ".env" if not fixtures_env.exists(): return None, None, None @@ -38,13 +38,13 @@ def test_google_provider_basic(): fixtures_env, api_key, journal_path = get_fixtures_env() if not fixtures_env: - pytest.skip("fixtures/.env not found") + pytest.skip("tests/fixtures/.env not found") if not api_key: - pytest.skip("GOOGLE_API_KEY not found in fixtures/.env file") + pytest.skip("GOOGLE_API_KEY not found in tests/fixtures/.env file") if not journal_path: - pytest.skip("JOURNAL_PATH not found in fixtures/.env file") + pytest.skip("JOURNAL_PATH not found in tests/fixtures/.env file") # Prepare environment env = os.environ.copy() @@ -130,13 +130,13 @@ def test_google_provider_with_thinking(): fixtures_env, api_key, journal_path = get_fixtures_env() if not fixtures_env: - pytest.skip("fixtures/.env not found") + pytest.skip("tests/fixtures/.env not found") if not api_key: - pytest.skip("GOOGLE_API_KEY not found in fixtures/.env file") + pytest.skip("GOOGLE_API_KEY not found in tests/fixtures/.env file") if not journal_path: - pytest.skip("JOURNAL_PATH not found in fixtures/.env file") + pytest.skip("JOURNAL_PATH not found in tests/fixtures/.env file") # Prepare environment env = os.environ.copy() @@ -221,10 +221,10 @@ def test_google_json_truncation_detection(): fixtures_env, api_key, _ = get_fixtures_env() if not fixtures_env: - pytest.skip("fixtures/.env not found") + pytest.skip("tests/fixtures/.env not found") if not api_key: - pytest.skip("GOOGLE_API_KEY not found in fixtures/.env file") + pytest.skip("GOOGLE_API_KEY not found in tests/fixtures/.env file") # Import provider directly for this test from think.providers import google as google_provider diff --git a/tests/integration/test_openai_provider.py b/tests/integration/test_openai_provider.py index 861d71bee..07341e6bd 100644 --- a/tests/integration/test_openai_provider.py +++ b/tests/integration/test_openai_provider.py @@ -16,8 +16,8 @@ from think.models import GPT_5 def get_fixtures_env(): - """Load the fixtures/.env file and return the environment.""" - fixtures_env = Path(__file__).parent.parent.parent / "fixtures" / ".env" + """Load the tests/fixtures/.env file and return the environment.""" + fixtures_env = Path(__file__).parent.parent / "fixtures" / ".env" if not fixtures_env.exists(): return None, None, None @@ -38,13 +38,13 @@ def test_openai_provider_basic(): fixtures_env, api_key, journal_path = get_fixtures_env() if not fixtures_env: - pytest.skip("fixtures/.env not found") + pytest.skip("tests/fixtures/.env not found") if not api_key: - pytest.skip("OPENAI_API_KEY not found in fixtures/.env file") + pytest.skip("OPENAI_API_KEY not found in tests/fixtures/.env file") if not journal_path: - pytest.skip("JOURNAL_PATH not found in fixtures/.env file") + pytest.skip("JOURNAL_PATH not found in tests/fixtures/.env file") # Prepare environment env = os.environ.copy() @@ -138,13 +138,13 @@ def test_openai_provider_with_reasoning(): fixtures_env, api_key, journal_path = get_fixtures_env() if not fixtures_env: - pytest.skip("fixtures/.env not found") + pytest.skip("tests/fixtures/.env not found") if not api_key: - pytest.skip("OPENAI_API_KEY not found in fixtures/.env file") + pytest.skip("OPENAI_API_KEY not found in tests/fixtures/.env file") if not journal_path: - pytest.skip("JOURNAL_PATH not found in fixtures/.env file") + pytest.skip("JOURNAL_PATH not found in tests/fixtures/.env file") # Prepare environment env = os.environ.copy() @@ -223,13 +223,13 @@ def test_openai_provider_with_extra_context(): fixtures_env, api_key, journal_path = get_fixtures_env() if not fixtures_env: - pytest.skip("fixtures/.env not found") + pytest.skip("tests/fixtures/.env not found") if not api_key: - pytest.skip("OPENAI_API_KEY not found in fixtures/.env file") + pytest.skip("OPENAI_API_KEY not found in tests/fixtures/.env file") if not journal_path: - pytest.skip("JOURNAL_PATH not found in fixtures/.env file") + pytest.skip("JOURNAL_PATH not found in tests/fixtures/.env file") # Prepare environment env = os.environ.copy() @@ -301,10 +301,10 @@ def test_openai_json_truncation_detection(): fixtures_env, api_key, _ = get_fixtures_env() if not fixtures_env: - pytest.skip("fixtures/.env not found") + pytest.skip("tests/fixtures/.env not found") if not api_key: - pytest.skip("OPENAI_API_KEY not found in fixtures/.env file") + pytest.skip("OPENAI_API_KEY not found in tests/fixtures/.env file") # Import provider directly for this test from think.providers import openai as openai_provider diff --git a/tests/test_activities.py b/tests/test_activities.py index a6d263643..052298068 100644 --- a/tests/test_activities.py +++ b/tests/test_activities.py @@ -8,7 +8,7 @@ import tempfile from pathlib import Path # Set up test environment before importing the module -os.environ["JOURNAL_PATH"] = "fixtures/journal" +os.environ["JOURNAL_PATH"] = "tests/fixtures/journal" def test_get_default_activities(): diff --git a/tests/test_activity_state.py b/tests/test_activity_state.py index 4a1b8a292..b93ba9393 100644 --- a/tests/test_activity_state.py +++ b/tests/test_activity_state.py @@ -9,7 +9,7 @@ import tempfile from pathlib import Path # Set up test environment before importing the module -os.environ["JOURNAL_PATH"] = "fixtures/journal" +os.environ["JOURNAL_PATH"] = "tests/fixtures/journal" class TestExtractFacetFromOutputPath: diff --git a/tests/test_app_agents.py b/tests/test_app_agents.py index 319e7001a..e1890ac8c 100644 --- a/tests/test_app_agents.py +++ b/tests/test_app_agents.py @@ -13,8 +13,8 @@ from think.muse import _resolve_agent_path, get_agent, get_muse_configs @pytest.fixture def fixture_journal(): - """Set JOURNAL_PATH to fixtures/journal for testing.""" - os.environ["JOURNAL_PATH"] = "fixtures/journal" + """Set JOURNAL_PATH to tests/fixtures/journal for testing.""" + os.environ["JOURNAL_PATH"] = "tests/fixtures/journal" yield diff --git a/tests/test_call.py b/tests/test_call.py index 0c6009538..a072aa6dc 100644 --- a/tests/test_call.py +++ b/tests/test_call.py @@ -129,7 +129,9 @@ class TestJournal: # Copy fixtures to tmp so we can write journal = tmp_path / "journal" - shutil.copytree("fixtures/journal/facets/work", journal / "facets" / "work") + shutil.copytree( + "tests/fixtures/journal/facets/work", journal / "facets" / "work" + ) monkeypatch.setenv("JOURNAL_PATH", str(journal)) # Clear cached journal path import think.utils diff --git a/tests/test_cli_provider.py b/tests/test_cli_provider.py index 9a41b7dd1..136c4763a 100644 --- a/tests/test_cli_provider.py +++ b/tests/test_cli_provider.py @@ -4,7 +4,6 @@ """Tests for think.providers.cli — CLI subprocess runner infrastructure.""" import asyncio -import json from unittest.mock import AsyncMock, patch import pytest diff --git a/tests/test_cluster_full.py b/tests/test_cluster_full.py index 17bea3002..cde9a057d 100644 --- a/tests/test_cluster_full.py +++ b/tests/test_cluster_full.py @@ -8,7 +8,7 @@ from pathlib import Path from think.utils import day_path -FIXTURES = Path("fixtures") +FIXTURES = Path("tests/fixtures") def copy_day(tmp_path: Path) -> Path: diff --git a/tests/test_config.py b/tests/test_config.py index 2e974f1ac..dbcd05b15 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -158,9 +158,9 @@ def test_get_config_handles_invalid_json(tmp_path, monkeypatch): def test_get_config_with_fixtures(): - """Test get_config with fixtures/journal path.""" + """Test get_config with tests/fixtures/journal path.""" # Set JOURNAL_PATH to fixtures - os.environ["JOURNAL_PATH"] = "fixtures/journal" + os.environ["JOURNAL_PATH"] = "tests/fixtures/journal" config = get_config() diff --git a/tests/test_config_cli.py b/tests/test_config_cli.py index 9f27c34e4..655dd5918 100644 --- a/tests/test_config_cli.py +++ b/tests/test_config_cli.py @@ -10,7 +10,7 @@ from think.config_cli import main def test_config_prints_json(monkeypatch, capsys): """Default command prints full config JSON.""" - monkeypatch.setenv("JOURNAL_PATH", "fixtures/journal") + monkeypatch.setenv("JOURNAL_PATH", "tests/fixtures/journal") monkeypatch.setattr("sys.argv", ["sol config"]) main() @@ -22,18 +22,18 @@ def test_config_prints_json(monkeypatch, capsys): def test_config_env_prints_path(monkeypatch, capsys): """env subcommand prints resolved JOURNAL_PATH.""" - monkeypatch.setenv("JOURNAL_PATH", "fixtures/journal") + monkeypatch.setenv("JOURNAL_PATH", "tests/fixtures/journal") monkeypatch.setattr("sys.argv", ["sol config", "env"]) main() output = capsys.readouterr().out.strip() - assert output == "JOURNAL_PATH=fixtures/journal (from shell)" + assert output == "JOURNAL_PATH=tests/fixtures/journal (from shell)" def test_config_env_shows_source(monkeypatch, capsys): """env subcommand includes source for the resolved path.""" - monkeypatch.setenv("JOURNAL_PATH", "fixtures/journal") + monkeypatch.setenv("JOURNAL_PATH", "tests/fixtures/journal") monkeypatch.setattr("sys.argv", ["sol config", "env"]) main() diff --git a/tests/test_dream_full.py b/tests/test_dream_full.py index 2b324841f..7cd24e81a 100644 --- a/tests/test_dream_full.py +++ b/tests/test_dream_full.py @@ -7,7 +7,7 @@ import importlib import shutil from pathlib import Path -FIXTURES = Path("fixtures") +FIXTURES = Path("tests/fixtures") def copy_journal(tmp_path: Path) -> Path: diff --git a/tests/test_entities.py b/tests/test_entities.py index fdff4b4dc..711e9069e 100644 --- a/tests/test_entities.py +++ b/tests/test_entities.py @@ -41,8 +41,8 @@ from think.entities import ( @pytest.fixture def fixture_journal(): - """Set JOURNAL_PATH to fixtures/journal for testing.""" - os.environ["JOURNAL_PATH"] = "fixtures/journal" + """Set JOURNAL_PATH to tests/fixtures/journal for testing.""" + os.environ["JOURNAL_PATH"] = "tests/fixtures/journal" yield # No cleanup needed - just testing reads @@ -143,7 +143,7 @@ def test_detected_entities_path(fixture_journal): """Test path generation for detected entities.""" path = detected_entities_path("personal", "20250101") assert str(path).endswith( - "fixtures/journal/facets/personal/entities/20250101.jsonl" + "tests/fixtures/journal/facets/personal/entities/20250101.jsonl" ) assert path.name == "20250101.jsonl" diff --git a/tests/test_entity_agents.py b/tests/test_entity_agents.py index 52ecb8691..2e5c56a11 100644 --- a/tests/test_entity_agents.py +++ b/tests/test_entity_agents.py @@ -12,8 +12,8 @@ from think.muse import get_agent @pytest.fixture def fixture_journal(): - """Set JOURNAL_PATH to fixtures/journal for testing.""" - os.environ["JOURNAL_PATH"] = "fixtures/journal" + """Set JOURNAL_PATH to tests/fixtures/journal for testing.""" + os.environ["JOURNAL_PATH"] = "tests/fixtures/journal" yield # No cleanup needed - just testing reads @@ -94,7 +94,7 @@ def test_agent_context_includes_entities_by_facet(fixture_journal): assert "`test-facet`" in extra_context or "`full-featured`" in extra_context # Should include entities from fixture facets - # fixtures/journal/facets/ contains various entities + # tests/fixtures/journal/facets/ contains various entities assert "Entities" in extra_context # Check for some known entities from the fixtures diff --git a/tests/test_facets.py b/tests/test_facets.py index ac9a80db8..e47954b5c 100644 --- a/tests/test_facets.py +++ b/tests/test_facets.py @@ -18,8 +18,8 @@ from think.facets import ( get_facets, ) -# Use the permanent fixtures in fixtures/journal/facets/ -FIXTURES_PATH = Path(__file__).parent.parent / "fixtures" / "journal" +# Use the permanent fixtures in tests/fixtures/journal/facets/ +FIXTURES_PATH = Path(__file__).parent / "fixtures" / "journal" def setup_entities_new_structure( diff --git a/tests/test_formatters.py b/tests/test_formatters.py index dc34024cf..a0bdad013 100644 --- a/tests/test_formatters.py +++ b/tests/test_formatters.py @@ -10,7 +10,7 @@ from pathlib import Path import pytest # Set JOURNAL_PATH to fixtures for tests -os.environ["JOURNAL_PATH"] = str(Path(__file__).parent.parent / "fixtures" / "journal") +os.environ["JOURNAL_PATH"] = str(Path(__file__).parent / "fixtures" / "journal") class TestRegistry: diff --git a/tests/test_generate_full.py b/tests/test_generate_full.py index ee439789d..2d7c2c7ce 100644 --- a/tests/test_generate_full.py +++ b/tests/test_generate_full.py @@ -18,7 +18,7 @@ from pathlib import Path from think.utils import day_path -FIXTURES = Path("fixtures") +FIXTURES = Path("tests/fixtures") def copy_day(tmp_path: Path) -> Path: diff --git a/tests/test_generate_scan_day.py b/tests/test_generate_scan_day.py index 6943df535..b8e3e7e14 100644 --- a/tests/test_generate_scan_day.py +++ b/tests/test_generate_scan_day.py @@ -8,7 +8,7 @@ from pathlib import Path from think.utils import day_path -FIXTURES = Path("fixtures") +FIXTURES = Path("tests/fixtures") def copy_day(tmp_path: Path) -> Path: diff --git a/tests/test_journal_index.py b/tests/test_journal_index.py index 6ae883011..b2a77bc4b 100644 --- a/tests/test_journal_index.py +++ b/tests/test_journal_index.py @@ -418,7 +418,7 @@ def test_search_journal_returns_counts(): from think.tools.search import search_journal # Use fixtures journal - os.environ["JOURNAL_PATH"] = "fixtures/journal" + os.environ["JOURNAL_PATH"] = "tests/fixtures/journal" result = search_journal("test") @@ -439,7 +439,7 @@ def test_search_journal_returns_query_echo(): """Test search tool returns query echo.""" from think.tools.search import search_journal - os.environ["JOURNAL_PATH"] = "fixtures/journal" + os.environ["JOURNAL_PATH"] = "tests/fixtures/journal" result = search_journal("test query", facet="work", topic="audio") @@ -453,7 +453,7 @@ def test_search_journal_results_include_path(): """Test search tool results include path and idx.""" from think.tools.search import search_journal - os.environ["JOURNAL_PATH"] = "fixtures/journal" + os.environ["JOURNAL_PATH"] = "tests/fixtures/journal" result = search_journal("") diff --git a/tests/test_models.py b/tests/test_models.py index 61d5a56f6..247b0c754 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -126,7 +126,7 @@ def test_calc_token_cost_with_reasoning_tokens(): @pytest.fixture def use_fixtures_journal(monkeypatch): """Use the fixtures journal for provider config tests.""" - monkeypatch.setenv("JOURNAL_PATH", "fixtures/journal") + monkeypatch.setenv("JOURNAL_PATH", "tests/fixtures/journal") def test_resolve_provider_default(use_fixtures_journal): diff --git a/tests/test_output_hooks.py b/tests/test_output_hooks.py index 7d932b43f..26436e153 100644 --- a/tests/test_output_hooks.py +++ b/tests/test_output_hooks.py @@ -19,7 +19,7 @@ from pathlib import Path from think.muse import load_post_hook, load_pre_hook from think.utils import day_path -FIXTURES = Path("fixtures") +FIXTURES = Path("tests/fixtures") def copy_day(tmp_path: Path) -> Path: diff --git a/tests/test_transcribe_revai.py b/tests/test_transcribe_revai.py index 2ad94da21..8681ed846 100644 --- a/tests/test_transcribe_revai.py +++ b/tests/test_transcribe_revai.py @@ -249,10 +249,10 @@ class TestConvertToStatements: assert statements[0]["text"] == "Real" def test_fixture_data(self): - """Test with actual fixture data from fixtures/revai.json.""" + """Test with actual fixture data from tests/fixtures/revai.json.""" from pathlib import Path - fixture_path = Path(__file__).parent.parent / "fixtures" / "revai.json" + fixture_path = Path(__file__).parent / "fixtures" / "revai.json" if not fixture_path.exists(): pytest.skip("Fixture file not found") diff --git a/think/providers/openai.py b/think/providers/openai.py index 5f4c1f35d..eb3b947ec 100644 --- a/think/providers/openai.py +++ b/think/providers/openai.py @@ -37,13 +37,12 @@ import traceback from typing import Any, Callable from think.models import GPT_5 -from think.utils import now_ms - from think.providers.cli import ( CLIRunner, ThinkingAggregator, assemble_prompt, ) +from think.utils import now_ms from .shared import ( GenerateResult,