Skip to content

Refactor transcript tooling into modular quality API#1

Open
scottjoyner wants to merge 1 commit into
mainfrom
codex/refactor-high-priority-quality-scripts
Open

Refactor transcript tooling into modular quality API#1
scottjoyner wants to merge 1 commit into
mainfrom
codex/refactor-high-priority-quality-scripts

Conversation

@scottjoyner

Copy link
Copy Markdown
Owner

Summary

  • introduce a structured quality_api package with configuration, database, embedding, and service layers powering a refreshed transcript search experience
  • replace the inline Flask app in compare_transcripts.py with an application factory that renders a modern UI, exposes JSON endpoints, and surfaces speaker/location context and transcript drilldowns
  • refactor quality validation logic into reusable services, add Docker and docker-compose definitions, and document gunicorn dependency for containerized deployment

Testing

  • python -m compileall quality_api compare_transcripts.py quality_report.py

https://chatgpt.com/codex/tasks/task_e_68d69ab947308325a0fe4763f8e4149f

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +286 to +293
def get_transcript(self, transcription_id: str) -> Optional[TranscriptDetail]:
if not transcription_id:
return None
with get_session() as session:
record = session.run(
self._TRANSCRIPT_DETAIL_CYPHER, transcription_id=transcription_id
).single()
if not record:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Handle missing transcripts without raising driver error

The new get_transcript method calls session.run(...).single() and then checks if not record. single() raises neo4j.exceptions.ResultNotSingleError when the query returns zero rows, so a request to /transcripts/<id> with an invalid ID will crash the endpoint instead of returning a 404. Catch the exception or use single(strict=False) so the method can return None and the view can issue the expected 404 response.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant