Project name regex disallows "-" characters

Hello, I’m evaluating AYON to replace our current pipeline. In order to make this switch successful, I must maintain the studio’s naming conventionsI have an absolute requirement using the studio’s existing naming conventions. In most cases this has been okay, but I’m finding the project name regex to be insufficient.

We use dashes to separate portions of our project name including a year and numeric code. For example: YY-XXX-ProjectName. Unfortunately, the project name regex seems to be hard-coded in ayon-frontend.

I have a couple of questions in this regard.

  1. If we self-host I believe I can patch this regex in the frontend code, but I’m curious if there could be any issues with the database. I’m assuming the Project’s name field is used as a primary key?
  2. If we decide to use your paid cloud-hosting, is it still possible to make this change, or would that require dedicated support on Ynput’s end?

About naming conventions:

  1. Project code regex is defined in Studio Settings > Global tab
  2. Entity naming (like folders and tasks) is following the setting in project anatomy.

    Name is different from label

Thanks @mustafa_jafar. I did see these settings, but the Project name is what I’m trying to match.

I feel like the way the code attribute is used in AYON doesn’t quite match our use case. If I understand it correctly in AYON code means shorthand or abbreviation, which is why it’s used in the default anatomy as a prefix for file names. For us, our Project code is a numerical identifier and we wouldn’t want it included in all of our filenames.

In short, the only thing I really need is the ability to add dashes to the Project name attribute. So, I’m wondering if I’m correct in thinking I need to fork the ayon-frontend and change the hardcoded regex, and if I do that, do you foresee any negative consequences or limitations?

I believe this can be discussed on our feedback portal.

While I don’t have answers about recommended way to update the project name regex
I’d say project name is referenced in pipeline when creating project files.
so, this regex needs to be compatible with the allowed characters on your OS.

Currently this is the backend regex :

PROJECT_NAME_REGEX = r"^[a-zA-Z0-9_]*$"

It would indeed be nice to be able to customize it.

For us, it’s useful to forbid the dash, but we would also want to ensure that 1st character is a letter (and not a number or a special character)
.

Also this comment in the code seems to really forbid the dash :

project name cannot contain - / . (sql hard limit for schema names)

I think the backend code there explains why dashes are not allowed, because it’s used directly for schema names in SQL. @martin.wacker can likely explain better, but pretty sure that’s not one you’d want to lift without that being solved.

Requiring a start with a character, I can see reason for that - but not sure if making this ‘customizable’ out of the box really is what we can support currently.

I do remember there being some debate at some point to be able to set a project label, with essentially no restrictions (or customizable restrictions) which then wouldn’t be used in the same direct manner. As far as I know that never made it through due to limited need for it.