Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a KINDNAME_TO_MODULE map #1355

Open
sveneberth opened this issue Dec 18, 2024 · 0 comments
Open

Provide a KINDNAME_TO_MODULE map #1355

sveneberth opened this issue Dec 18, 2024 · 0 comments
Labels
feature New feature or request Priority: Medium This issue may be useful, and needs some attention.

Comments

@sveneberth
Copy link
Member

or reference the module in the skeleton.


But the source of this use case is that PascalCase module are not mapped to snake_case but only lowercase. Which cause a missmatch if a snake_case kindname is used.

FluidpagePage --> get modulname: fluidpagepage but should better be fluidpage_page

Here a snippet for this from chähtgipiti:

import re

def pascal_to_snake(text):
    # Insert underscores between lowercase and uppercase letters and convert to lowercase
    snake_case = re.sub(r'(?<!^)(?=[A-Z])', '_', text).lower()
    return snake_case

# Example usage
pascal_case_string = "PascalCaseString"
snake_case_string = pascal_to_snake(pascal_case_string)

print(snake_case_string)  # Outputs: pascal_case_string
@sveneberth sveneberth added feature New feature or request Priority: Medium This issue may be useful, and needs some attention. labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Priority: Medium This issue may be useful, and needs some attention.
Projects
None yet
Development

No branches or pull requests

1 participant