RS2Scripting 11.23.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. RS2Scripting-11.23.0/License.txt +20 -0
  2. RS2Scripting-11.23.0/PKG-INFO +147 -0
  3. RS2Scripting-11.23.0/README.md +130 -0
  4. RS2Scripting-11.23.0/pyproject.toml +27 -0
  5. RS2Scripting-11.23.0/setup.cfg +4 -0
  6. RS2Scripting-11.23.0/src/RS2Scripting.egg-info/PKG-INFO +147 -0
  7. RS2Scripting-11.23.0/src/RS2Scripting.egg-info/SOURCES.txt +203 -0
  8. RS2Scripting-11.23.0/src/RS2Scripting.egg-info/dependency_links.txt +1 -0
  9. RS2Scripting-11.23.0/src/RS2Scripting.egg-info/requires.txt +1 -0
  10. RS2Scripting-11.23.0/src/RS2Scripting.egg-info/top_level.txt +1 -0
  11. RS2Scripting-11.23.0/src/rs2/BaseModel.py +46 -0
  12. RS2Scripting-11.23.0/src/rs2/Units.py +6 -0
  13. RS2Scripting-11.23.0/src/rs2/__init__.py +0 -0
  14. RS2Scripting-11.23.0/src/rs2/_common/Client.py +67 -0
  15. RS2Scripting-11.23.0/src/rs2/_common/ProxyObject.py +12 -0
  16. RS2Scripting-11.23.0/src/rs2/_common/__init__.py +0 -0
  17. RS2Scripting-11.23.0/src/rs2/_common/documentProxy.py +5 -0
  18. RS2Scripting-11.23.0/src/rs2/interpreter/InterpreterEnums.py +86 -0
  19. RS2Scripting-11.23.0/src/rs2/interpreter/InterpreterGraphEnums.py +54 -0
  20. RS2Scripting-11.23.0/src/rs2/interpreter/InterpreterModel.py +328 -0
  21. RS2Scripting-11.23.0/src/rs2/interpreter/RS2Interpreter.py +78 -0
  22. RS2Scripting-11.23.0/src/rs2/interpreter/_UtilityResult.py +20 -0
  23. RS2Scripting-11.23.0/src/rs2/interpreter/__init__.py +0 -0
  24. RS2Scripting-11.23.0/src/rs2/interpreter/queryResults/HistoryQueryResults.py +30 -0
  25. RS2Scripting-11.23.0/src/rs2/interpreter/queryResults/MaterialQueryResults.py +67 -0
  26. RS2Scripting-11.23.0/src/rs2/interpreter/queryResults/MeshResults.py +12 -0
  27. RS2Scripting-11.23.0/src/rs2/interpreter/queryResults/TimeQueryResults.py +111 -0
  28. RS2Scripting-11.23.0/src/rs2/interpreter/queryResults/__init__.py +0 -0
  29. RS2Scripting-11.23.0/src/rs2/interpreter/supportResults/BoltResult.py +49 -0
  30. RS2Scripting-11.23.0/src/rs2/interpreter/supportResults/CompositeResult.py +24 -0
  31. RS2Scripting-11.23.0/src/rs2/interpreter/supportResults/JointResult.py +25 -0
  32. RS2Scripting-11.23.0/src/rs2/interpreter/supportResults/LinerResult.py +33 -0
  33. RS2Scripting-11.23.0/src/rs2/interpreter/supportResults/__init__.py +0 -0
  34. RS2Scripting-11.23.0/src/rs2/modeler/Model.py +350 -0
  35. RS2Scripting-11.23.0/src/rs2/modeler/RS2Modeler.py +81 -0
  36. RS2Scripting-11.23.0/src/rs2/modeler/__init__.py +0 -0
  37. RS2Scripting-11.23.0/src/rs2/modeler/properties/AbsoluteStageFactorGettersInterface.py +31 -0
  38. RS2Scripting-11.23.0/src/rs2/modeler/properties/AbsoluteStageFactorInterface.py +49 -0
  39. RS2Scripting-11.23.0/src/rs2/modeler/properties/CompositeProperty.py +81 -0
  40. RS2Scripting-11.23.0/src/rs2/modeler/properties/DiscreteFunction.py +43 -0
  41. RS2Scripting-11.23.0/src/rs2/modeler/properties/MaterialJoint.py +25 -0
  42. RS2Scripting-11.23.0/src/rs2/modeler/properties/MaterialJointOptions.py +28 -0
  43. RS2Scripting-11.23.0/src/rs2/modeler/properties/PropertyEnums.py +376 -0
  44. RS2Scripting-11.23.0/src/rs2/modeler/properties/RelativeStageFactorInterface.py +50 -0
  45. RS2Scripting-11.23.0/src/rs2/modeler/properties/ShearNormalFunction.py +45 -0
  46. RS2Scripting-11.23.0/src/rs2/modeler/properties/SnowdenAnisotropicFunction.py +56 -0
  47. RS2Scripting-11.23.0/src/rs2/modeler/properties/StructuralInterface.py +59 -0
  48. RS2Scripting-11.23.0/src/rs2/modeler/properties/UserDefinedWaterMode.py +21 -0
  49. RS2Scripting-11.23.0/src/rs2/modeler/properties/__init__.py +0 -0
  50. RS2Scripting-11.23.0/src/rs2/modeler/properties/bolt/Bolt.py +33 -0
  51. RS2Scripting-11.23.0/src/rs2/modeler/properties/bolt/EndAnchored.py +59 -0
  52. RS2Scripting-11.23.0/src/rs2/modeler/properties/bolt/FullyBonded.py +66 -0
  53. RS2Scripting-11.23.0/src/rs2/modeler/properties/bolt/PlainStrandCable.py +112 -0
  54. RS2Scripting-11.23.0/src/rs2/modeler/properties/bolt/Swellex.py +136 -0
  55. RS2Scripting-11.23.0/src/rs2/modeler/properties/bolt/Tieback.py +192 -0
  56. RS2Scripting-11.23.0/src/rs2/modeler/properties/bolt/__init__.py +0 -0
  57. RS2Scripting-11.23.0/src/rs2/modeler/properties/joint/BartonBandis.py +143 -0
  58. RS2Scripting-11.23.0/src/rs2/modeler/properties/joint/BartonBandisMaterial.py +82 -0
  59. RS2Scripting-11.23.0/src/rs2/modeler/properties/joint/DisplacementDependent.py +134 -0
  60. RS2Scripting-11.23.0/src/rs2/modeler/properties/joint/GeosyntheticHyperbolic.py +147 -0
  61. RS2Scripting-11.23.0/src/rs2/modeler/properties/joint/GeosyntheticHyperbolicMaterial.py +93 -0
  62. RS2Scripting-11.23.0/src/rs2/modeler/properties/joint/HyperbolicSoftening.py +202 -0
  63. RS2Scripting-11.23.0/src/rs2/modeler/properties/joint/Joint.py +57 -0
  64. RS2Scripting-11.23.0/src/rs2/modeler/properties/joint/MaterialDependent.py +128 -0
  65. RS2Scripting-11.23.0/src/rs2/modeler/properties/joint/MohrCoulomb.py +211 -0
  66. RS2Scripting-11.23.0/src/rs2/modeler/properties/joint/MohrCoulombMaterial.py +115 -0
  67. RS2Scripting-11.23.0/src/rs2/modeler/properties/joint/NoneSlip.py +103 -0
  68. RS2Scripting-11.23.0/src/rs2/modeler/properties/joint/__init__.py +0 -0
  69. RS2Scripting-11.23.0/src/rs2/modeler/properties/liner/CableTruss.py +199 -0
  70. RS2Scripting-11.23.0/src/rs2/modeler/properties/liner/Geosynthetic.py +167 -0
  71. RS2Scripting-11.23.0/src/rs2/modeler/properties/liner/Liner.py +31 -0
  72. RS2Scripting-11.23.0/src/rs2/modeler/properties/liner/ReinforcedConcrete.py +291 -0
  73. RS2Scripting-11.23.0/src/rs2/modeler/properties/liner/StandardBeam.py +268 -0
  74. RS2Scripting-11.23.0/src/rs2/modeler/properties/liner/__init__.py +0 -0
  75. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/InitialConditions.py +152 -0
  76. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/MaterialProperty.py +49 -0
  77. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/StageFactors.py +100 -0
  78. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/__init__.py +0 -0
  79. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/datum/BaseDatum.py +23 -0
  80. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/datum/Datum.py +79 -0
  81. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/datum/PeakResidualDatum.py +31 -0
  82. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/datum/SimpleDatum.py +17 -0
  83. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/datum/__init__.py +0 -0
  84. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/hydraulic/FEAGroundwater/Brooks.py +106 -0
  85. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/hydraulic/FEAGroundwater/Constant.py +54 -0
  86. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/hydraulic/FEAGroundwater/FEAGroundwater.py +82 -0
  87. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/hydraulic/FEAGroundwater/Fredlund.py +117 -0
  88. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/hydraulic/FEAGroundwater/Gardner.py +106 -0
  89. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/hydraulic/FEAGroundwater/Genuchten.py +124 -0
  90. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/hydraulic/FEAGroundwater/Simple.py +91 -0
  91. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/hydraulic/FEAGroundwater/UserDefined.py +10 -0
  92. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/hydraulic/FEAGroundwater/__init__.py +0 -0
  93. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/hydraulic/Hydraulic.py +41 -0
  94. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/hydraulic/StaticGroundwater.py +85 -0
  95. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/hydraulic/__init__.py +0 -0
  96. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/ChSoil.py +45 -0
  97. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/Custom.py +83 -0
  98. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/CySoil.py +45 -0
  99. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/DoubleYield.py +45 -0
  100. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/HardeningSoil.py +73 -0
  101. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/HardeningSoilSmallStrainStiffness.py +73 -0
  102. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/Isotropic.py +122 -0
  103. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/ManzariAndDafalias.py +38 -0
  104. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/NonLinearHyperbolic.py +117 -0
  105. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/NonLinearIsotropic.py +255 -0
  106. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/Norsand.py +45 -0
  107. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/Orthotropic.py +180 -0
  108. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/Pm4Sand.py +80 -0
  109. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/Pm4Silt.py +87 -0
  110. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/SoftSoil.py +24 -0
  111. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/SoftSoilCreep.py +24 -0
  112. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/Stiffness.py +53 -0
  113. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/SwellingRock.py +52 -0
  114. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/TransverselyIsotropic.py +145 -0
  115. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/ViscoElastic.py +59 -0
  116. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/stiffness/__init__.py +0 -0
  117. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/AnisotropicLinear.py +150 -0
  118. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/BarcelonaBasic.py +176 -0
  119. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/BartonBandisStrength.py +59 -0
  120. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/BoundingSurfacePlasticity.py +66 -0
  121. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/CamClay.py +113 -0
  122. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/ChSoilStrength.py +66 -0
  123. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/CySoilStrength.py +94 -0
  124. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/DiscreteFunction.py +41 -0
  125. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/DoubleYieldStrength.py +94 -0
  126. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/DruckerPrager.py +113 -0
  127. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/Finn.py +129 -0
  128. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/GeneralizedAnisotropic.py +20 -0
  129. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/GeneralizedHoekBrown.py +195 -0
  130. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/HardeningSoilStrength.py +101 -0
  131. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/HardeningSoilWithSmallStrainStiffness.py +101 -0
  132. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/HoekBrown.py +102 -0
  133. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/Hyperbolic.py +59 -0
  134. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/JointedGeneralizedHoekBrown.py +198 -0
  135. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/JointedMohrCoulomb.py +116 -0
  136. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/ManzariAndDafaliasStrength.py +108 -0
  137. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/ModifiedCamClay.py +113 -0
  138. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/MohrCoulombStrength.py +113 -0
  139. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/MohrCoulombWithCap.py +112 -0
  140. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/NorSandStrength.py +101 -0
  141. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/PM4SandStrength.py +178 -0
  142. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/PM4SiltStrength.py +241 -0
  143. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/PowerCurve.py +101 -0
  144. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/Shansep.py +172 -0
  145. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/ShearNormalFunction.py +21 -0
  146. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/SnowdenModAnisotropicLinear.py +78 -0
  147. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/SoftSoilCreepStrength.py +87 -0
  148. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/SoftSoilStrength.py +80 -0
  149. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/SofteningHardeningModel.py +150 -0
  150. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/Strength.py +185 -0
  151. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/SwellingRockStrength.py +122 -0
  152. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/VerticalStressRatio.py +94 -0
  153. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/strength/__init__.py +0 -0
  154. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/Thermal.py +74 -0
  155. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/__init__.py +0 -0
  156. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/conductivity/Conductivity.py +27 -0
  157. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/conductivity/ConstantConductivity.py +31 -0
  158. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/conductivity/CoteAndKonrad.py +45 -0
  159. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/conductivity/Derives.py +17 -0
  160. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/conductivity/Johansen.py +45 -0
  161. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/conductivity/JohansenLu.py +24 -0
  162. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/conductivity/Tabular.py +31 -0
  163. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/conductivity/__init__.py +0 -0
  164. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/heatcapacity/ConstantHeatCapacity.py +38 -0
  165. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/heatcapacity/CustomHeatCapacity.py +38 -0
  166. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/heatcapacity/HeatCapacity.py +21 -0
  167. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/heatcapacity/JameNewman.py +24 -0
  168. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/heatcapacity/__init__.py +0 -0
  169. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/soilunfrozenwatercontent/CustomWaterContent.py +13 -0
  170. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/soilunfrozenwatercontent/Konrad.py +31 -0
  171. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/soilunfrozenwatercontent/SoilUnfrozenWaterContent.py +23 -0
  172. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/soilunfrozenwatercontent/TiceAnderson.py +31 -0
  173. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/soilunfrozenwatercontent/__init__.py +0 -0
  174. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/soilunfrozenwatercontent/hydraulic/BrooksWaterContent.py +24 -0
  175. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/soilunfrozenwatercontent/hydraulic/FredlundWaterContent.py +31 -0
  176. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/soilunfrozenwatercontent/hydraulic/GardnerWaterContent.py +24 -0
  177. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/soilunfrozenwatercontent/hydraulic/GenuchtenWaterContent.py +38 -0
  178. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/soilunfrozenwatercontent/hydraulic/HydraulicModel.py +37 -0
  179. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/soilunfrozenwatercontent/hydraulic/SimpleWaterContent.py +17 -0
  180. RS2Scripting-11.23.0/src/rs2/modeler/properties/material/thermal/soilunfrozenwatercontent/hydraulic/__init__.py +0 -0
  181. RS2Scripting-11.23.0/src/rs2/modeler/properties/pile/Beam.py +34 -0
  182. RS2Scripting-11.23.0/src/rs2/modeler/properties/pile/Elastic.py +45 -0
  183. RS2Scripting-11.23.0/src/rs2/modeler/properties/pile/ForceDisplacement.py +59 -0
  184. RS2Scripting-11.23.0/src/rs2/modeler/properties/pile/Linear.py +59 -0
  185. RS2Scripting-11.23.0/src/rs2/modeler/properties/pile/MaterialDependentPile.py +87 -0
  186. RS2Scripting-11.23.0/src/rs2/modeler/properties/pile/MohrCoulombPile.py +94 -0
  187. RS2Scripting-11.23.0/src/rs2/modeler/properties/pile/MultiLinear.py +56 -0
  188. RS2Scripting-11.23.0/src/rs2/modeler/properties/pile/Pile.py +63 -0
  189. RS2Scripting-11.23.0/src/rs2/modeler/properties/pile/__init__.py +0 -0
  190. RS2Scripting-11.23.0/src/rs2/modeler/properties/propertyProxy.py +283 -0
  191. RS2Scripting-11.23.0/src/rs2/utilities/ApplicationManager.py +64 -0
  192. RS2Scripting-11.23.0/src/rs2/utilities/ColorPicker.py +78 -0
  193. RS2Scripting-11.23.0/src/rs2/utilities/__init__.py +0 -0
  194. RS2Scripting-11.23.0/tests/testExampleCode.py +22 -0
  195. RS2Scripting-11.23.0/tests/testFileOpenWarning.py +24 -0
  196. RS2Scripting-11.23.0/tests/testInterpreterMultipleFileCloseProgram.py +84 -0
  197. RS2Scripting-11.23.0/tests/testInterpreterSaveAs.py +49 -0
  198. RS2Scripting-11.23.0/tests/testInterpreterSingleFileCloseProgram.py +66 -0
  199. RS2Scripting-11.23.0/tests/testMaterialJointOptions.py +114 -0
  200. RS2Scripting-11.23.0/tests/testModelerMultipleFileCloseProgram.py +88 -0
  201. RS2Scripting-11.23.0/tests/testModelerSingleFileCloseProgram.py +67 -0
  202. RS2Scripting-11.23.0/tests/testOpenFileNoResults.py +35 -0
  203. RS2Scripting-11.23.0/tests/testSaveAs.py +44 -0
  204. RS2Scripting-11.23.0/tests/testShearNormalFunction.py +192 -0
  205. RS2Scripting-11.23.0/tests/testSnowdenAnisotropicFunction.py +321 -0
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2024 Rocscience Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,147 @@
1
+ Metadata-Version: 2.1
2
+ Name: RS2Scripting
3
+ Version: 11.23.0
4
+ Summary: Client library for interacting with RS2 through python
5
+ Author: Rocscience
6
+ License: MIT License
7
+ Project-URL: Homepage, https://www.rocscience.com/software/rs2
8
+ Project-URL: Documentation, https://www.rocscience.com/help/rs2/overview
9
+ Keywords: Rocscience,RS2,Scripting,RocScript,Geotechnical,Finite Element Analysis,FEM,2D
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Topic :: Scientific/Engineering
13
+ Requires-Python: >=3.7
14
+ Description-Content-Type: text/markdown
15
+ License-File: License.txt
16
+ Requires-Dist: rsmessages==0.0.2
17
+
18
+ ## Introduction
19
+ This project is a library that can be used to interact with RS2 through python.
20
+
21
+ ### Goal
22
+ Each function exposed corresponds to an equivalent operation you could have done through the UI.
23
+ Using this idea, the user should be able to edit models and get results without having to go through the UI at all.
24
+ Although only a limited set of functionality is exposed for now, some basic workflows should still be possible. For a list of the functionality we have so far, see [Exposed Functionality](#exposed-functionality).
25
+
26
+ ### Python UI equivalents
27
+ Events and workflows done in the UI will have equivalents in the python library.
28
+ Wherever a dialog is shown in the UI, there will be an equivalent class with methods that mimick the dialog's behavior.
29
+ Wherever a warning or error dialog is displayed, an exception will be thrown, or a warning will be displayed in python instead.
30
+ Wherever you can select and manipulate an entity, identifiers can be used in the library to get references to those entities in python and objects will be constructed to help you interface with them.
31
+
32
+ ### How it works
33
+ Each function in the library is a wrapper to make an api call to the Application.
34
+ Objects retrieved through function calls will often not contain any data themselves, but will instead be proxies, allowing you to get information from the objects in the application.
35
+ For this reason, debugging will sometimes be tricky, as not all data will always be available for you to inspect unless you get it and assign it to a variable yourself.
36
+
37
+ ### Warnings
38
+ References can be *invalidated* whenever the corresponding object in the application is destroyed or reloaded. You will need to watch out for expired referenecs and renew them when needed as it can cause crashes or incorrect results if not managed properly. Functions that invalidate objects will always be marked with a warning and will indicate which objects should be re-loaded.
39
+
40
+ ## Exposed Functionality
41
+ The current set of functionality exposed is limited. With this version of the library, you can:
42
+ - Manage files through Open, Close, Save and Compute
43
+ - Modfy any Property value and stage factor, except for some user defined materials and statistical properties.
44
+ - Get any Mesh result, support result, SSR Critical SRF and query result.
45
+ - Add and remove queries (material, history, time)
46
+
47
+ ## Getting Started
48
+
49
+ **Getting started guide**
50
+ <!---TODO: add link-->
51
+ **First Tutorial**
52
+ <!---TODO: add link-->
53
+
54
+ # For Contributors:
55
+
56
+ ## Build
57
+ Following the steps to this guide: https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives
58
+ 1. Run the command below to install the python build module.
59
+ ```python -m pip install --upgrade build```
60
+ 2. Run this command from the same directory where pyproject.toml is located:
61
+ ```python -m build```
62
+ 3. Run the command below. After installing, a code will be displayed in the terminal. Using a web browser, go to https://www.microsoft.com/devicelogin, where you will be prompted to enter the code.
63
+ ```pip install keyring artifacts-keyring```
64
+ 4. A 'dist' folder should be generated with a .whl file. You can then run the command below to install the project and its dependencies
65
+ ```pip install -r requirements.txt```
66
+
67
+ *If the client library has been altered or updated, run the commands below to force reinstallation of the packages so that your environment is up to date.*
68
+ 1. ```python -m build```
69
+ 2. ```pip install -r requirements.txt --force-reinstall```
70
+
71
+ ## Unit Testing
72
+
73
+ To ensure the project's functionality and maintain code quality, a test suite using the `unittest` framework has been implemented. The documentation for `unittest` can be found at the following link: https://docs.python.org/3/library/unittest.html
74
+
75
+ ### Creating Unit Tests
76
+ **Directory Structure:**
77
+ - Place new .py files for unit testing in the tests directory.
78
+ - Save any RS2 files required for testing in the tests/resources directory.
79
+
80
+ **Handling Test Resources:**
81
+ Instead of directly modifying the base files in tests/resources, create copies of these files in each test file's setup and delete them in the teardown phase. This ensures that the original resources remain intact and unmodified after running the tests.
82
+
83
+ ### Running Unit Test Cases
84
+ Before running the tests, make sure you have:
85
+ 1. Built the RS2 library as explained in the [Build](#build) section.
86
+ 2. Started the RS2 Modeler.
87
+ 3. Started the RS2 Interpreter.
88
+ 4. Started the Server on both the RS2 Modeler and RS2 Interpreter. Select ```DeveloperApp > Start Server``` in each program.
89
+
90
+ To run all the tests, navigate to the root directory of the project and execute the following command:
91
+ ```python -m unittest discover -s tests```
92
+
93
+ To run an individual test file, navigate to the root directory of the project and execute the following command with the correct filename:
94
+ ```python -m unittest discover -s tests -p "<sampleTestFile>.py"```
95
+
96
+ To run a sub-folder of tests, navigate to the 'tests' folder, and run:
97
+ ```python -m unittest discover -v -s Path/To/Folder```
98
+
99
+ **_NOTE:_** To display additional information on the results of the unit tests, pass the `-v` option into the testing command:
100
+ ```python -m unittest discover -v -s tests```
101
+
102
+ ## Documentation
103
+ The following steps can be taken to regenerate the RS2 Scripting Documentation:
104
+ 1. Create python a virtual environment. Navigate to the root directory of your workspace and run the commands below:
105
+ ```python -m venv venv```
106
+ ```venv/Scripts/activate```
107
+ 2. Rebuild the RS2 library in your virtual environment by following the [Build](#build) section.
108
+ 3. Run the commands below to install Sphinx and the copy button extension:
109
+ ```python -m pip install sphinx```
110
+ ```pip install sphinx-copybutton```
111
+ 4. Install a LaTeX distribution. MiKTeX Reccomended: https://miktex.org/download
112
+ 5. To generate the documentation run the following:
113
+ ```python generateAndBuildDocumentation.py```
114
+ Note: you may have to downgrade your ssl to an earlier version to successfuly generate the documentation ```.tex``` file. If you get an ssl error, run the following command:
115
+ ```pip install urllib3==1.26.5```
116
+ 6. Open TeXworks (via MiKTeX) and open the documentation file:
117
+ ```RS2 Python Client Library\docs\_build\pdf\rs2scriptingclientlibrary.tex```
118
+ 7. In the dropdown menu, set the output to pdfLaTeX.
119
+ 8. Click the play button to generate the documentation file.
120
+ Note: The first time you generate documentation using TeXworks, a package installation window will appear indicating that numerous packages could not be found. Deselect the "Always show this dialog" checkbox and click the install button.
121
+ 9. The Documentation in PDF format will be located here: ```RS2 Python Client Library\docs/_build/pdf/rs2scriptingclientlibrary.pdf```
122
+
123
+ ### Adding To Documentation
124
+ The following steps can be taken to add a new proxy object to the autogenerated documentation:
125
+ 1. Ensure automatic generation of the proxy object python files has been completed for the new proxy object.
126
+ 2. To include an example code snippet, ensure a docstring is being generated at the top of the base proxy object ```.py``` file, which will link to the example.
127
+ See Below:
128
+ ```
129
+ """
130
+ :ref:`Bolt Example`
131
+ """
132
+ ```
133
+ 3. Add your example code snippet to ```C:\Users\CarterComish\source\repos\RS2 Python Client Library\docs\example_code```
134
+ 4. Open examples.rst and following the format of the existing example links, add a link to your code example. Ensure that your link label matches the link label being generated in Step 2.
135
+ See Below:
136
+ ```
137
+ .. _Bolt Example:
138
+ ```
139
+ 5. Follow the steps in [Documentation](#documentation) to regenerate the new documentaiton.
140
+
141
+ ## Contribution Guidelines
142
+ Contributions are welcomed to improve RS2's Scripting Features. To make a contribution, follow the guidelines below:
143
+ 1. **Make Changes:** Start by making the necessary changes to the relevant `.py` file(s) to address the task or implement new features.
144
+ 2. **Install Dependencies:** Install the required dependencies specified in the `requirements.txt` file, as explained in the [Build](#build) section. It is recommended that these dependencies be installed within a virtual environment.
145
+ 3. **Python Interpreter:** Select the same Python interpreter used to install the package. You can specify the interpreter in your virtual environment or project settings.
146
+ 4. **Testing:** Thoroughly test your changes to ensure they meet the project's requirements and do not introduce regressions. Consult the [Unit Testing](#unit-testing) section for more information. Include additional test cases to cover modifications to the project.
147
+ 5. **Pull Request:** After thorough testing and review, submit a pull request which describes the purpose of your changes. After review and approval, merge your changes into the main branch.
@@ -0,0 +1,130 @@
1
+ ## Introduction
2
+ This project is a library that can be used to interact with RS2 through python.
3
+
4
+ ### Goal
5
+ Each function exposed corresponds to an equivalent operation you could have done through the UI.
6
+ Using this idea, the user should be able to edit models and get results without having to go through the UI at all.
7
+ Although only a limited set of functionality is exposed for now, some basic workflows should still be possible. For a list of the functionality we have so far, see [Exposed Functionality](#exposed-functionality).
8
+
9
+ ### Python UI equivalents
10
+ Events and workflows done in the UI will have equivalents in the python library.
11
+ Wherever a dialog is shown in the UI, there will be an equivalent class with methods that mimick the dialog's behavior.
12
+ Wherever a warning or error dialog is displayed, an exception will be thrown, or a warning will be displayed in python instead.
13
+ Wherever you can select and manipulate an entity, identifiers can be used in the library to get references to those entities in python and objects will be constructed to help you interface with them.
14
+
15
+ ### How it works
16
+ Each function in the library is a wrapper to make an api call to the Application.
17
+ Objects retrieved through function calls will often not contain any data themselves, but will instead be proxies, allowing you to get information from the objects in the application.
18
+ For this reason, debugging will sometimes be tricky, as not all data will always be available for you to inspect unless you get it and assign it to a variable yourself.
19
+
20
+ ### Warnings
21
+ References can be *invalidated* whenever the corresponding object in the application is destroyed or reloaded. You will need to watch out for expired referenecs and renew them when needed as it can cause crashes or incorrect results if not managed properly. Functions that invalidate objects will always be marked with a warning and will indicate which objects should be re-loaded.
22
+
23
+ ## Exposed Functionality
24
+ The current set of functionality exposed is limited. With this version of the library, you can:
25
+ - Manage files through Open, Close, Save and Compute
26
+ - Modfy any Property value and stage factor, except for some user defined materials and statistical properties.
27
+ - Get any Mesh result, support result, SSR Critical SRF and query result.
28
+ - Add and remove queries (material, history, time)
29
+
30
+ ## Getting Started
31
+
32
+ **Getting started guide**
33
+ <!---TODO: add link-->
34
+ **First Tutorial**
35
+ <!---TODO: add link-->
36
+
37
+ # For Contributors:
38
+
39
+ ## Build
40
+ Following the steps to this guide: https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives
41
+ 1. Run the command below to install the python build module.
42
+ ```python -m pip install --upgrade build```
43
+ 2. Run this command from the same directory where pyproject.toml is located:
44
+ ```python -m build```
45
+ 3. Run the command below. After installing, a code will be displayed in the terminal. Using a web browser, go to https://www.microsoft.com/devicelogin, where you will be prompted to enter the code.
46
+ ```pip install keyring artifacts-keyring```
47
+ 4. A 'dist' folder should be generated with a .whl file. You can then run the command below to install the project and its dependencies
48
+ ```pip install -r requirements.txt```
49
+
50
+ *If the client library has been altered or updated, run the commands below to force reinstallation of the packages so that your environment is up to date.*
51
+ 1. ```python -m build```
52
+ 2. ```pip install -r requirements.txt --force-reinstall```
53
+
54
+ ## Unit Testing
55
+
56
+ To ensure the project's functionality and maintain code quality, a test suite using the `unittest` framework has been implemented. The documentation for `unittest` can be found at the following link: https://docs.python.org/3/library/unittest.html
57
+
58
+ ### Creating Unit Tests
59
+ **Directory Structure:**
60
+ - Place new .py files for unit testing in the tests directory.
61
+ - Save any RS2 files required for testing in the tests/resources directory.
62
+
63
+ **Handling Test Resources:**
64
+ Instead of directly modifying the base files in tests/resources, create copies of these files in each test file's setup and delete them in the teardown phase. This ensures that the original resources remain intact and unmodified after running the tests.
65
+
66
+ ### Running Unit Test Cases
67
+ Before running the tests, make sure you have:
68
+ 1. Built the RS2 library as explained in the [Build](#build) section.
69
+ 2. Started the RS2 Modeler.
70
+ 3. Started the RS2 Interpreter.
71
+ 4. Started the Server on both the RS2 Modeler and RS2 Interpreter. Select ```DeveloperApp > Start Server``` in each program.
72
+
73
+ To run all the tests, navigate to the root directory of the project and execute the following command:
74
+ ```python -m unittest discover -s tests```
75
+
76
+ To run an individual test file, navigate to the root directory of the project and execute the following command with the correct filename:
77
+ ```python -m unittest discover -s tests -p "<sampleTestFile>.py"```
78
+
79
+ To run a sub-folder of tests, navigate to the 'tests' folder, and run:
80
+ ```python -m unittest discover -v -s Path/To/Folder```
81
+
82
+ **_NOTE:_** To display additional information on the results of the unit tests, pass the `-v` option into the testing command:
83
+ ```python -m unittest discover -v -s tests```
84
+
85
+ ## Documentation
86
+ The following steps can be taken to regenerate the RS2 Scripting Documentation:
87
+ 1. Create python a virtual environment. Navigate to the root directory of your workspace and run the commands below:
88
+ ```python -m venv venv```
89
+ ```venv/Scripts/activate```
90
+ 2. Rebuild the RS2 library in your virtual environment by following the [Build](#build) section.
91
+ 3. Run the commands below to install Sphinx and the copy button extension:
92
+ ```python -m pip install sphinx```
93
+ ```pip install sphinx-copybutton```
94
+ 4. Install a LaTeX distribution. MiKTeX Reccomended: https://miktex.org/download
95
+ 5. To generate the documentation run the following:
96
+ ```python generateAndBuildDocumentation.py```
97
+ Note: you may have to downgrade your ssl to an earlier version to successfuly generate the documentation ```.tex``` file. If you get an ssl error, run the following command:
98
+ ```pip install urllib3==1.26.5```
99
+ 6. Open TeXworks (via MiKTeX) and open the documentation file:
100
+ ```RS2 Python Client Library\docs\_build\pdf\rs2scriptingclientlibrary.tex```
101
+ 7. In the dropdown menu, set the output to pdfLaTeX.
102
+ 8. Click the play button to generate the documentation file.
103
+ Note: The first time you generate documentation using TeXworks, a package installation window will appear indicating that numerous packages could not be found. Deselect the "Always show this dialog" checkbox and click the install button.
104
+ 9. The Documentation in PDF format will be located here: ```RS2 Python Client Library\docs/_build/pdf/rs2scriptingclientlibrary.pdf```
105
+
106
+ ### Adding To Documentation
107
+ The following steps can be taken to add a new proxy object to the autogenerated documentation:
108
+ 1. Ensure automatic generation of the proxy object python files has been completed for the new proxy object.
109
+ 2. To include an example code snippet, ensure a docstring is being generated at the top of the base proxy object ```.py``` file, which will link to the example.
110
+ See Below:
111
+ ```
112
+ """
113
+ :ref:`Bolt Example`
114
+ """
115
+ ```
116
+ 3. Add your example code snippet to ```C:\Users\CarterComish\source\repos\RS2 Python Client Library\docs\example_code```
117
+ 4. Open examples.rst and following the format of the existing example links, add a link to your code example. Ensure that your link label matches the link label being generated in Step 2.
118
+ See Below:
119
+ ```
120
+ .. _Bolt Example:
121
+ ```
122
+ 5. Follow the steps in [Documentation](#documentation) to regenerate the new documentaiton.
123
+
124
+ ## Contribution Guidelines
125
+ Contributions are welcomed to improve RS2's Scripting Features. To make a contribution, follow the guidelines below:
126
+ 1. **Make Changes:** Start by making the necessary changes to the relevant `.py` file(s) to address the task or implement new features.
127
+ 2. **Install Dependencies:** Install the required dependencies specified in the `requirements.txt` file, as explained in the [Build](#build) section. It is recommended that these dependencies be installed within a virtual environment.
128
+ 3. **Python Interpreter:** Select the same Python interpreter used to install the package. You can specify the interpreter in your virtual environment or project settings.
129
+ 4. **Testing:** Thoroughly test your changes to ensure they meet the project's requirements and do not introduce regressions. Consult the [Unit Testing](#unit-testing) section for more information. Include additional test cases to cover modifications to the project.
130
+ 5. **Pull Request:** After thorough testing and review, submit a pull request which describes the purpose of your changes. After review and approval, merge your changes into the main branch.
@@ -0,0 +1,27 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "RS2Scripting"
7
+ version = "11.23.0"
8
+ dependencies = [
9
+ "rsmessages == 0.0.2"
10
+ ]
11
+ authors = [
12
+ { name="Rocscience"},
13
+ ]
14
+ description = "Client library for interacting with RS2 through python"
15
+ readme = "README.md"
16
+ requires-python = ">=3.7"
17
+ classifiers = [
18
+ "Programming Language :: Python :: 3",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Topic :: Scientific/Engineering",
21
+ ]
22
+ license = {text = "MIT License"}
23
+ keywords = ["Rocscience", "RS2", "Scripting", "RocScript", "Geotechnical", "Finite Element Analysis", "FEM", "2D"]
24
+
25
+ [project.urls]
26
+ Homepage = "https://www.rocscience.com/software/rs2"
27
+ Documentation = "https://www.rocscience.com/help/rs2/overview"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,147 @@
1
+ Metadata-Version: 2.1
2
+ Name: RS2Scripting
3
+ Version: 11.23.0
4
+ Summary: Client library for interacting with RS2 through python
5
+ Author: Rocscience
6
+ License: MIT License
7
+ Project-URL: Homepage, https://www.rocscience.com/software/rs2
8
+ Project-URL: Documentation, https://www.rocscience.com/help/rs2/overview
9
+ Keywords: Rocscience,RS2,Scripting,RocScript,Geotechnical,Finite Element Analysis,FEM,2D
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Topic :: Scientific/Engineering
13
+ Requires-Python: >=3.7
14
+ Description-Content-Type: text/markdown
15
+ License-File: License.txt
16
+ Requires-Dist: rsmessages==0.0.2
17
+
18
+ ## Introduction
19
+ This project is a library that can be used to interact with RS2 through python.
20
+
21
+ ### Goal
22
+ Each function exposed corresponds to an equivalent operation you could have done through the UI.
23
+ Using this idea, the user should be able to edit models and get results without having to go through the UI at all.
24
+ Although only a limited set of functionality is exposed for now, some basic workflows should still be possible. For a list of the functionality we have so far, see [Exposed Functionality](#exposed-functionality).
25
+
26
+ ### Python UI equivalents
27
+ Events and workflows done in the UI will have equivalents in the python library.
28
+ Wherever a dialog is shown in the UI, there will be an equivalent class with methods that mimick the dialog's behavior.
29
+ Wherever a warning or error dialog is displayed, an exception will be thrown, or a warning will be displayed in python instead.
30
+ Wherever you can select and manipulate an entity, identifiers can be used in the library to get references to those entities in python and objects will be constructed to help you interface with them.
31
+
32
+ ### How it works
33
+ Each function in the library is a wrapper to make an api call to the Application.
34
+ Objects retrieved through function calls will often not contain any data themselves, but will instead be proxies, allowing you to get information from the objects in the application.
35
+ For this reason, debugging will sometimes be tricky, as not all data will always be available for you to inspect unless you get it and assign it to a variable yourself.
36
+
37
+ ### Warnings
38
+ References can be *invalidated* whenever the corresponding object in the application is destroyed or reloaded. You will need to watch out for expired referenecs and renew them when needed as it can cause crashes or incorrect results if not managed properly. Functions that invalidate objects will always be marked with a warning and will indicate which objects should be re-loaded.
39
+
40
+ ## Exposed Functionality
41
+ The current set of functionality exposed is limited. With this version of the library, you can:
42
+ - Manage files through Open, Close, Save and Compute
43
+ - Modfy any Property value and stage factor, except for some user defined materials and statistical properties.
44
+ - Get any Mesh result, support result, SSR Critical SRF and query result.
45
+ - Add and remove queries (material, history, time)
46
+
47
+ ## Getting Started
48
+
49
+ **Getting started guide**
50
+ <!---TODO: add link-->
51
+ **First Tutorial**
52
+ <!---TODO: add link-->
53
+
54
+ # For Contributors:
55
+
56
+ ## Build
57
+ Following the steps to this guide: https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives
58
+ 1. Run the command below to install the python build module.
59
+ ```python -m pip install --upgrade build```
60
+ 2. Run this command from the same directory where pyproject.toml is located:
61
+ ```python -m build```
62
+ 3. Run the command below. After installing, a code will be displayed in the terminal. Using a web browser, go to https://www.microsoft.com/devicelogin, where you will be prompted to enter the code.
63
+ ```pip install keyring artifacts-keyring```
64
+ 4. A 'dist' folder should be generated with a .whl file. You can then run the command below to install the project and its dependencies
65
+ ```pip install -r requirements.txt```
66
+
67
+ *If the client library has been altered or updated, run the commands below to force reinstallation of the packages so that your environment is up to date.*
68
+ 1. ```python -m build```
69
+ 2. ```pip install -r requirements.txt --force-reinstall```
70
+
71
+ ## Unit Testing
72
+
73
+ To ensure the project's functionality and maintain code quality, a test suite using the `unittest` framework has been implemented. The documentation for `unittest` can be found at the following link: https://docs.python.org/3/library/unittest.html
74
+
75
+ ### Creating Unit Tests
76
+ **Directory Structure:**
77
+ - Place new .py files for unit testing in the tests directory.
78
+ - Save any RS2 files required for testing in the tests/resources directory.
79
+
80
+ **Handling Test Resources:**
81
+ Instead of directly modifying the base files in tests/resources, create copies of these files in each test file's setup and delete them in the teardown phase. This ensures that the original resources remain intact and unmodified after running the tests.
82
+
83
+ ### Running Unit Test Cases
84
+ Before running the tests, make sure you have:
85
+ 1. Built the RS2 library as explained in the [Build](#build) section.
86
+ 2. Started the RS2 Modeler.
87
+ 3. Started the RS2 Interpreter.
88
+ 4. Started the Server on both the RS2 Modeler and RS2 Interpreter. Select ```DeveloperApp > Start Server``` in each program.
89
+
90
+ To run all the tests, navigate to the root directory of the project and execute the following command:
91
+ ```python -m unittest discover -s tests```
92
+
93
+ To run an individual test file, navigate to the root directory of the project and execute the following command with the correct filename:
94
+ ```python -m unittest discover -s tests -p "<sampleTestFile>.py"```
95
+
96
+ To run a sub-folder of tests, navigate to the 'tests' folder, and run:
97
+ ```python -m unittest discover -v -s Path/To/Folder```
98
+
99
+ **_NOTE:_** To display additional information on the results of the unit tests, pass the `-v` option into the testing command:
100
+ ```python -m unittest discover -v -s tests```
101
+
102
+ ## Documentation
103
+ The following steps can be taken to regenerate the RS2 Scripting Documentation:
104
+ 1. Create python a virtual environment. Navigate to the root directory of your workspace and run the commands below:
105
+ ```python -m venv venv```
106
+ ```venv/Scripts/activate```
107
+ 2. Rebuild the RS2 library in your virtual environment by following the [Build](#build) section.
108
+ 3. Run the commands below to install Sphinx and the copy button extension:
109
+ ```python -m pip install sphinx```
110
+ ```pip install sphinx-copybutton```
111
+ 4. Install a LaTeX distribution. MiKTeX Reccomended: https://miktex.org/download
112
+ 5. To generate the documentation run the following:
113
+ ```python generateAndBuildDocumentation.py```
114
+ Note: you may have to downgrade your ssl to an earlier version to successfuly generate the documentation ```.tex``` file. If you get an ssl error, run the following command:
115
+ ```pip install urllib3==1.26.5```
116
+ 6. Open TeXworks (via MiKTeX) and open the documentation file:
117
+ ```RS2 Python Client Library\docs\_build\pdf\rs2scriptingclientlibrary.tex```
118
+ 7. In the dropdown menu, set the output to pdfLaTeX.
119
+ 8. Click the play button to generate the documentation file.
120
+ Note: The first time you generate documentation using TeXworks, a package installation window will appear indicating that numerous packages could not be found. Deselect the "Always show this dialog" checkbox and click the install button.
121
+ 9. The Documentation in PDF format will be located here: ```RS2 Python Client Library\docs/_build/pdf/rs2scriptingclientlibrary.pdf```
122
+
123
+ ### Adding To Documentation
124
+ The following steps can be taken to add a new proxy object to the autogenerated documentation:
125
+ 1. Ensure automatic generation of the proxy object python files has been completed for the new proxy object.
126
+ 2. To include an example code snippet, ensure a docstring is being generated at the top of the base proxy object ```.py``` file, which will link to the example.
127
+ See Below:
128
+ ```
129
+ """
130
+ :ref:`Bolt Example`
131
+ """
132
+ ```
133
+ 3. Add your example code snippet to ```C:\Users\CarterComish\source\repos\RS2 Python Client Library\docs\example_code```
134
+ 4. Open examples.rst and following the format of the existing example links, add a link to your code example. Ensure that your link label matches the link label being generated in Step 2.
135
+ See Below:
136
+ ```
137
+ .. _Bolt Example:
138
+ ```
139
+ 5. Follow the steps in [Documentation](#documentation) to regenerate the new documentaiton.
140
+
141
+ ## Contribution Guidelines
142
+ Contributions are welcomed to improve RS2's Scripting Features. To make a contribution, follow the guidelines below:
143
+ 1. **Make Changes:** Start by making the necessary changes to the relevant `.py` file(s) to address the task or implement new features.
144
+ 2. **Install Dependencies:** Install the required dependencies specified in the `requirements.txt` file, as explained in the [Build](#build) section. It is recommended that these dependencies be installed within a virtual environment.
145
+ 3. **Python Interpreter:** Select the same Python interpreter used to install the package. You can specify the interpreter in your virtual environment or project settings.
146
+ 4. **Testing:** Thoroughly test your changes to ensure they meet the project's requirements and do not introduce regressions. Consult the [Unit Testing](#unit-testing) section for more information. Include additional test cases to cover modifications to the project.
147
+ 5. **Pull Request:** After thorough testing and review, submit a pull request which describes the purpose of your changes. After review and approval, merge your changes into the main branch.