feat: 파이썬 분석 엔진에 CSV 형식의 큐시트 추출 기능 추가#689
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Pull request overview
Adds a CSV cue-sheet export path to the Python analysis engine (services/analysis-engine) so a RehearsalSong-shaped payload can be serialized into a structured CSV text output suitable for downstream use (e.g., cue sheets), with explicit formula-injection mitigation and test coverage.
Changes:
- Introduces
build_csv_text()in a newbandscope_analysis.exports.csv_exportmodule to emit an in-memory CSV string from cue-sheet rows, including CSV formula-injection escaping. - Exposes the new export via
bandscope_analysis.exportspackage exports. - Adds a dedicated test suite covering success cases, malformed input behavior, and injection mitigation; updates
CHANGELOG.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| services/analysis-engine/src/bandscope_analysis/exports/csv_export.py | New CSV export builder with formula-injection escaping and safe handling of malformed/empty input. |
| services/analysis-engine/src/bandscope_analysis/exports/init.py | Re-exports build_csv_text via the exports package surface. |
| services/analysis-engine/tests/test_csv_export.py | Adds tests for CSV output shape, edge cases, and injection mitigation behavior. |
| CHANGELOG.md | Documents the new CSV cue-sheet export feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [ | ||
| _escape_csv_field(row.get("section", "")), | ||
| _escape_csv_field(row.get("start", "")), | ||
| _escape_csv_field(row.get("end", "")), | ||
| _escape_csv_field(row.get("cue", "")), | ||
| _escape_csv_field(", ".join(row.get("roles", []))), | ||
| ] |
파이썬 분석 엔진(
services/analysis-engine) 내에 곡 페이로드를 입력받아 구조화된 CSV 텍스트로 변환하는 기능을 추가했습니다.변경 내용
bandscope_analysis/exports/csv_export.py모듈 신규 추가build_csv_text함수를 통해RehearsalSong을 인메모리 버퍼 기반의 CSV 문자열로 안전하게 직렬화.=,+,-,@) 필터링 이스케이프 로직 적용.bandscope_analysis/exports/__init__.py의__all__에 새 모듈 추가services/analysis-engine/tests/test_csv_export.py를 통한 100% 테스트 커버리지 달성CHANGELOG.md에 업데이트 내용 기록모든 검증 스크립트(
quickcheck.sh)와 pre-commit 단계를 완료하였으며, 코드 리뷰 및 메모리 기록 또한 반영되었습니다.PR created automatically by Jules for task 11423156772664678875 started by @seonghobae