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

Agree on Library docstring formatting #124

Open
nanophyto opened this issue Jan 24, 2025 · 1 comment
Open

Agree on Library docstring formatting #124

nanophyto opened this issue Jan 24, 2025 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@nanophyto
Copy link
Contributor

nanophyto commented Jan 24, 2025

Formatting of the docstrings included in Library is currently all over the place. We should agree to a single format and be consistent.

Proposed formatting (to be discussed):

Short form notation (ideally) consistent with original publication:

"
    R / (kᵣ + R)      

Text description with reference to original publication:

Monod formulation of nutrient limitation, which is based on Michaelis-Menten enzyme kinetics 
and saturates at high nutrient concentrations. It was originally described in Monod, 1949.

Description of arguments providing both long and short form:

# Arguments
- `nutrient_concentration`: The nutrient concentration  (R)
- `nutrient_half_saturation`: The nutrient concentration at which the process occurs at 
half its potential rate (kᵣ)

Any notes relevant to the module:

Note that sometimes this formulation is also used for Predation ('Holling type 2').
"

Function with name of author (if appropriate) and descriptive long form arguments:

function monod_limitation(nutrient_concentration, nutrient_half_saturation)
    return nutrient_concentration / (nutrient_half_saturation + nutrient_concentration)
end

Full example:

"
    R / (kᵣ + R)      

Monod formulation of nutrient limitation, which is based on Michaelis-Menten enzyme kinetics 
and saturates at high nutrient concentrations. It was originally described in Monod, 1949.

# Arguments
- `nutrient_concentration`: The nutrient concentration  (R)
- `nutrient_half_saturation`: The nutrient concentration at which the process occurs at 
half its potential rate (kᵣ)

Note that sometimes this formulation is also used for Predation ('Holling type 2').
"

function monod_limitation(nutrient_concentration, nutrient_half_saturation)
    return nutrient_concentration / (nutrient_half_saturation + nutrient_concentration)
end
@nanophyto
Copy link
Contributor Author

I guess it would be easiest to add this to the docs or contributor guidelines and open a PR?

@nanophyto nanophyto self-assigned this Jan 27, 2025
@radka-j radka-j added the documentation Improvements or additions to documentation label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants