fix: improve app name derivation to support numbers and acronyms#921
Open
nakrenat wants to merge 1 commit intofal-ai:mainfrom
Open
fix: improve app name derivation to support numbers and acronyms#921nakrenat wants to merge 1 commit intofal-ai:mainfrom
nakrenat wants to merge 1 commit intofal-ai:mainfrom
Conversation
Author
|
It seems like the Claude Code Review action is failing due to missing id-token: write permissions. This shouldn't affect the core changes in my PR. |
Author
|
Hi! It seems like the integration tests are failing with 401 Unauthorized because repository secrets are not shared with this PR from my fork. I've verified the regex fix locally with several test cases (Sora2Video, ONNXModel, My3DApp) and they all produce the correct output now. Could a maintainer trigger the tests or review the logic? |
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
The current
PART_FINDER_REregex inapp.pyhas a limitation: it fails to capture numbers and handles acronyms inconsistently. This PR updates the regex to correctly derive kebab-case app names from PascalCase/CamelCase strings that contain digits or consecutive uppercase letters.🛠 Changes
PART_FINDER_REto:r"[A-Z][a-z]+|[A-Z]+(?=[A-Z][a-z]|$)|[a-z]+|\d+"✅ Test Cases (Verified locally)
I've verified the fix with the following cases:
Sora2Video->sora-2-video(Previously:sora-video)ONNXModel->onnx-model(Previously:o-n-n-x-model)My3DApp->my-3-d-app(Previously:my-app)This improvement ensures a better Developer Experience (DX) when naming fal.ai apps.