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

Parameter schema #5

Closed
bentsherman opened this issue Jun 11, 2024 · 1 comment
Closed

Parameter schema #5

bentsherman opened this issue Jun 11, 2024 · 1 comment
Milestone

Comments

@bentsherman
Copy link
Member

bentsherman commented Jun 11, 2024

The language server should be able to use the nf-core parameter schema to determine the names and types of pipeline parameters. It should look for a schema file in the same directory as the main script.

More generally, any Nextflow script that defines an entry workflow should be able to define a parameter schema in the same directory.

Might want to wait until nextflow-io/nextflow#4669 is implemented

Actually might be helpful to do this in the language server first

@ewels ewels mentioned this issue Jul 5, 2024
@bentsherman bentsherman added this to the 1.0.0 milestone Jul 15, 2024
bentsherman added a commit that referenced this issue Aug 23, 2024
@bentsherman
Copy link
Member Author

Basic parameter validation is now supported

  • Parameter validation is only performed in the entry workflow, as this is the only context in which the parameters are actually known
  • The language server simply looks for ./nextflow_schema.json relative to the source file containing the entry workflow, so each "entry" script can define it's own parameter schema alongside it
  • I don't inspect the schema file too deeply, I just grab the parameter names and types and go from there
  • Both the old and new schema formats are implicitly supported by checking both defs and definitions
  • Completion and hover hints are supported basically out of the box. Hover hint includes the parameter type and description
  • Parameter type validation will be implemented as part of overall type checking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant