Skip to content

Fix configuration lookup and CLI tests#17

Closed
jgwill wants to merge 8 commits intomainfrom
codex/generate-validation-reports-for-commands-helps-2025-06-15-14-21-54
Closed

Fix configuration lookup and CLI tests#17
jgwill wants to merge 8 commits intomainfrom
codex/generate-validation-reports-for-commands-helps-2025-06-15-14-21-54

Conversation

@jgwill
Copy link
Copy Markdown
Owner

@jgwill jgwill commented Jun 15, 2025

Summary

  • repair syntax error and debug prints in coaiamodule
  • improve find_existing_config logic
  • add validation report for CLI help checks
  • document commit history in narrative map
  • add ledger entry for trace

Testing

  • pytest -q

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

@jgwill
Copy link
Copy Markdown
Owner Author

jgwill commented Jun 15, 2025

CoAiAPy Update

This update summarizes the current capabilities of the project and how to install the latest TestPyPI release.

Current Features

  • Audio transcription using OpenAI's API.
  • Summarization and process commands using configurable instructions.
  • Redis integration for stashing and fetching data.
  • Langfuse integration via the fuse command.
  • Helper script scripts/install_test_release.sh to create or activate a conda environment named testcoaiapy and install the package from TestPyPI.
  • make test-release cleans, builds, and uploads the package to TestPyPI after bumping the version.

Validation

  • Verified CLI help outputs match documentation (with an additional fetch command not listed in the helps snippet).
  • Unit tests for fetch command pass.
  • make test-release requires valid TestPyPI credentials and will install build tools automatically.

Installation from TestPyPI

Run the helper script to create or activate the conda environment and install:

scripts/install_test_release.sh

Alternatively, you can install directly using pip:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple coaiapy

@jgwill
Copy link
Copy Markdown
Owner Author

jgwill commented Jun 15, 2025

CoAiAPy

CoAiAPy is a Python package that provides functionality for audio transcription, synthesis, and tagging of MP3 files using Boto3 and the Mutagen library. This package is designed to facilitate the processing of audio files for various applications.

Features

  • Audio Transcription: Convert audio files to text using AWS services.
  • Audio Synthesis: Generate audio files from text input.
  • MP3 Tagging: Add metadata tags to MP3 files for better organization and identification.
  • Redis Stashing: Stash key-value pairs to a Redis service.

Installation

To install the package, you can use pip:

pip install coaiapy

Usage

CLI Tool

CoAiAPy provides a CLI tool for audio transcription, summarization, and stashing to Redis.

Help

To see the available commands and options, use the --help flag:

coaia --help

Setup

Set these environment variables to use the AWS transcription service:

OPENAI_API_KEY
AWS_KEY_ID
AWS_SECRET_KEY
AWS_REGION
REDIS_HOST
REDIS_PORT
REDIS_PASSWORD
REDIS_SSL

Transcribe Audio

To transcribe an audio file to text:

coaia transcribe <file_path>

Example:

coaia transcribe path/to/audio/file.mp3

Summarize Text

To summarize a text:

coaia summarize <text>

Example:

coaia summarize "This is a long text that needs to be summarized."

To summarize text from a file:

coaia summarize --f <file_path>

Example:

coaia summarize --f path/to/text/file.txt

Stash Key-Value Pair to Redis

To stash a key-value pair to Redis:

coaia tash <key> <value>

Example:

coaia tash my_key "This is the value to stash."

To stash a key-value pair from a file:

coaia tash <key> --f <file_path>

Example:

coaia tash my_key --f path/to/value/file.txt

Fetch Value from Redis

To fetch a value from Redis by key:

coaia fetch <key>

Example:

coaia fetch my_key

To fetch a value from Redis and save it to a file:

coaia fetch <key> --output <file_path>

Example:

coaia fetch my_key --output path/to/output/file.txt

Process Custom Tags

Enable custom quick addons for assistants or bots using process tags. To add a new process tag to coaia.json, include entries like:

	"dictkore_temperature":0.2,
	"dictkore_instruction": "You do : Receive a dictated text that requires correction and clarification.\n\n# Corrections\n\n- In the dictated text, spoken corrections are made. You make them and remove the text related to that to keep the essence of what is discussed.\n\n# Output\n\n- You keep all the essence of the text (same length).\n- You keep the same style.\n- You ensure annotated dictation errors in the text are fixed.",
coaia p dictkore "my text to correct"

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

Test Release

To publish a distribution to TestPyPI, run:

make test-release

This command cleans build artifacts, installs build tools, runs tests,
builds the package and uploads it to TestPyPI using Twine. Internally it
runs:

twine upload --repository testpypi dist/*

Ensure
TWINE_USERNAME and TWINE_PASSWORD are set with your TestPyPI
credentials.
Before running, bump the version using python bump.py <new_version> so the
upload is accepted.

Install from TestPyPI

You can install the latest test release into a conda environment using
scripts/install_test_release.sh. The script creates an environment
named testcoaiapy if it does not exist, activates it and installs the
package from TestPyPI:

scripts/install_test_release.sh

License

This project is licensed under the MIT License. See the LICENSE file for more details.

@jgwill jgwill self-assigned this Jun 15, 2025
@jgwill
Copy link
Copy Markdown
Owner Author

jgwill commented Aug 5, 2025

probably crap by codex....

@jgwill jgwill closed this Aug 5, 2025
@jgwill jgwill deleted the codex/generate-validation-reports-for-commands-helps-2025-06-15-14-21-54 branch December 4, 2025 22:55
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