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

Please add default values for objects to documentation #158

Open
scottprahl opened this issue Aug 2, 2024 · 1 comment
Open

Please add default values for objects to documentation #158

scottprahl opened this issue Aug 2, 2024 · 1 comment

Comments

@scottprahl
Copy link

Is your feature request related to a problem? Please describe.
I have to look at the source code to know that SimulationInput() returns an object that has a (perfectly sensible) SourceInput value of DirectionalPointSourceInput

Describe the solution you'd like
Ideally this would be built into the documentation using the <returns> ... </returns> tag. For example, the CustomCircularSource tells us nothing about the returned object other than it is an ISource.

/// <summary>
/// Required code to create a source based on the input values
/// </summary>
/// <param name="rng">random number generator</param>
/// <returns>source class that implements ISource</returns>
public ISource CreateSource(Random rng = null)
{
    rng = rng ?? new Random();

    return new CustomCircularSource(
        this.OuterRadius,
        this.InnerRadius,
        this.SourceProfile,
        this.PolarAngleEmissionRange,
        this.AzimuthalAngleEmissionRange,
        this.NewDirectionOfPrincipalSourceAxis,
        this.TranslationFromOrigin,
        this.BeamRotationFromInwardNormal,
        this.InitialTissueRegionIndex) { Rng = rng };
}

Describe alternatives you've considered
Rummaging around in the source code works, but is tedious.

Additional context
This will be a lot of work. Starting with the object creation would be nice. It also seems like this is something that AI would be great at assisting with.

@lmalenfant
Copy link
Member

Hi Scott,

This is a great suggestion and one that Carole and I discussed last week after the challenges we faced with the Python sample. Some of the default values are in the code but it would be better if they were also in the XML comments to appear in the documentation.

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

2 participants