Skip to content

Conversation

@SkepticRaven
Copy link
Contributor

My attempt to meld javadoc style/intent into nextflow documentation.

Changes from javadoc:

  • tuple type structure. tuples adopt a YAML-style docstring to indicate contents of tuple.
  • Add @publish tag to indicate when a workflow or process publishes data outside its workdir.
  • Allow multiple @return tag, since nextflow is MIMO.
  • Added newline between tags to enhance readability.

Features that might be useful in docstrings but not added:

  • Global parameters (e.g. config param.*) used in processes/workflows not listed. javadoc has a @note tag, which could be used for noteworthy parameters.
  • File extension hints. nf-core has hints for extensions of files produced. This both doesn't make as much sense to our pipeline and doesn't have an appropriate field in javadoc.

Base automatically changed from remote-nextflow-hooks to main August 26, 2025 19:09
@SkepticRaven SkepticRaven marked this pull request as ready for review August 26, 2025 19:11
@SkepticRaven SkepticRaven self-assigned this Aug 26, 2025
fi
else
echo "\${file} exists, adding to process list."
echo "\${file}" >> files_to_process.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a missing fi after this else block?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also does the while loop need to be closed with a done ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both should be there, but github might be hiding your context.

This patch should have been separate, but it fixes behavior when you want to ignore invalid inputs -- it used to place the file in the list to process and would just crash later.

* @param tuple
* - in_pose The input pose file.
* - feature_cache The directory containing the generated features.
* @param classifiers A map of classifier names to their respective parameters.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You document the tuples, it might be nice to document what the map looks like.

e.g.

@param classifiers A map where each entry contains:
  - key: classifier name (string)
  - value: object 🤷 

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

 * @param classifiers A map of classifiers:
 *  - classifier_name: a list of classifier parameter maps:
 *    - stitch_value: the gap size for stitching behavior bouts
 *    - filter_value: the minimum length for behavior bouts

I think the nested maps might get a bit verbose...

@SkepticRaven SkepticRaven merged commit 026f81f into main Sep 22, 2025
3 checks passed
@SkepticRaven SkepticRaven deleted the YODA-193-add-docstrings-to-nextflow-functions-modules-and-workflows branch September 22, 2025 13:10
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

Successfully merging this pull request may close these issues.

5 participants