-
Notifications
You must be signed in to change notification settings - Fork 28
Ignore Azure paths when validating directories #179
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
base: 2.6.0dev
Are you sure you want to change the base?
Changes from 4 commits
f4254fb
cdcd5d7
5ad94ef
eb365a7
c844ee0
bf5f548
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,12 +41,22 @@ class SchemaEvaluator implements Evaluator { | |
| } | ||
|
|
||
| def String value = node.asString() | ||
|
|
||
| // Check if this is an Azure storage path early | ||
| def boolean isAzurePath = value.startsWith('az://') | ||
|
|
||
| // Actual validation logic | ||
| def Path file = Nextflow.file(value) | ||
| // Don't validate if the file does not exist or is a directory | ||
| if(!file.exists() || file.isDirectory()) { | ||
| log.debug("Could not validate the file ${file.toString()}") | ||
|
|
||
| // Don't validate if the file does not exist | ||
| if(!file.exists()) { | ||
| log.debug("Could not validate the file ${file.toString()} - file does not exist") | ||
| return Evaluator.Result.success() | ||
| } | ||
|
|
||
| // For non-Azure paths, skip validation if it's a directory | ||
| if(!isAzurePath && file.isDirectory()) { | ||
| log.debug("Could not validate the file ${file.toString()} - path is a directory") | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Azure Path Validation Skips FilesThe condition |
||
| return Evaluator.Result.success() | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "https://raw.githubusercontent.com/nf-core/nf-schema/master/examples/azurepath/nextflow_schema.json", | ||
| "title": "Azure path validation test", | ||
| "description": "Test schema for Azure path validation", | ||
| "type": "object", | ||
| "properties": { | ||
| "az_file": { | ||
| "type": "string", | ||
| "format": "file-path", | ||
| "description": "Azure storage file path" | ||
| }, | ||
| "az_directory": { | ||
| "type": "string", | ||
| "format": "directory-path", | ||
| "description": "Azure storage directory path" | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this version 2.6.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with c844ee0