diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..26f2c84 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..fae7975 --- /dev/null +++ b/CONTRIBUTING.md @@ -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__
+ +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 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.
+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.
+In cases where a statement can be on one line, braces can begin and end on the same line.
+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:
+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 <= 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.
+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.
+Example:
+__SolverFactory.cs__ is the name of the file for the public class SolverFactory
+__SolverFactoryTests.cs__ is the name of the file containing the tests diff --git a/Vts.MonteCarlo.CommandLineApplication.Test/ProgramTests.cs b/Vts.MonteCarlo.CommandLineApplication.Test/ProgramTests.cs index 073cf06..cafc913 100644 --- a/Vts.MonteCarlo.CommandLineApplication.Test/ProgramTests.cs +++ b/Vts.MonteCarlo.CommandLineApplication.Test/ProgramTests.cs @@ -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", diff --git a/Vts.MonteCarlo.CommandLineApplication.Test/Vts.MonteCarlo.Application.Test.csproj b/Vts.MonteCarlo.CommandLineApplication.Test/Vts.MonteCarlo.Application.Test.csproj index 1ae5220..0f241fe 100644 --- a/Vts.MonteCarlo.CommandLineApplication.Test/Vts.MonteCarlo.Application.Test.csproj +++ b/Vts.MonteCarlo.CommandLineApplication.Test/Vts.MonteCarlo.Application.Test.csproj @@ -23,9 +23,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers diff --git a/Vts.MonteCarlo.CommandLineApplication/Vts.MonteCarlo.Application.csproj b/Vts.MonteCarlo.CommandLineApplication/Vts.MonteCarlo.Application.csproj index 8f2d141..7fce693 100644 --- a/Vts.MonteCarlo.CommandLineApplication/Vts.MonteCarlo.Application.csproj +++ b/Vts.MonteCarlo.CommandLineApplication/Vts.MonteCarlo.Application.csproj @@ -6,21 +6,21 @@ mc win-x64;linux-x64;osx-x64 Vts.MonteCarlo.CommandLineApplication - 8.0.0.0 - 8.0.0.0 + 8.1.0.0 + 8.1.0.0 false Virtual Photonics Technology Initiative MCCL David Cuccia; Carole Hayakawa; Lisa Malenfant; Janaka Ranasinghesagara; Jennifer Nguyen; Adam Gardner; Michele Martinelli Monte-Carlo command-line application - Copyright © 2024 Laser Microbeam and Medical Program + Copyright © 2025 Laser Microbeam and Medical Program https://github.com/VirtualPhotonics/VTS/blob/master/license.md https://github.com/VirtualPhotonics/VTS/wiki http://virtualphotonics.org/Themes/VP/Content/Images/logo.png https://github.com/VirtualPhotonics/VTS C# Monte-Carlo git - 8.0.0 + 8.1.0 README.md @@ -32,7 +32,8 @@ - + + diff --git a/Vts.MonteCarlo.PostProcessor.Test/Vts.MonteCarlo.PostProcessor.Application.Test.csproj b/Vts.MonteCarlo.PostProcessor.Test/Vts.MonteCarlo.PostProcessor.Application.Test.csproj index a823131..b59a3be 100644 --- a/Vts.MonteCarlo.PostProcessor.Test/Vts.MonteCarlo.PostProcessor.Application.Test.csproj +++ b/Vts.MonteCarlo.PostProcessor.Test/Vts.MonteCarlo.PostProcessor.Application.Test.csproj @@ -7,9 +7,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers diff --git a/Vts.MonteCarlo.PostProcessor/Vts.MonteCarlo.PostProcessor.Application.csproj b/Vts.MonteCarlo.PostProcessor/Vts.MonteCarlo.PostProcessor.Application.csproj index 344cf5b..0eb18d7 100644 --- a/Vts.MonteCarlo.PostProcessor/Vts.MonteCarlo.PostProcessor.Application.csproj +++ b/Vts.MonteCarlo.PostProcessor/Vts.MonteCarlo.PostProcessor.Application.csproj @@ -6,13 +6,13 @@ Vts.MonteCarlo.PostProcessor mc_post win-x64;linux-x64;osx-x64 - 8.0.0.0 - 8.0.0.0 + 8.1.0.0 + 8.1.0.0 David Cuccia; Carole Hayakawa; Lisa Malenfant; Janaka Ranasinghesagara; Jennifer Nguyen; Adam Gardner; Michele Martinelli Virtual Photonics Technology Initiative MCPP Monte-Carlo post-processor command-line application - Copyright © 2024 Laser Microbeam and Medical Program + Copyright © 2025 Laser Microbeam and Medical Program https://github.com/VirtualPhotonics/VTS/wiki https://github.com/VirtualPhotonics/VTS/blob/master/license.md http://virtualphotonics.org/Themes/VP/Content/Images/logo.png @@ -20,11 +20,12 @@ git C# Monte-Carlo false - 8.0.0 + 8.1.0 - + + diff --git a/license.md b/license.md index 0a58589..38c8085 100644 --- a/license.md +++ b/license.md @@ -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.