-
Notifications
You must be signed in to change notification settings - Fork 7
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
Enforce no spaces in file names #139
Comments
Please work with @brynnz22 on this. Do we enforce no spaces? no white space characters at all? no special characters? |
the regex string |
From the docs this can be implemented as adding |
@brynnz22 do you think you try and open a PR to modify the data model to add the validation rule above. Happy to do so in a working session if preferable. We can try and deploy this branch to a testing instance and see the rule works appropriately. |
Note to Brynn: Make a new branch titled based on this, then open a PR against main. Once PR done, work with Adam to run action: Should be able to run gh action on that branch to deploy to testing1 |
I've deployed this to the To do this I:
Of course this will all change for the upcoming multi-tennant DCA |
I'm getting a DCA disconnect when I try and generate a template in the testing instance. Will look at logs and see if I can see what the issue is. |
Nothing in the logs to suggest the cause 😪 |
@adamjtaylor Is it the weird quotes and things that were inserted in the csv that could be causing this? |
@brynnz22 Yeah I think it might be the quoted validation rule |
Hey @brynnz22 I've been trying to test this validation rule locally with a small test template based from
This should fail validation due to the space.... but schematic seems to trip up with error
I think this actually related to something going on in the JSON-LD of the schema as it contains the following
Note the lowercase If I manually edit the JSON-LD to have title case
This seems related to this error reported on Slack: https://sagebionetworks.slack.com/archives/C01ANC02U59/p1671129949628629?thread_ts=1671068131.722179&cid=C01ANC02U59 I also wonder if we can't actually validate Filename as it is a Reserve-use special attribute per the Data Model Schema docs. Does this make sense? |
FYI @milen. We would like to add a regex validation rule to prevent spaces in filenames. But we seem to get a key error when adding a regex validation rule to this attribute. See above. In further testing I can add other validation rules (eg |
Interestingly the schematic example.model.jsonld has titlecase |
Yes this makes sense! I saw that Gianna is looking into it on Slack. |
From slack
|
Just a note: |
Update ahead of the sprint review:
|
@adamjtaylor it's in the queue for next sprint triage: see here |
@adamjtaylor FAIR Data team moved our issue tracking system to JIRA as of this week. Diagnosis of schematic issue is now tracked here. |
Per Gianna's diagnosis, FAIR's recommendation is that "HTAN should move the Filename specification from the properties column of each attribute to the DependsOn column to resolve" |
Thank you @MiekoHash ✨ |
Confirmed in staging that this catches spaces in Filename. Unfortunately, it also catches Proposing that we remove the validation from |
1 similar comment
Confirmed in staging that this catches spaces in Filename. Unfortunately, it also catches Proposing that we remove the validation from |
This has caused a number of downstream issues in the past and we should enforce with a regex validation rule
The text was updated successfully, but these errors were encountered: