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

New Boutiques module to validate strings used as filenames #1447

Closed
prioux opened this issue Nov 20, 2024 · 1 comment · Fixed by #1451
Closed

New Boutiques module to validate strings used as filenames #1447

prioux opened this issue Nov 20, 2024 · 1 comment · Fixed by #1451
Assignees
Labels

Comments

@prioux
Copy link
Member

prioux commented Nov 20, 2024

Many tools integrated with boutiques descriptors have inputs of type 'String' that are used to provide a output path or basename for whatever files the tool is going to create. These are also used as part of the templates in the 'output' sections to tell CBRAIN what is to be saved int he database.

For exmaple, in the "inputs" section:

        {
            "description": "The name of the folder to store outputs of XCPD processing.",
            "id": "output_dir",
            "name": "output_dir",
            "optional": false,
            "type": "String",
            "value-key": "[OUTPUT_DIR]",
            "default-value": "xcpd_output"
        }

and in the "output-files" section:

        {   
            "name": "XCPD Subject Output Directory",
            "id":  "xcpd_output_dir",
            "description": "Subject level output for XCP-D",
            "optional":  false,
            "path-template": "[OUTPUT_DIR]"
        }

The prevent problems, right from the start before launching a task, we should validate them a little bit and make sure they respect the rules that CBRAIN impose for userfiles. A new custom modules need to be implemented which would be provided with the IDs of "String" inputs to check against the CBRAIN userfile naming rules, e.g.

        "cbrain:integrator_modules": {
            "BoutiquesOutputNameValidator": [ "output_dir", "other_id", "other_id_2" ]
        }
@prioux
Copy link
Member Author

prioux commented Nov 20, 2024

The Ruby method to validate names is

   ok = Userfile.is_legal_filename?(name_to_check)

MontrealSergiy added a commit to MontrealSergiy/cbrain that referenced this issue Nov 26, 2024
MontrealSergiy added a commit to MontrealSergiy/cbrain that referenced this issue Nov 27, 2024
… called File Name Verifier in same vein with file name matcher aces#1447
MontrealSergiy added a commit to MontrealSergiy/cbrain that referenced this issue Nov 27, 2024
@MontrealSergiy MontrealSergiy linked a pull request Nov 27, 2024 that will close this issue
@MontrealSergiy MontrealSergiy removed a link to a pull request Dec 2, 2024
MontrealSergiy added a commit to MontrealSergiy/cbrain that referenced this issue Dec 5, 2024
MontrealSergiy added a commit to MontrealSergiy/cbrain that referenced this issue Dec 6, 2024
@MontrealSergiy MontrealSergiy linked a pull request Dec 16, 2024 that will close this issue
MontrealSergiy added a commit to MontrealSergiy/cbrain that referenced this issue Jan 16, 2025
prioux pushed a commit that referenced this issue Jan 16, 2025
Boutiques output file name verification #1447
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants