Remove file extensions from script names in scripts_list API endpoint#12
Merged
andchir merged 3 commits intoandchir:mainfrom Dec 24, 2025
Merged
Remove file extensions from script names in scripts_list API endpoint#12andchir merged 3 commits intoandchir:mainfrom
andchir merged 3 commits intoandchir:mainfrom
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: andchir#11
- Modified api/app.py to use os.path.splitext() to remove file extensions from script names - Updated test_flask_api.py to verify script names are returned without extensions - Added new test case to ensure no extensions are present in script names - All tests passing Fixes andchir#11 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit 8602051.
Contributor
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
konard
added a commit
to konard/andchir-install_scripts
that referenced
this pull request
Dec 25, 2025
- SSL сертификаты: проверка существования перед созданием (требование andchir#12) - .env файлы: сохранение существующей конфигурации при повторном запуске - Django createsuperuser: проверка существования пользователя admin Изменения соответствуют требованиям из requirements_for_scripts_ru.md: - Скрипты теперь полностью поддерживают идемпотентность - При повторном запуске не перезаписываются важные данные 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request implements the requested feature from issue #11 to return script names without file extensions in the
scripts_listAPI endpoint.Changes Made
scripts_list()function to useos.path.splitext()to remove file extensions from script names before adding them to the responsetest_scripts_list_names_without_extension) to verify no extensions are presentImplementation Details
The fix is implemented in
api/app.pyat line 38-40:Testing
All tests pass successfully:
test_health_endpoint- Health check works correctlytest_index_endpoint- Root endpoint returns API infotest_scripts_list_endpoint- Scripts list endpoint returns correct structuretest_scripts_list_contains_expected_scripts- Expected scripts are present (without extensions)test_scripts_list_names_without_extension- Verifies no extensions in script namesExample Output
Before:
"name": "install-scripts-api-flask.sh"After:
"name": "install-scripts-api-flask"Fixes
Fixes #11
🤖 Generated with Claude Code