Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
f3c5fbb
initial commit
Dec 18, 2019
b5e1c96
Xarray Anwendung mit Koordinaten
Dec 18, 2019
c220035
flake8
Dec 18, 2019
5ea3f18
pydocstyle update
Dec 18, 2019
f72ef1f
naming convention update
Dec 18, 2019
c6c0871
Add correct badge for docs
vhirtham Dec 20, 2019
c54927c
Add draft version of arc segment rasterization
vhirtham Jan 2, 2020
80f3645
Refine arc segment rasterization
vhirtham Jan 2, 2020
b3bab5c
Optimize arc segment rasterization
vhirtham Jan 2, 2020
4617b9b
Add docstrings to new methods
vhirtham Jan 3, 2020
67a1f72
Add test for arc segments
vhirtham Jan 3, 2020
9a22234
Fix line segment rasterization
vhirtham Jan 3, 2020
1d48039
Add line segment rasterization test
vhirtham Jan 3, 2020
5cd7b79
Fix flake8 errors
vhirtham Jan 3, 2020
f77eb56
Remove unnecessary function from segment base class
vhirtham Jan 3, 2020
6c7dd3b
Remove code dulications
vhirtham Jan 3, 2020
d0254ec
Make rasterize method of line segment static
vhirtham Jan 3, 2020
651dd72
Add some ignored words to typo-ci
vhirtham Jan 3, 2020
37b22bf
Replace branch statement
vhirtham Jan 3, 2020
388bb7d
Merge branch 'master' into geometry
vhirtham Jan 3, 2020
074bc80
Add test for shape rasterization
vhirtham Jan 3, 2020
5775b59
Remove my_funcs package
vhirtham Jan 3, 2020
b224c15
Add point cloud generator package
vhirtham Jan 3, 2020
213da05
Add docstrings
vhirtham Jan 6, 2020
c1d3400
Correct a typo
vhirtham Jan 6, 2020
04e95f4
Add copy_and_reflect method to segments
vhirtham Jan 6, 2020
7c88649
Fix deepsource issues
vhirtham Jan 6, 2020
8b137f2
Remove unnecessary branch
vhirtham Jan 6, 2020
631292d
Fix new codacy issues
vhirtham Jan 6, 2020
ada25ff
Change copy_and_reflect to copy_and_transform
vhirtham Jan 6, 2020
a6c0c4f
Fix flake8 issue
vhirtham Jan 6, 2020
42bff93
Configure flake8 to ignore W504
vhirtham Jan 6, 2020
17922da
Fix a bug in the arc segments angle calculation
vhirtham Jan 7, 2020
d0671ee
Clip input to arccos function to valid range
vhirtham Jan 7, 2020
460bc9d
Finish Shape2d.copy_and_reflect method
vhirtham Jan 7, 2020
f12967f
Fix deepsource issues
vhirtham Jan 7, 2020
9bad6ad
Replace copy_and_transform functions
vhirtham Jan 8, 2020
a4f7abe
Fix deepsource issue
vhirtham Jan 8, 2020
5892c35
Modify .codecov.yml
vhirtham Jan 8, 2020
dddb358
Modify .codecov.yml
vhirtham Jan 8, 2020
9e65fb0
Modify codecov.yml
vhirtham Jan 8, 2020
27aabbc
Rename .codecov.yml -> codecov.yml
vhirtham Jan 8, 2020
7cf828e
Add some utility functions
vhirtham Jan 8, 2020
118435e
Add tests
vhirtham Jan 8, 2020
0071ec6
Add function to add a shape to a profile
vhirtham Jan 8, 2020
8c2a60f
Separate translations from matrix transformations
vhirtham Jan 8, 2020
451d600
Fix docstrings
vhirtham Jan 8, 2020
6794073
Add missing shhape2d tests
vhirtham Jan 8, 2020
752659c
Refactor profile class
vhirtham Jan 9, 2020
9ed5b60
Test profile rasterization
vhirtham Jan 9, 2020
2e6bfa4
Start with 3d data
vhirtham Jan 10, 2020
06c18e6
Modify CartesianCoordinateSystem class
vhirtham Jan 10, 2020
6b3b42c
Remove third dimension from profile rasterization
vhirtham Jan 10, 2020
302ffcd
Finish draft version of point cloud generator
vhirtham Jan 14, 2020
3ba6b17
Add test for cartesian coordinate system
vhirtham Jan 15, 2020
66bd859
Add missing test cases
vhirtham Jan 15, 2020
11c31ab
Test single axis rotation matrices
vhirtham Jan 15, 2020
3cc6a0e
Add doc strings
vhirtham Jan 16, 2020
d5f5105
Test normalize function
vhirtham Jan 16, 2020
cb39583
Test orientation function (plane through origin)
vhirtham Jan 16, 2020
734bf80
Test orientation function (plane defined by points)
vhirtham Jan 16, 2020
bca1b30
Test is_orthogonal function
vhirtham Jan 16, 2020
9d1f789
Test change of base functions
vhirtham Jan 16, 2020
d2aa9e5
Optimize and test linear trace segment
vhirtham Jan 17, 2020
1433f97
Change coordinate system basis to coulumn major
vhirtham Jan 20, 2020
61e90c1
Change coordinate system basis to coulumn major
vhirtham Jan 20, 2020
1218b9b
Add and test radial trace segment
vhirtham Jan 20, 2020
70e7010
Remove no longer needed functions
vhirtham Jan 20, 2020
7591e44
Test trace construction
vhirtham Jan 20, 2020
c48e975
Add test case to profile test
vhirtham Jan 20, 2020
4e36921
Test local coordinate system of trace
vhirtham Jan 21, 2020
59c7cc4
Test coordinate system addition
vhirtham Jan 21, 2020
1353411
Add new line segment class
vhirtham Jan 22, 2020
b13bcbb
Add new arc segment
vhirtham Jan 22, 2020
7045bd7
Test new arc segment rasterization
vhirtham Jan 22, 2020
4a2fa11
Add and test new line segment transformations
vhirtham Jan 23, 2020
6e4078c
Add and test new arc segment transformations
vhirtham Jan 23, 2020
1140942
Rename duplicate test function
vhirtham Jan 23, 2020
391f2f1
Test modification to fix linux CI errors
vhirtham Jan 23, 2020
f7a24e9
Print CI failure data
vhirtham Jan 23, 2020
d9fa4e2
Test fix
vhirtham Jan 23, 2020
4d36db0
Remove output, since error is fixed
vhirtham Jan 23, 2020
886cb04
Apply some minor optimizations to arc segment
vhirtham Jan 23, 2020
fd14947
Remove old shape segments (Tests fail)
vhirtham Jan 23, 2020
e4a9141
Modify ctors of segments
vhirtham Jan 24, 2020
c909cfa
Adjust most tests to new segment classes
vhirtham Jan 24, 2020
4757cf0
Fix last test
vhirtham Jan 27, 2020
f88bdd6
Remove no longer needed function
vhirtham Jan 27, 2020
3455f8d
Get everything working again
vhirtham Jan 27, 2020
718c4f2
Add jupyter notebook - shape tutorial
vhirtham Jan 27, 2020
b80e910
Add and test shape interpolation
vhirtham Jan 27, 2020
850eb2f
Fix tests
vhirtham Jan 27, 2020
c4949bb
Add more shape interpolation testcases
vhirtham Jan 27, 2020
5303372
Add testcases for line segment interpolation
vhirtham Jan 27, 2020
4f69355
Test linear profile interpolation
vhirtham Jan 27, 2020
302d04a
Fix a testcase which triggered a wrong exception
vhirtham Jan 27, 2020
c086521
Test profile interpolation exceptions
vhirtham Jan 27, 2020
b4834d3
Fix tests
vhirtham Jan 27, 2020
57f9019
Remove unused class members
vhirtham Jan 27, 2020
11790e9
Add and test varying profile class
vhirtham Jan 27, 2020
74678b4
Add missing testcase
vhirtham Jan 27, 2020
716b7b3
Add geometry class to replace section class
vhirtham Jan 28, 2020
e387aad
Remove section class
vhirtham Jan 28, 2020
9658246
Rename VaryingProfile to VariableProfile
vhirtham Jan 28, 2020
921259f
Rename some variables and function in tests
vhirtham Jan 28, 2020
4ed32fc
Add test for variable profile
vhirtham Jan 28, 2020
cd90163
Test geometry construction
vhirtham Jan 28, 2020
a0aa368
Start testing geometry rasterization
vhirtham Jan 28, 2020
81f697b
Finish geometry rasterization test with constant profile
vhirtham Jan 29, 2020
495601e
Finish second geometry rasterization test
vhirtham Jan 29, 2020
ba97936
Fix flake8 issues
vhirtham Jan 29, 2020
9edccbe
Fix pydocstyle issues
vhirtham Jan 29, 2020
9080306
Fix a codacy issue
vhirtham Jan 29, 2020
860e826
Fix a codacy issue
vhirtham Jan 29, 2020
47ae411
Fix some codacy issues
vhirtham Jan 29, 2020
219140a
Fix a deepsource issue
vhirtham Jan 29, 2020
7d4cd26
Fix a deepsource issue
vhirtham Jan 29, 2020
ea58fb3
Fix some deepsource issues
vhirtham Jan 29, 2020
7bbfd48
Fix some deepsource issues
vhirtham Jan 29, 2020
67c40bd
Fix some deepsource issues
vhirtham Jan 29, 2020
b8ede48
Fix some deepsource issues
vhirtham Jan 29, 2020
b7a3c5c
Fix last deepsource issues
vhirtham Jan 29, 2020
857ea64
Refactor coordinate system class
vhirtham Jan 30, 2020
94735c0
Shorten corrdinate system class name
vhirtham Jan 30, 2020
3528871
Create internal utility package
vhirtham Jan 30, 2020
0f27fe7
Enforce connected segments in shape class
vhirtham Jan 30, 2020
4476944
Remove '2D' from shape class name
vhirtham Jan 30, 2020
6bbf4eb
Move some functions to utility package
vhirtham Jan 30, 2020
695cada
Rename and test utility functions
vhirtham Jan 30, 2020
b5d6a24
Fix some minor issues and docstrings
vhirtham Jan 30, 2020
4f8ed6f
Add and test arc segment construction with radius
vhirtham Jan 31, 2020
20d0a10
Test general shape interpolation
vhirtham Feb 3, 2020
0ed1b94
Rename some functions
vhirtham Feb 3, 2020
b659d99
Fix deepsource issue
vhirtham Feb 3, 2020
dd694eb
Use local yz-plane of trace as profile plane
vhirtham Feb 3, 2020
f7b75d7
Add trace rasterization
vhirtham Feb 4, 2020
a2c0f2f
Apply some minor adjustments
vhirtham Feb 4, 2020
daf4687
Move some functions to transformation package
vhirtham Feb 4, 2020
205052e
Improve rasterization tests and methods
vhirtham Feb 4, 2020
6a18473
Add another testcase
vhirtham Feb 5, 2020
27a6401
Fix a bug
vhirtham Feb 5, 2020
8040997
Merge 2 packages
vhirtham Feb 5, 2020
4adc1c6
Increase coverage
vhirtham Feb 5, 2020
88a9d03
Replace class with function
vhirtham Feb 5, 2020
f629017
Adjust function name to agree with standard
vhirtham Feb 5, 2020
369a456
Correct flake8 issue
vhirtham Feb 5, 2020
71f82d3
Enhance shape rasterization
vhirtham Feb 6, 2020
7efc864
Add function to shape that creates multiple line segments
vhirtham Feb 6, 2020
f8a6ec0
Rename in-place translation functions
vhirtham Feb 6, 2020
9f710f8
Add transformation functions to line segment
vhirtham Feb 6, 2020
84d80bc
Add transformation functions to arc segment
vhirtham Feb 6, 2020
9d3629c
Add transformation functions to shape
vhirtham Feb 6, 2020
a9adb60
Add reflect functions to shape
vhirtham Feb 6, 2020
74891a9
Add alternative reflection methods to shape
vhirtham Feb 7, 2020
9a93189
Fix a reflection bug - add test
vhirtham Feb 7, 2020
c1afbec
Remove second parameter from segment rasterization methods
vhirtham Feb 10, 2020
1f62cb2
Delete outdated tutorial
vhirtham Feb 5, 2020
18917bd
Add tutorial to generate profiles
vhirtham Feb 10, 2020
b9580d5
Merge branch 'point_cloud_generation' into markus_test
Feb 10, 2020
fdf7ed3
Finish first tutorial
vhirtham Feb 10, 2020
4724c3a
Update tutorial about profiles
vhirtham Feb 10, 2020
ab6513b
Correct doc strings
vhirtham Feb 10, 2020
cc51afb
Add exception if empty shape is rasterized
vhirtham Feb 10, 2020
4c82a13
Add visualization package
vhirtham Feb 10, 2020
67a1928
Fix flake8 and pydocstyle issues
vhirtham Feb 10, 2020
1ef418b
U-groove and V-groove as functions
Feb 10, 2020
7620596
Test visaulization package
vhirtham Feb 11, 2020
4e99590
Add color and label to plot_coordinate_system
vhirtham Feb 11, 2020
86bcdb2
Remove tests from codacy duplication checks
vhirtham Feb 11, 2020
3a5edf9
Try to fix codacy issue
vhirtham Feb 11, 2020
d1b19b6
Merge branch 'geometry' into markus_test
Feb 12, 2020
78781b9
Update naming for the changes with the geometry package change
Feb 12, 2020
943cb88
Changed input of classes from dictionary to single values.
Feb 12, 2020
e110616
pydocstyle changes
Feb 12, 2020
aec325c
imperative mood test?!
Feb 12, 2020
df74fc4
format notebook with black
Feb 12, 2020
3c0c577
imperative mood is hard!!!
Feb 12, 2020
ef7cbfd
fix for edges.
Feb 19, 2020
b7b6e64
Added pytest for the u and V groove. The pynb is now an instruction. …
Feb 24, 2020
f464b5a
helper function added
Feb 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ engines:
exclude_paths:
- tests/**

duplication:
enabled: true
exclude_paths:
- tests/**

exclude_paths:
- 'docs/**'
- 'scripts/**'
35 changes: 0 additions & 35 deletions .codecov.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .typo-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ excluded_files:
excluded_words:
- typoci
- numpy
- scipy
- matmul
- arange
- vstack
- pytest
- linalg
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

#### Documention
[![](https://github.com/vhirtham/pythonTest/workflows/pydocstyle/badge.svg)](https://github.com/vhirtham/pythonTest/actions?query=workflow%3A%22pydocstyle%22)
[![Documentation Status](https://readthedocs.org/projects/rtd-sphinx-theme-sample-project/badge/?version=latest)](https://rtd-sphinx-theme-sample-project.readthedocs.io/en/latest/?badge=latest)
[![Documentation Status](https://readthedocs.org/projects/vhirthampythontest/badge/?version=latest)](https://vhirthampythontest.readthedocs.io/en/latest/?badge=latest)
258 changes: 258 additions & 0 deletions Weld_tester.ipynb

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
codecov:
branch: master
notify:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "70...100"

status:
project:
default:
enabled: yes
target: 85%
threshold: 5%


patch:
default:
enabled: yes
target: 85%
threshold: 5%

ignore:
- "tests"
- "*__init__.py"

#comment:
#layout: "reach, diff, flags, files"
#behavior: default
#require_changes: false # if true: only post the comment if coverage changes
#require_base: no # [yes :: must have a base report to post]
#require_head: yes # [yes :: must have a head report to post]
#branches: null # branch names that can post comment
#after_n_builds: 1 #e.g., 5. The number of uploaded reports codecov will receive before posting a comment on a pull request.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
- python=3.7
- numpy=1.17
- pandas=0.25
- scipy=1.3
- scipy=1.3.2
- xarray>=0.12.3
# - bottleneck>=1.1
# - jsonschema=2.6
Expand Down
75 changes: 75 additions & 0 deletions mypackage/_utility.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
"""Contains package internal utility functions."""

import math
import numpy as np


def is_column_in_matrix(column, matrix):
"""
Check if a column (1d array) can be found inside of a matrix.

:param column: Column that should be checked
:param matrix: Matrix
:return: True or False
"""
return is_row_in_matrix(column, np.transpose(matrix))


def is_row_in_matrix(row, matrix):
"""
Check if a row (1d array) can be found inside of a matrix.

source: https://codereview.stackexchange.com/questions/193835

:param row: Row that should be checked
:param matrix: Matrix
:return: True or False
"""
if not matrix.shape[1] == np.array(row).size:
return False
return (matrix == row).all(axis=1).any()


def to_float_array(container):
"""
Cast the passed container to a numpy array of floats.

:param container: Container which can be cast to a numpy array
:return:
"""
return np.array(container, dtype=float)


def to_list(var):
"""
Store the passed variable into a list and return it.

If the variable is already a list, it is returned without modification.
If 'None' is passed, the function returns an empty list.

:param var: Arbitrary variable
:return: List
"""
if isinstance(var, list):
return var
if var is None:
return []
return [var]


def vector_is_close(vec_a, vec_b, abs_tol=1E-9):
"""
Check if a vector is close or equal to another vector.

:param vec_a: First vector
:param vec_b: Second vector
:param abs_tol: Absolute tolerance
:return: True or False
"""
if not vec_a.size == vec_b.size:
return False
for i in range(vec_a.size):
if not math.isclose(vec_a[i], vec_b[i], abs_tol=abs_tol):
return False

return True
Loading