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

Standardize the notation for optional parameters in documentation #674

Closed
kartikeyakirar opened this issue Feb 23, 2024 · 4 comments
Closed
Assignees
Labels

Comments

@kartikeyakirar
Copy link
Contributor

kartikeyakirar commented Feb 23, 2024

Based on the discussions regarding the documentation style for indicating optional parameters within pacakge (see details ), it has been suggested that we adopt a unified approach to enhance consistency.

The proposed standard for denoting optional parameters is to follow the format:
@param (`character`) optional ...

@averissimo
Copy link
Contributor

An "edge case" when the type is part of the description should be considered (@chlebowa first mentioned this that comment)

I've tentatively rephrased it like this: (**optional** surrounded by ** for emphasis)

WDYT?

-#' @param input_path optional, (`list`) of the input paths to either: specific files of accepted formats,
+#' @param input_path (`list`) of the input paths, **optional**. Each element can be:

Any suggestions on cases like this?

-#' @param row_facet optional, (`data_extract_spec` or `list` of multiple `data_extract_spec`)
-#'   Which data columns to use for faceting rows.
# a)
+#' @param row_facet (`data_extract_spec` or `list` of multiple `data_extract_spec`)
+#' **optional** specification of the data variable(s) to use for faceting rows.
# or b)
+#' @param row_facet (`data_extract_spec` or `list` of multiple `data_extract_spec`) **optional**.
+#' Specification of the data variable(s) to use for faceting rows.

@kartikeyakirar
Copy link
Contributor Author

IMO option a) might be more preferable because it integrates the "optional" keyword with the type description . and slightly maintain consistency with input_path example you suggested.

@m7pr
Copy link
Contributor

m7pr commented Feb 28, 2024

@insightsengineering/nest-core-dev would we like to tackle this before the release or after?

@m7pr
Copy link
Contributor

m7pr commented Feb 28, 2024

ah ok I just saw the PR, so probably before the release #698

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

No branches or pull requests

3 participants