ynput / ayon-kitsu

Official AYON<->Kitsu intetgration (WIP)
Apache License 2.0
7 stars 4 forks source link

Enhancement/kitsu to ayon name conversions #55

Closed scottmcdonnell closed 1 month ago

scottmcdonnell commented 1 month ago

Allows Kitsu names to be converted to a valid Ayon name.

for tests:

cd tests
poetry run pytest tests/test_addon_helpers.py 
scottmcdonnell commented 1 month ago

I looked at slugify but it seems to be more restrictive than the AYON validation which allows capitals, hyphens and dots.

slugify(name, separator="_", lower=False) produces Test_Project_123 for the following test:

assert (
        to_entity_name("Test-Project.123 ") == "Test-Project.123"
    ), "hyphens and dots ARE allowed"

I need to use capitalised project codes and short names for our naming convention so I would suggest the addon does not convert to lower and be overly restrictive unless it has to be.