Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at query@virtualphotonics.org. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
80 changes: 80 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
When contributing to the VTS please follow the coding conventions detailed below. Some of the initial development did not adhere to these guidelines but going forward, this will be the code style and structure.
## Naming Conventions
### Definitions:
* __Camel Case:__ Naming convention where the first letter of each word is capitalized with the exception of the first letter. Example: __thisIsCamelCased__
* __Pascal Case:__ Naming convention where the first letter of each work is capitalized including the first letter. Example: __ThisIsPascalCased__
* __Underscore Delimited:__ Naming convention that places underscores between the words and the first letter of each word can be capitalized. Example: __This_Is_Underscore_Delimited__<br />

These are the only naming conventions that should be used in the VTS and apply to different aspects of the code defined below.
* __Private fields__ should be prefixed with an underscore and camel cased (Note that at the start of the VTS development these fields were Pascal cased but going forward they will be camel cased).
* __Member variables__, __parameters__ and __local variables</strong> should be camel cased.
* __properties__, __functions__, __events__, __classes__ and __protected variables__ should be Pascal cased.
* __Test methods__ should be underscore delimited.
* __Interfaces__ should be prefixed with an 'I'.
## Code Ordering
Internal and external members should be grouped together in the source file and ordered as follows, __Static__ should come before __Instance__:
* Events
* Fields
* Constructors
* Properties
* Public methods
* Private methods

Note: Regions should only be used if the source file is large, comments should be used to group the members.
## Indenting
Code should be indented with 4 space characters, if a tab character is used, make sure your source-code editor replaces tabs with 4 spaces.
## Braces
An opening brace { should appear on the line after the start of a statement block and the code inside the brace should be indented 4 spaces. The closing brace } should be inline with the opening brace on it's own line.<br />
Example:
```c#
if (a == 10)
{
//set the value of b
b = 15;
}
else
{
b = 25;
}
```
Braces should be used even when there is only a single line of code to avoid later issues if more code is added.<br />
In cases where a statement can be on one line, braces can begin and end on the same line.<br />
Example:
```c#
string _myString
public string MyString
{
get { return _myString; }
set { _myString = value; }
}
```
## Spacing
Spacing improves the readability of the source-code, follow these guidlines for spacing:<br />
Use a space after the comma between arguments in a function
```C#
MyFunction(FirstParam, SecondParam, 10, 5);
```
Use a space after statements like __if__, __while__, __for__ and __foreach__
```c#
if (a == 10)
{
//set the value of b
b = 15;
}
```
Use a space before and after operators with the exception of ++ and --
```c#
for (i = 0; i &lt;= 10; i++)
{
Console.WriteLine(i);
}
```
## Comments
There are 2 types of comments in the code, XML comments and regular code comments. We use the XML comments to generate our documentation and library helper text, [click here](https://github.com/VirtualPhotonics/VTS/wiki/Visual-Studio-XML-Comment-Tags) for more details on generating these comments.
The style for the code comments is two slashes // even for multi-line comments. Avoid using /* comments */
## File Organization
There should be one public type per source file but this file can contain multiple internal classes. Source files should ave the same name as the public class in the file. Directory names should follow the namespace of the class.<br />
The test projects should mirror the project they are testing in both structure and naming convention. There should be one test per class and it should be named the same as the class being tested and suffixed with the word Tests.<br />
Example:<br />
__SolverFactory.cs__ is the name of the file for the public class SolverFactory<br />
__SolverFactoryTests.cs__ is the name of the file containing the tests
3 changes: 2 additions & 1 deletion Vts.MonteCarlo.CommandLineApplication.Test/ProgramTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ public class ProgramTests
"fluorescence_emission_AOfXAndYAndZ_source_infinite_cylinder",
"embedded_directional_circular_source_ellip_tissue",
"Flat_2D_source_one_layer_ROfRho",
"Flat_2D_Lambertian_source_one_layer_ROfRho_FluenceOfRhoAndZ",
"Flat_2D_source_two_layer_bounded_AOfRhoAndZ",
"Gaussian_2D_source_one_layer_ROfRho",
"Gaussian_line_source_one_layer_ROfRho",
"Gaussian_line_source_one_layer_ROfXAndY",
"one_layer_all_detectors",
"one_layer_FluenceOfRhoAndZ_RadianceOfRhoAndZAndAngle",
"one_layer_ROfRho_FluenceOfRhoAndZ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="nunit" Version="4.3.2" />
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="nunit" Version="4.4.0" />
<PackageReference Include="NUnit3TestAdapter" Version="5.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
<AssemblyName>mc</AssemblyName>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<RootNamespace>Vts.MonteCarlo.CommandLineApplication</RootNamespace>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<AssemblyVersion>8.1.0.0</AssemblyVersion>
<FileVersion>8.1.0.0</FileVersion>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Company>Virtual Photonics Technology Initiative</Company>
<Product>MCCL</Product>
<Authors>David Cuccia; Carole Hayakawa; Lisa Malenfant; Janaka Ranasinghesagara; Jennifer Nguyen; Adam Gardner; Michele Martinelli</Authors>
<Description>Monte-Carlo command-line application</Description>
<Copyright>Copyright © 2024 Laser Microbeam and Medical Program</Copyright>
<Copyright>Copyright © 2025 Laser Microbeam and Medical Program</Copyright>
<PackageLicenseUrl>https://github.com/VirtualPhotonics/VTS/blob/master/license.md</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/VirtualPhotonics/VTS/wiki</PackageProjectUrl>
<PackageIconUrl>http://virtualphotonics.org/Themes/VP/Content/Images/logo.png</PackageIconUrl>
<RepositoryUrl>https://github.com/VirtualPhotonics/VTS</RepositoryUrl>
<PackageTags>C# Monte-Carlo</PackageTags>
<RepositoryType>git</RepositoryType>
<Version>8.0.0</Version>
<Version>8.1.0</Version>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

Expand All @@ -32,7 +32,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="VirtualPhotonics.Vts" Version="12.0.0" />
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
<PackageReference Include="VirtualPhotonics.Vts" Version="12.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="nunit" Version="4.3.2" />
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="nunit" Version="4.4.0" />
<PackageReference Include="NUnit3TestAdapter" Version="5.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,26 @@
<RootNamespace>Vts.MonteCarlo.PostProcessor</RootNamespace>
<AssemblyName>mc_post</AssemblyName>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<AssemblyVersion>8.1.0.0</AssemblyVersion>
<FileVersion>8.1.0.0</FileVersion>
<Authors>David Cuccia; Carole Hayakawa; Lisa Malenfant; Janaka Ranasinghesagara; Jennifer Nguyen; Adam Gardner; Michele Martinelli</Authors>
<Company>Virtual Photonics Technology Initiative</Company>
<Product>MCPP</Product>
<Description>Monte-Carlo post-processor command-line application</Description>
<Copyright>Copyright © 2024 Laser Microbeam and Medical Program</Copyright>
<Copyright>Copyright © 2025 Laser Microbeam and Medical Program</Copyright>
<PackageProjectUrl>https://github.com/VirtualPhotonics/VTS/wiki</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/VirtualPhotonics/VTS/blob/master/license.md</PackageLicenseUrl>
<PackageIconUrl>http://virtualphotonics.org/Themes/VP/Content/Images/logo.png</PackageIconUrl>
<RepositoryUrl>https://github.com/VirtualPhotonics/VTS</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>C# Monte-Carlo</PackageTags>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>8.0.0</Version>
<Version>8.1.0</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="VirtualPhotonics.Vts" Version="12.0.0" />
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
<PackageReference Include="VirtualPhotonics.Vts" Version="12.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
27 changes: 17 additions & 10 deletions license.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
## The MIT License (MIT)
MIT License

#### Copyright (c) 2022 Virtual Photonics Technology Initiative
Copyright (c) 2025 Virtual Photonics Technology Initiative

### Acknowledgement
Use the following acknowledgement in publications or applications that make use of this open source software or underlying technology and research:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

__"This work was made possible through open-source software resources offered by the Virtual Photonics Technology Initiative, at the Beckman Laser Institute, University of California, Irvine."__
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

_Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:_

_The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software._

_THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE._
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading