galaxyproject / galaxyproject/total-perspective-vortex
Add linter support for optional if statements
- Dominant language
- Python
- Stars
- 18
- Forks
- 19
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 5
Description
We have a use case where a rule should be overridden without having to respecify the `if` condition. Currently, the absence of the `if` condition will trigger a lint failure because the `if` field is mandatory in the pydantic schema:
```
destinations:
_pulsar_destination:
rules:
- id: pulsar_destination_docker_rule
if: entity.params.get('docker_enabled')
params:
docker_set_user: '1000'
pulsar-azure-gpu:
inherits: _pulsar_destination
rules:
- id: pulsar_destination_docker_rule
# the if condition is inherited here, so linter should not warn
params:
docker_volumes: $job_directory:ro,$tool_directory:ro,$job_directory/outputs:rw,$working_directory:rw,/data/alphafold_databases:/data:ro
```
Contributor guide
Assessment
This issue has not been assessed yet.