torchphysics 1.0.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 (189) hide show
  1. torchphysics-1.0.0/.coveragerc +28 -0
  2. torchphysics-1.0.0/.githooks/prepare-commit-msg +22 -0
  3. torchphysics-1.0.0/.github/workflows/python-package.yml +41 -0
  4. torchphysics-1.0.0/.gitignore +61 -0
  5. torchphysics-1.0.0/.readthedocs.yml +22 -0
  6. torchphysics-1.0.0/AUTHORS.rst +6 -0
  7. torchphysics-1.0.0/CHANGELOG.rst +9 -0
  8. torchphysics-1.0.0/CONTRIBUTING.md +135 -0
  9. torchphysics-1.0.0/LICENSE.txt +201 -0
  10. torchphysics-1.0.0/NOTICE +31 -0
  11. torchphysics-1.0.0/PKG-INFO +151 -0
  12. torchphysics-1.0.0/README.rst +130 -0
  13. torchphysics-1.0.0/batch_scripts/create_environment.bat +9 -0
  14. torchphysics-1.0.0/batch_scripts/environment.yml +23 -0
  15. torchphysics-1.0.0/batch_scripts/start_Jupyter_notebook.bat +3 -0
  16. torchphysics-1.0.0/batch_scripts/start_spyder.bat +3 -0
  17. torchphysics-1.0.0/docs/Makefile +29 -0
  18. torchphysics-1.0.0/docs/_static/.gitignore +1 -0
  19. torchphysics-1.0.0/docs/authors.rst +2 -0
  20. torchphysics-1.0.0/docs/changelog.rst +2 -0
  21. torchphysics-1.0.0/docs/conf.py +290 -0
  22. torchphysics-1.0.0/docs/examples.rst +145 -0
  23. torchphysics-1.0.0/docs/index.rst +70 -0
  24. torchphysics-1.0.0/docs/license.rst +7 -0
  25. torchphysics-1.0.0/docs/readme.rst +2 -0
  26. torchphysics-1.0.0/docs/requirements.txt +16 -0
  27. torchphysics-1.0.0/docs/tutorial/condition_tutorial.rst +125 -0
  28. torchphysics-1.0.0/docs/tutorial/differentialoperators.rst +79 -0
  29. torchphysics-1.0.0/docs/tutorial/external_domains.rst +118 -0
  30. torchphysics-1.0.0/docs/tutorial/model_creation.rst +76 -0
  31. torchphysics-1.0.0/docs/tutorial/pictures/L_domain.png +0 -0
  32. torchphysics-1.0.0/docs/tutorial/pictures/L_slice.png +0 -0
  33. torchphysics-1.0.0/docs/tutorial/pictures/complex_domain.png +0 -0
  34. torchphysics-1.0.0/docs/tutorial/pictures/cylinder.png +0 -0
  35. torchphysics-1.0.0/docs/tutorial/pictures/error.png +0 -0
  36. torchphysics-1.0.0/docs/tutorial/pictures/operation.png +0 -0
  37. torchphysics-1.0.0/docs/tutorial/pictures/polygon.png +0 -0
  38. torchphysics-1.0.0/docs/tutorial/pictures/rect_circle_domain.png +0 -0
  39. torchphysics-1.0.0/docs/tutorial/pictures/sampler_combis.PNG +0 -0
  40. torchphysics-1.0.0/docs/tutorial/pictures/simplex.png +0 -0
  41. torchphysics-1.0.0/docs/tutorial/pictures/solution.png +0 -0
  42. torchphysics-1.0.0/docs/tutorial/pictures/torchphysics_structure.png +0 -0
  43. torchphysics-1.0.0/docs/tutorial/plotting.rst +75 -0
  44. torchphysics-1.0.0/docs/tutorial/sampler_tutorial.rst +136 -0
  45. torchphysics-1.0.0/docs/tutorial/solve_pde.rst +212 -0
  46. torchphysics-1.0.0/docs/tutorial/solver_info.rst +69 -0
  47. torchphysics-1.0.0/docs/tutorial/tutorial_domain_basics.rst +149 -0
  48. torchphysics-1.0.0/docs/tutorial/tutorial_spaces_and_points.rst +101 -0
  49. torchphysics-1.0.0/docs/tutorial/tutorial_start.rst +69 -0
  50. torchphysics-1.0.0/examples/deeponet/ode.ipynb +431 -0
  51. torchphysics-1.0.0/examples/deeponet/oscillator.ipynb +464 -0
  52. torchphysics-1.0.0/examples/deepritz/corner_pde.ipynb +308 -0
  53. torchphysics-1.0.0/examples/deepritz/poisson-equation.ipynb +330 -0
  54. torchphysics-1.0.0/examples/fdm_heat_equation.py +150 -0
  55. torchphysics-1.0.0/examples/pinn/data/heat-eq-inverse-data.npy +0 -0
  56. torchphysics-1.0.0/examples/pinn/exp-function-with-param.ipynb +297 -0
  57. torchphysics-1.0.0/examples/pinn/hard-constrains.ipynb +556 -0
  58. torchphysics-1.0.0/examples/pinn/heat-equation.ipynb +412 -0
  59. torchphysics-1.0.0/examples/pinn/interface-jump.ipynb +482 -0
  60. torchphysics-1.0.0/examples/pinn/inverse-heat-eq.gif +0 -0
  61. torchphysics-1.0.0/examples/pinn/inverse-heat-equation-D-function.ipynb +502 -0
  62. torchphysics-1.0.0/examples/pinn/inverse-heat-equation.ipynb +348 -0
  63. torchphysics-1.0.0/examples/pinn/moving-heat-eq.gif +0 -0
  64. torchphysics-1.0.0/examples/pinn/moving-heat-equation.ipynb +498 -0
  65. torchphysics-1.0.0/examples/pinn/periodic-boundary-problem.ipynb +352 -0
  66. torchphysics-1.0.0/examples/pinn/poisson-equation.ipynb +340 -0
  67. torchphysics-1.0.0/examples/pinn/poisson-with-input-params.ipynb +441 -0
  68. torchphysics-1.0.0/examples/pinn/signorini-equation.ipynb +465 -0
  69. torchphysics-1.0.0/examples/pinn/singular-boundary-problem.ipynb +386 -0
  70. torchphysics-1.0.0/examples/tutorial/Introduction_Tutorial_PINNs.ipynb +977 -0
  71. torchphysics-1.0.0/examples/tutorial/L_plate.stl +0 -0
  72. torchphysics-1.0.0/examples/tutorial/Tutorial_PINNs_Parameter_Dependency.ipynb +546 -0
  73. torchphysics-1.0.0/examples/tutorial/domain_creation.ipynb +255 -0
  74. torchphysics-1.0.0/examples/tutorial/polygons_external_objects.ipynb +227 -0
  75. torchphysics-1.0.0/examples/tutorial/solve_pde.ipynb +487 -0
  76. torchphysics-1.0.0/examples/tutorial/solve_pde_drm.ipynb +485 -0
  77. torchphysics-1.0.0/experiments/burgers_equation.ipynb +345 -0
  78. torchphysics-1.0.0/experiments/geometry/d20_voll.stl +0 -0
  79. torchphysics-1.0.0/experiments/geometry/heat_equation_D=10.gif +0 -0
  80. torchphysics-1.0.0/experiments/geometry/heat_equation_bearing.ipynb +410 -0
  81. torchphysics-1.0.0/experiments/geometry/heat_equation_bearing_orig.ipynb +413 -0
  82. torchphysics-1.0.0/experiments/geometry/spalt_ex2_01.stl +0 -0
  83. torchphysics-1.0.0/pyproject.toml +8 -0
  84. torchphysics-1.0.0/requirements.txt +10 -0
  85. torchphysics-1.0.0/setup.cfg +90 -0
  86. torchphysics-1.0.0/setup.py +21 -0
  87. torchphysics-1.0.0/src/torchphysics/__init__.py +23 -0
  88. torchphysics-1.0.0/src/torchphysics/models/__init__.py +25 -0
  89. torchphysics-1.0.0/src/torchphysics/models/activation_fn.py +83 -0
  90. torchphysics-1.0.0/src/torchphysics/models/deeponet/branchnets.py +226 -0
  91. torchphysics-1.0.0/src/torchphysics/models/deeponet/deeponet.py +98 -0
  92. torchphysics-1.0.0/src/torchphysics/models/deeponet/layers.py +97 -0
  93. torchphysics-1.0.0/src/torchphysics/models/deeponet/trunknets.py +110 -0
  94. torchphysics-1.0.0/src/torchphysics/models/deepritz.py +48 -0
  95. torchphysics-1.0.0/src/torchphysics/models/fcn.py +139 -0
  96. torchphysics-1.0.0/src/torchphysics/models/model.py +155 -0
  97. torchphysics-1.0.0/src/torchphysics/models/newmodel.py +274 -0
  98. torchphysics-1.0.0/src/torchphysics/models/parameter.py +31 -0
  99. torchphysics-1.0.0/src/torchphysics/models/qres.py +110 -0
  100. torchphysics-1.0.0/src/torchphysics/problem/__init__.py +2 -0
  101. torchphysics-1.0.0/src/torchphysics/problem/conditions/__init__.py +23 -0
  102. torchphysics-1.0.0/src/torchphysics/problem/conditions/condition.py +728 -0
  103. torchphysics-1.0.0/src/torchphysics/problem/conditions/deeponet_condition.py +175 -0
  104. torchphysics-1.0.0/src/torchphysics/problem/domains/__init__.py +39 -0
  105. torchphysics-1.0.0/src/torchphysics/problem/domains/domain.py +328 -0
  106. torchphysics-1.0.0/src/torchphysics/problem/domains/domain0D/__init__.py +1 -0
  107. torchphysics-1.0.0/src/torchphysics/problem/domains/domain0D/point.py +78 -0
  108. torchphysics-1.0.0/src/torchphysics/problem/domains/domain1D/__init__.py +1 -0
  109. torchphysics-1.0.0/src/torchphysics/problem/domains/domain1D/interval.py +179 -0
  110. torchphysics-1.0.0/src/torchphysics/problem/domains/domain2D/__init__.py +4 -0
  111. torchphysics-1.0.0/src/torchphysics/problem/domains/domain2D/circle.py +149 -0
  112. torchphysics-1.0.0/src/torchphysics/problem/domains/domain2D/parallelogram.py +264 -0
  113. torchphysics-1.0.0/src/torchphysics/problem/domains/domain2D/shapely_polygon.py +301 -0
  114. torchphysics-1.0.0/src/torchphysics/problem/domains/domain2D/triangle.py +276 -0
  115. torchphysics-1.0.0/src/torchphysics/problem/domains/domain3D/__init__.py +1 -0
  116. torchphysics-1.0.0/src/torchphysics/problem/domains/domain3D/sphere.py +179 -0
  117. torchphysics-1.0.0/src/torchphysics/problem/domains/domain3D/trimesh_polyhedron.py +250 -0
  118. torchphysics-1.0.0/src/torchphysics/problem/domains/domainoperations/cut.py +166 -0
  119. torchphysics-1.0.0/src/torchphysics/problem/domains/domainoperations/intersection.py +165 -0
  120. torchphysics-1.0.0/src/torchphysics/problem/domains/domainoperations/product.py +222 -0
  121. torchphysics-1.0.0/src/torchphysics/problem/domains/domainoperations/rotate.py +185 -0
  122. torchphysics-1.0.0/src/torchphysics/problem/domains/domainoperations/sampler_helper.py +249 -0
  123. torchphysics-1.0.0/src/torchphysics/problem/domains/domainoperations/translate.py +90 -0
  124. torchphysics-1.0.0/src/torchphysics/problem/domains/domainoperations/union.py +223 -0
  125. torchphysics-1.0.0/src/torchphysics/problem/domains/functionsets/__init__.py +5 -0
  126. torchphysics-1.0.0/src/torchphysics/problem/domains/functionsets/functionset.py +182 -0
  127. torchphysics-1.0.0/src/torchphysics/problem/samplers/__init__.py +39 -0
  128. torchphysics-1.0.0/src/torchphysics/problem/samplers/data_samplers.py +33 -0
  129. torchphysics-1.0.0/src/torchphysics/problem/samplers/grid_samplers.py +139 -0
  130. torchphysics-1.0.0/src/torchphysics/problem/samplers/plot_samplers.py +222 -0
  131. torchphysics-1.0.0/src/torchphysics/problem/samplers/random_samplers.py +310 -0
  132. torchphysics-1.0.0/src/torchphysics/problem/samplers/sampler_base.py +420 -0
  133. torchphysics-1.0.0/src/torchphysics/problem/spaces/__init__.py +17 -0
  134. torchphysics-1.0.0/src/torchphysics/problem/spaces/functionspace.py +17 -0
  135. torchphysics-1.0.0/src/torchphysics/problem/spaces/points.py +376 -0
  136. torchphysics-1.0.0/src/torchphysics/problem/spaces/space.py +198 -0
  137. torchphysics-1.0.0/src/torchphysics/solver.py +115 -0
  138. torchphysics-1.0.0/src/torchphysics/utils/__init__.py +27 -0
  139. torchphysics-1.0.0/src/torchphysics/utils/callbacks.py +151 -0
  140. torchphysics-1.0.0/src/torchphysics/utils/data/__init__.py +2 -0
  141. torchphysics-1.0.0/src/torchphysics/utils/data/dataloader.py +89 -0
  142. torchphysics-1.0.0/src/torchphysics/utils/data/deeponet_dataloader.py +260 -0
  143. torchphysics-1.0.0/src/torchphysics/utils/differentialoperators.py +383 -0
  144. torchphysics-1.0.0/src/torchphysics/utils/evaluation.py +59 -0
  145. torchphysics-1.0.0/src/torchphysics/utils/plotting/__init__.py +12 -0
  146. torchphysics-1.0.0/src/torchphysics/utils/plotting/animation.py +374 -0
  147. torchphysics-1.0.0/src/torchphysics/utils/plotting/plot_functions.py +446 -0
  148. torchphysics-1.0.0/src/torchphysics/utils/plotting/scatter_points.py +77 -0
  149. torchphysics-1.0.0/src/torchphysics/utils/user_fun.py +313 -0
  150. torchphysics-1.0.0/src/torchphysics.egg-info/PKG-INFO +151 -0
  151. torchphysics-1.0.0/src/torchphysics.egg-info/SOURCES.txt +188 -0
  152. torchphysics-1.0.0/src/torchphysics.egg-info/dependency_links.txt +1 -0
  153. torchphysics-1.0.0/src/torchphysics.egg-info/not-zip-safe +1 -0
  154. torchphysics-1.0.0/src/torchphysics.egg-info/requires.txt +19 -0
  155. torchphysics-1.0.0/src/torchphysics.egg-info/top_level.txt +1 -0
  156. torchphysics-1.0.0/tests/conftest.py +10 -0
  157. torchphysics-1.0.0/tests/test_conditions.py +244 -0
  158. torchphysics-1.0.0/tests/test_data_utils.py +51 -0
  159. torchphysics-1.0.0/tests/test_differentialoperators.py +817 -0
  160. torchphysics-1.0.0/tests/test_evaluation.py +31 -0
  161. torchphysics-1.0.0/tests/test_points.py +340 -0
  162. torchphysics-1.0.0/tests/test_samplers.py +588 -0
  163. torchphysics-1.0.0/tests/test_spaces.py +125 -0
  164. torchphysics-1.0.0/tests/test_user_function.py +184 -0
  165. torchphysics-1.0.0/tests/tests_domain/test_domain0D.py +225 -0
  166. torchphysics-1.0.0/tests/tests_domain/test_domain1D.py +337 -0
  167. torchphysics-1.0.0/tests/tests_domain/test_domain2D.py +907 -0
  168. torchphysics-1.0.0/tests/tests_domain/test_domain2D_shapely.py +235 -0
  169. torchphysics-1.0.0/tests/tests_domain/test_domain3D.py +263 -0
  170. torchphysics-1.0.0/tests/tests_domain/test_domain3D_trimesh.py +285 -0
  171. torchphysics-1.0.0/tests/tests_domain/test_domain_cut.py +394 -0
  172. torchphysics-1.0.0/tests/tests_domain/test_domain_intersection.py +339 -0
  173. torchphysics-1.0.0/tests/tests_domain/test_domain_product.py +247 -0
  174. torchphysics-1.0.0/tests/tests_domain/test_domain_tranforms.py +360 -0
  175. torchphysics-1.0.0/tests/tests_domain/test_domain_union.py +346 -0
  176. torchphysics-1.0.0/tests/tests_functionsets/test_FunctionSetMain.py +162 -0
  177. torchphysics-1.0.0/tests/tests_models/test_activation_fn.py +66 -0
  178. torchphysics-1.0.0/tests/tests_models/test_deep_o_net.py +215 -0
  179. torchphysics-1.0.0/tests/tests_models/test_deepritz.py +32 -0
  180. torchphysics-1.0.0/tests/tests_models/test_fcn.py +66 -0
  181. torchphysics-1.0.0/tests/tests_models/test_model_base.py +156 -0
  182. torchphysics-1.0.0/tests/tests_models/test_parameters.py +18 -0
  183. torchphysics-1.0.0/tests/tests_models/test_qres.py +74 -0
  184. torchphysics-1.0.0/tests/tests_plots/test_animation.py +332 -0
  185. torchphysics-1.0.0/tests/tests_plots/test_plot.py +228 -0
  186. torchphysics-1.0.0/tests/tests_plots/test_scatter.py +26 -0
  187. torchphysics-1.0.0/tests/tests_solver/test_solver.py +54 -0
  188. torchphysics-1.0.0/tests/tests_solver/test_training.py +5 -0
  189. torchphysics-1.0.0/tox.ini +68 -0
@@ -0,0 +1,28 @@
1
+ # .coveragerc to control coverage.py
2
+ [run]
3
+ branch = True
4
+ source = torchphysics
5
+ # omit = bad_file.py
6
+
7
+ [paths]
8
+ source =
9
+ src/
10
+ */site-packages/
11
+
12
+ [report]
13
+ # Regexes for lines to exclude from consideration
14
+ exclude_lines =
15
+ # Have to re-enable the standard pragma
16
+ pragma: no cover
17
+
18
+ # Don't complain about missing debug-only code:
19
+ def __repr__
20
+ if self\.debug
21
+
22
+ # Don't complain if tests don't hit defensive assertion code:
23
+ raise AssertionError
24
+ raise NotImplementedError
25
+
26
+ # Don't complain if non-runnable code isn't run:
27
+ if 0:
28
+ if __name__ == .__main__.:
@@ -0,0 +1,22 @@
1
+ #!/bin/bash
2
+
3
+ COMMIT_MSG_FILE=$1
4
+ COMMIT_SOURCE=$2
5
+ COMMIT_HASH=$3
6
+
7
+ GIT_USER_NAME=`git config user.name`
8
+ GIT_USER_EMAIL=`git config user.email`
9
+
10
+ if grep "^Signed-off-by: " $COMMIT_MSG_FILE
11
+ then
12
+ exit 0
13
+ fi
14
+
15
+ IFS= commit_msg=$(sed '/^#/,$d' $COMMIT_MSG_FILE)
16
+ IFS= commit_hint=$(sed '/^#/,$!d' $COMMIT_MSG_FILE)
17
+
18
+ echo $commit_msg > $COMMIT_MSG_FILE
19
+
20
+ echo -e "\nSigned-off-by:" $GIT_USER_NAME \<$GIT_USER_EMAIL\> "\n" >> $COMMIT_MSG_FILE
21
+
22
+ echo -e $commit_hint >> $COMMIT_MSG_FILE
@@ -0,0 +1,41 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ name: Python package
5
+
6
+ on:
7
+ push:
8
+ branches: '**'
9
+ pull_request:
10
+ branches: [ main ]
11
+
12
+ jobs:
13
+ build:
14
+
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: [3.7, 3.8, 3.9]
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ uses: actions/setup-python@v2
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+ - name: Install dependencies
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ python -m pip install flake8 pytest pytest-cov
31
+ python -m pip install -e .
32
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33
+ - name: Lint with flake8
34
+ run: |
35
+ # stop the build if there are Python syntax errors or undefined names
36
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39
+ - name: Test with pytest
40
+ run: |
41
+ pytest
@@ -0,0 +1,61 @@
1
+ # Temporary and binary files
2
+ *~
3
+ *.py[cod]
4
+ *.so
5
+ *.cfg
6
+ !.isort.cfg
7
+ !setup.cfg
8
+ *.orig
9
+ *.log
10
+ *.pot
11
+ __pycache__/*
12
+ .cache/*
13
+ .*.swp
14
+ */.ipynb_checkpoints/*
15
+ .DS_Store
16
+ *.pt
17
+ # Log folders
18
+ **/lightning_logs/**
19
+ **/fluid_logs/**
20
+ **/SIAM-Darcy/**
21
+ **/SIAM-Poisson/**
22
+ **/bosch/**
23
+ **/Multiscale/**
24
+ # Project files
25
+ .ropeproject
26
+ .project
27
+ .pydevproject
28
+ .settings
29
+ .idea
30
+ .vscode
31
+ tags
32
+
33
+ # Package files
34
+ *.egg
35
+ *.eggs/
36
+ .installed.cfg
37
+ *.egg-info
38
+
39
+ # Unittest and coverage
40
+ htmlcov/*
41
+ .coverage
42
+ .coverage.*
43
+ .tox
44
+ junit*.xml
45
+ coverage.xml
46
+ .pytest_cache/
47
+
48
+ # Build and docs folder/files
49
+ build/*
50
+ dist/*
51
+ sdist/*
52
+ #docs/api/*
53
+ docs/_rst/*
54
+ docs/_build/*
55
+ cover/*
56
+ MANIFEST
57
+
58
+ # Per-project virtualenvs
59
+ .venv*/
60
+ .conda*/
61
+ _venv/
@@ -0,0 +1,22 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Build documentation in the docs/ directory with Sphinx
8
+ sphinx:
9
+ configuration: docs/conf.py
10
+
11
+ # Build documentation with MkDocs
12
+ #mkdocs:
13
+ # configuration: mkdocs.yml
14
+
15
+ # Optionally build your docs in additional formats such as PDF
16
+ formats:
17
+ - pdf
18
+
19
+ python:
20
+ version: 3.8
21
+ install:
22
+ - requirements: docs/requirements.txt
@@ -0,0 +1,6 @@
1
+ ============
2
+ Contributors
3
+ ============
4
+
5
+ * Nick Heilenkötter, nheilenkoetter <nick7@uni-bremen.de>
6
+ * Tom Freudenberg, TomF98 <tomfre@uni-bremen.de>
@@ -0,0 +1,9 @@
1
+ =========
2
+ Changelog
3
+ =========
4
+ All notable changes to this project will be documented in this file.
5
+
6
+
7
+ Version 1.0
8
+ ===========
9
+ First official release of TorchPhysics on PyPI.
@@ -0,0 +1,135 @@
1
+ # Contributing
2
+
3
+ Want to contribute? Great! You can do so through the standard GitHub pull
4
+ request model. For large contributions we do encourage you to file a ticket in
5
+ the GitHub issues tracking system prior to any code development to coordinate
6
+ with the pyLife development team early in the process. Coordinating up
7
+ front helps to avoid frustration later on.
8
+
9
+ Your contribution must be licensed under the Apache-2.0 license, the license
10
+ used by this project.
11
+
12
+ ## Making commits
13
+
14
+ ### Configure your git client
15
+
16
+ Please configure your identity in your git client appropriately. From the git
17
+ command line you can do that using
18
+ ```
19
+ git config user.name <Your Name>
20
+ git config user.email <your-email@...>
21
+ ```
22
+
23
+ ## Add / retain copyright notices
24
+
25
+ Include a copyright notice and license in each new file to be contributed,
26
+ consistent with the style used by this project. If your contribution contains
27
+ code under the copyright of a third party, document its origin, license, and
28
+ copyright holders.
29
+
30
+ ## Sign your work
31
+
32
+ This project tracks patch provenance and licensing using a modified Developer
33
+ Certificate of Origin (DCO; from [OSDL][DCO]) and Signed-off-by tags initially
34
+ developed by the Linux kernel project.
35
+
36
+ ```
37
+
38
+ pyLife Developer's Certificate of Origin. Version 1.1
39
+
40
+ By making a contribution to this project, I certify that:
41
+
42
+ (a) The contribution was created in whole or in part by me and I
43
+ have the right to submit it under the "Apache License, Version 2.0"
44
+ ("Apache-2.0"); or
45
+
46
+ (b) The contribution is based upon previous work that, to the best
47
+ of my knowledge, is covered under an appropriate open source
48
+ license and I have the right under that license to submit that
49
+ work with modifications, whether created in whole or in part
50
+ by me, under the same open source license (unless I am
51
+ permitted to submit under a different license), as indicated
52
+ in the file; or
53
+
54
+ (c) The contribution was provided directly to me by some other
55
+ person who certified (a), (b) or (c) and I have not modified
56
+ it.
57
+
58
+ (d) I understand and agree that this project and the contribution
59
+ are public and that a record of the contribution (including all
60
+ personal information I submit with it, including my sign-off) is
61
+ maintained indefinitely and may be redistributed consistent with
62
+ this project or the open source license(s) involved.
63
+
64
+ (e) I am granting the contribution to this project under the terms of
65
+ Apache-2.0.
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+ ```
69
+
70
+ With the sign-off in a commit message you certify that you authored the patch
71
+ or otherwise have the right to submit it under an open source license. The
72
+ procedure is simple: To certify above pyLife Developer's Certificate of
73
+ Origin 1.1 for your contribution just append a line
74
+
75
+ Signed-off-by: Random J Developer <random@developer.example.org>
76
+
77
+ to every commit message using your real name or your pseudonym and a valid
78
+ email address.
79
+
80
+ If you have set your `user.name` and `user.email` git configs you can
81
+ automatically sign the commit by running the git-commit command with the `-s`
82
+ option. There may be multiple sign-offs if more than one developer was
83
+ involved in authoring the contribution.
84
+
85
+ Another option to automatically add the `Signed-off-by:` is to once use the
86
+ command
87
+ ```
88
+ git config core.hooksPath .githooks
89
+ ```
90
+ in your pyLife working directory. This will then add the `Signed-off-by:` line
91
+ automatically.
92
+
93
+ For a more detailed description of this procedure, please see
94
+ [SubmittingPatches][] which was extracted from the Linux kernel project, and
95
+ which is stored in an external repository.
96
+
97
+ ### Individual vs. Corporate Contributors
98
+
99
+ Often employers or academic institution have ownership over code that is
100
+ written in certain circumstances, so please do due diligence to ensure that
101
+ you have the right to submit the code.
102
+
103
+ If you are a developer who is authorized to contribute to pyLife on
104
+ behalf of your employer, then please use your corporate email address in the
105
+ Signed-off-by tag. Otherwise please use a personal email address.
106
+
107
+ ## Maintain Copyright holder / Contributor list
108
+
109
+ Each contributor is responsible for identifying themselves in the
110
+ [NOTICE](NOTICE) file, the project's list of copyright holders and authors.
111
+ Please add the respective information corresponding to the Signed-off-by tag
112
+ as part of your first pull request.
113
+
114
+ If you are a developer who is authorized to contribute to pyLife on
115
+ behalf of your employer, then add your company / organization to the list of
116
+ copyright holders in the [NOTICE](NOTICE) file. As author of a corporate
117
+ contribution you can also add your name and corporate email address as in the
118
+ Signed-off-by tag.
119
+
120
+ If your contribution is covered by this project's DCO's clause "(c) The
121
+ contribution was provided directly to me by some other person who certified
122
+ (a) or (b) and I have not modified it", please add the appropriate copyright
123
+ holder(s) to the [NOTICE](NOTICE) file as part of your contribution.
124
+
125
+ [pytest]: https://pytest.org
126
+
127
+ [rrugamba]: https://medium.com/@rrugamba/3-laws-of-tdd-58b5ec46a998
128
+
129
+ [CGL]: https://www.git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#_commit_guidelines
130
+
131
+ [git-commit]: https://chris.beams.io/posts/git-commit/
132
+
133
+ [DCO]: http://web.archive.org/web/20070306195036/http://osdlab.org/newsroom/press_releases/2004/2004_05_24_dco.html
134
+
135
+ [SubmittingPatches]: https://github.com/wking/signed-off-by/blob/7d71be37194df05c349157a2161c7534feaf86a4/Documentation/SubmittingPatches
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright {yyyy} {name of copyright owner}
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,31 @@
1
+ # This is the official list of pyLife copyright holders and authors.
2
+ #
3
+ # Often employers or academic institutions have ownership over code that is
4
+ # written in certain circumstances, so please do due diligence to ensure that
5
+ # you have the right to submit the code.
6
+ #
7
+ # When adding J Random Contributor's name to this file, either J's name on its
8
+ # own or J's name associated with J's organization's name should be added,
9
+ # depending on whether J's employer (or academic institution) has ownership
10
+ # over code that is written for this project.
11
+ #
12
+ # How to add names to this file:
13
+ # Individual's name <submission email address>.
14
+ #
15
+ # If Individual's organization is copyright holder of her contributions add the
16
+ # organization's name, optionally also the contributor's name:
17
+ #
18
+ # Organization's name
19
+ # Individual's name <submission corporate email address>
20
+ #
21
+ # Please keep the list sorted.
22
+
23
+ Robert Bosch GmbH
24
+ Felix Hildebrand <Felix.Hildebrand@de.bosch.com>
25
+ Uwe Iben <Uwe.Iben@de.bosch.com>
26
+ Daniel Christopher Kreuter <DanielChristopher.Kreuter@de.bosch.com>
27
+ Johannes Mueller <johannes.mueller4@de.bosch.com>
28
+
29
+ Universität Bremen
30
+ Tom Freudenberg <tomfre@uni-bremen.de>
31
+ Nick Heilenkötter <nick7@uni-bremen.de>