From 002e7963c93158c40e2cf2004d79fffb4049e814 Mon Sep 17 00:00:00 2001 From: jan Date: Tue, 20 Mar 2018 16:57:11 -0700 Subject: [PATCH] packagize --- __init__.py => chop/__init__.py | 0 boundary.py => chop/boundary.py | 0 pyr3d.py => chop/pyr3d.py | 0 shapes.py => chop/shapes.py | 0 transform.py => chop/transform.py | 0 util.py => chop/util.py | 0 voxel.py => chop/voxel.py | 0 pyl | 197 ------------------------------ tpy_r3d.py | 10 +- 9 files changed, 5 insertions(+), 202 deletions(-) rename __init__.py => chop/__init__.py (100%) rename boundary.py => chop/boundary.py (100%) rename pyr3d.py => chop/pyr3d.py (100%) rename shapes.py => chop/shapes.py (100%) rename transform.py => chop/transform.py (100%) rename util.py => chop/util.py (100%) rename voxel.py => chop/voxel.py (100%) delete mode 100644 pyl diff --git a/__init__.py b/chop/__init__.py similarity index 100% rename from __init__.py rename to chop/__init__.py diff --git a/boundary.py b/chop/boundary.py similarity index 100% rename from boundary.py rename to chop/boundary.py diff --git a/pyr3d.py b/chop/pyr3d.py similarity index 100% rename from pyr3d.py rename to chop/pyr3d.py diff --git a/shapes.py b/chop/shapes.py similarity index 100% rename from shapes.py rename to chop/shapes.py diff --git a/transform.py b/chop/transform.py similarity index 100% rename from transform.py rename to chop/transform.py diff --git a/util.py b/chop/util.py similarity index 100% rename from util.py rename to chop/util.py diff --git a/voxel.py b/chop/voxel.py similarity index 100% rename from voxel.py rename to chop/voxel.py diff --git a/pyl b/pyl deleted file mode 100644 index be13bbb..0000000 --- a/pyl +++ /dev/null @@ -1,197 +0,0 @@ -************* Module pyr3d -C: 71, 0: Line too long (106/100) (line-too-long) -C:122, 0: Exactly one space required after comma - target_edge_inds = _searchsorted_rows(r2l_edges[:,:2], edge_walk_results[:, ::-1]) - ^ (bad-whitespace) -C:176, 0: Line too long (104/100) (line-too-long) -C:178, 0: Line too long (102/100) (line-too-long) -C:186, 0: Line too long (108/100) (line-too-long) -C:192, 0: Line too long (149/100) (line-too-long) -C:209, 0: Line too long (108/100) (line-too-long) -C:295, 0: No space allowed before comma - S = numpy.zeros((3, poly_order + 1, poly_order + 1, 2) , dtype=float) - ^ (bad-whitespace) -C:319, 0: Line too long (103/100) (line-too-long) -C:348, 0: Line too long (105/100) (line-too-long) -C:374, 0: Line too long (104/100) (line-too-long) -W:410, 0: Bad indentation. Found 8 spaces, expected 4 (bad-indentation) -W:411, 0: Bad indentation. Found 8 spaces, expected 4 (bad-indentation) -C:436, 0: Unnecessary parens after 'assert' keyword (superfluous-parens) -C:465, 0: Line too long (103/100) (line-too-long) -C:472, 0: Line too long (102/100) (line-too-long) -C:633, 0: Line too long (103/100) (line-too-long) -C:634, 0: Line too long (104/100) (line-too-long) -C:643, 0: Line too long (106/100) (line-too-long) -C:644, 0: Line too long (112/100) (line-too-long) -C:718, 0: Exactly one space required after comma - ((0,0,1), -rbounds[0, 2]), - ^ (bad-whitespace) -C:718, 0: Exactly one space required after comma - ((0,0,1), -rbounds[0, 2]), - ^ (bad-whitespace) -C:719, 0: Exactly one space required after comma - ((0,0,-1), rbounds[1, 2]), - ^ (bad-whitespace) -C:719, 0: Exactly one space required after comma - ((0,0,-1), rbounds[1, 2]), - ^ (bad-whitespace) -C:720, 0: Exactly one space required after comma - ((0,1,0), -rbounds[0, 1]), - ^ (bad-whitespace) -C:720, 0: Exactly one space required after comma - ((0,1,0), -rbounds[0, 1]), - ^ (bad-whitespace) -C:721, 0: Exactly one space required after comma - ((0,-1,0), rbounds[1, 1]), - ^ (bad-whitespace) -C:721, 0: Exactly one space required after comma - ((0,-1,0), rbounds[1, 1]), - ^ (bad-whitespace) -C:722, 0: Exactly one space required after comma - ((1,0,0), -rbounds[0, 0]), - ^ (bad-whitespace) -C:722, 0: Exactly one space required after comma - ((1,0,0), -rbounds[0, 0]), - ^ (bad-whitespace) -C:723, 0: Exactly one space required after comma - ((-1,0,0), rbounds[1, 0]), - ^ (bad-whitespace) -C:723, 0: Exactly one space required after comma - ((-1,0,0), rbounds[1, 0]), - ^ (bad-whitespace) -C:785, 0: Line too long (132/100) (line-too-long) -C:786, 0: Line too long (103/100) (line-too-long) -C:840, 0: No space allowed before bracket - stack.append((children[0], numpy.vstack((c_ibox[0], split_plane[1])) )) - ^ (bad-whitespace) -C:841, 0: No space allowed before bracket - stack.append((children[1], numpy.vstack((split_plane[0], c_ibox[1])) )) - ^ (bad-whitespace) -C:857, 0: Trailing newlines (trailing-newlines) -C: 1, 0: Missing module docstring (missing-docstring) -W: 10, 0: No exception type(s) specified (bare-except) -C: 11, 4: Argument name "f" doesn't conform to snake_case naming style (invalid-name) -C: 11, 4: Missing function docstring (missing-docstring) -C: 15, 0: Missing function docstring (missing-docstring) -C: 27, 0: Function name "NUM_MOMENTS" doesn't conform to snake_case naming style (invalid-name) -C: 27, 0: Missing function docstring (missing-docstring) -C: 31, 0: Missing function docstring (missing-docstring) -C: 38, 0: Constant name "empty_partial_result" doesn't conform to UPPER_CASE naming style (invalid-name) -C: 46, 0: Missing function docstring (missing-docstring) -R: 46, 0: Too many local variables (38/15) (too-many-locals) -W: 65, 4: Unused variable 'num_right_vertices' (unused-variable) -W: 91, 4: Unused variable 'edge_walk_inds' (unused-variable) -C:132, 0: Argument name "a" doesn't conform to snake_case naming style (invalid-name) -C:138, 0: Argument name "a" doesn't conform to snake_case naming style (invalid-name) -C:138, 0: Argument name "b" doesn't conform to snake_case naming style (invalid-name) -C:145, 0: Missing function docstring (missing-docstring) -C:151, 0: Missing function docstring (missing-docstring) -R:151, 0: Too many local variables (27/15) (too-many-locals) -R:167, 8: Unnecessary "else" after "return" (no-else-return) -W:174,-1: String statement has no effect (pointless-string-statement) -C:180, 4: Variable name "re" doesn't conform to snake_case naming style (invalid-name) -C:180, 8: Variable name "le" doesn't conform to snake_case naming style (invalid-name) -C:227, 0: Missing function docstring (missing-docstring) -R:227, 0: Too many local variables (16/15) (too-many-locals) -C:241,15: Variable name "vn" doesn't conform to snake_case naming style (invalid-name) -C:266, 0: Missing function docstring (missing-docstring) -R:266, 0: Too many local variables (28/15) (too-many-locals) -C:295, 4: Variable name "S" doesn't conform to snake_case naming style (invalid-name) -C:297, 4: Variable name "mx" doesn't conform to snake_case naming style (invalid-name) -C:297, 8: Variable name "my" doesn't conform to snake_case naming style (invalid-name) -C:305, 8: Variable name "m" doesn't conform to snake_case naming style (invalid-name) -C:306,12: Variable name "c" doesn't conform to snake_case naming style (invalid-name) -C:325,12: Variable name "m" doesn't conform to snake_case naming style (invalid-name) -C:330, 4: Variable name "m" doesn't conform to snake_case naming style (invalid-name) -C:333, 8: Variable name "c" doesn't conform to snake_case naming style (invalid-name) -C:349, 8: Variable name "m" doesn't conform to snake_case naming style (invalid-name) -R:266, 0: Too many statements (59/50) (too-many-statements) -C:356, 0: Missing function docstring (missing-docstring) -R:356, 0: Too many local variables (20/15) (too-many-locals) -E:378, 7: Undefined variable 'check_connectivity' (undefined-variable) -C:387,16: Variable name "ia" doesn't conform to snake_case naming style (invalid-name) -C:388,16: Variable name "va" doesn't conform to snake_case naming style (invalid-name) -C:389,20: Variable name "vb" doesn't conform to snake_case naming style (invalid-name) -C:391,20: Variable name "vc" doesn't conform to snake_case naming style (invalid-name) -E:394,16: Undefined variable 'visited' (undefined-variable) -E:395,16: Undefined variable 'visited' (undefined-variable) -W:395,29: Using possibly undefined loop variable 'vb' (undefined-loop-variable) -E:399,20: Undefined variable 'visited' (undefined-variable) -E:401,37: Undefined variable 'visited' (undefined-variable) -E:404,23: Undefined variable 'visited' (undefined-variable) -C:409, 0: Missing function docstring (missing-docstring) -C:410, 8: Variable name "ad" doesn't conform to snake_case naming style (invalid-name) -C:410,12: Variable name "bd" doesn't conform to snake_case naming style (invalid-name) -C:410,16: Variable name "cd" doesn't conform to snake_case naming style (invalid-name) -C:414, 0: Missing function docstring (missing-docstring) -C:422, 4: Variable name "ab" doesn't conform to snake_case naming style (invalid-name) -C:423, 4: Variable name "cd" doesn't conform to snake_case naming style (invalid-name) -C:425, 4: Variable name "n" doesn't conform to snake_case naming style (invalid-name) -C:426, 4: Variable name "n" doesn't conform to snake_case naming style (invalid-name) -C:428, 4: Variable name "d" doesn't conform to snake_case naming style (invalid-name) -E:428, 8: bad operand type for unary -: NoneType (invalid-unary-operand-type) -C:433, 0: Argument name "a" doesn't conform to snake_case naming style (invalid-name) -C:433, 0: Argument name "b" doesn't conform to snake_case naming style (invalid-name) -C:433, 0: Missing function docstring (missing-docstring) -C:439, 4: Variable name "sa" doesn't conform to snake_case naming style (invalid-name) -C:440, 4: Variable name "sb" doesn't conform to snake_case naming style (invalid-name) -C:441, 4: Variable name "ra" doesn't conform to snake_case naming style (invalid-name) -C:442, 4: Variable name "rb" doesn't conform to snake_case naming style (invalid-name) -C:449, 0: Missing function docstring (missing-docstring) -R:449, 0: Too many local variables (41/15) (too-many-locals) -R:458, 4: Unnecessary "else" after "return" (no-else-return) -W:552,-1: String statement has no effect (pointless-string-statement) -W:567,-1: String statement has no effect (pointless-string-statement) -W:578,-1: String statement has no effect (pointless-string-statement) -C:579,12: Variable name "v" doesn't conform to snake_case naming style (invalid-name) -C:580,12: Variable name "v0" doesn't conform to snake_case naming style (invalid-name) -C:581,12: Variable name "s" doesn't conform to snake_case naming style (invalid-name) -C:582,12: Variable name "m" doesn't conform to snake_case naming style (invalid-name) -C:582,15: Variable name "n" doesn't conform to snake_case naming style (invalid-name) -W:590,-1: String statement has no effect (pointless-string-statement) -C:601,12: Variable name "v" doesn't conform to snake_case naming style (invalid-name) -C:602,12: Variable name "s" doesn't conform to snake_case naming style (invalid-name) -C:603,12: Variable name "e" doesn't conform to snake_case naming style (invalid-name) -C:616,12: Variable name "ma" doesn't conform to snake_case naming style (invalid-name) -C:616,16: Variable name "mb" doesn't conform to snake_case naming style (invalid-name) -W:622,-1: String statement has no effect (pointless-string-statement) -R:449, 0: Too many statements (78/50) (too-many-statements) -C:660, 0: Missing function docstring (missing-docstring) -C:661, 4: Variable name "s" doesn't conform to snake_case naming style (invalid-name) -C:661, 7: Variable name "c" doesn't conform to snake_case naming style (invalid-name) -C:662, 4: Variable name "v0" doesn't conform to snake_case naming style (invalid-name) -C:663, 4: Variable name "v1" doesn't conform to snake_case naming style (invalid-name) -C:668, 0: Missing function docstring (missing-docstring) -C:672, 0: Missing function docstring (missing-docstring) -W:672,16: Redefining name 'scale' from outer scope (line 672) (redefined-outer-name) -C:676, 0: Missing function docstring (missing-docstring) -W:676,16: Redefining name 'shear' from outer scope (line 676) (redefined-outer-name) -W:676,16: Unused argument 'shear' (unused-argument) -C:680, 0: Missing function docstring (missing-docstring) -C:683, 4: Variable name "vh" doesn't conform to snake_case naming style (invalid-name) -C:687, 0: Missing function docstring (missing-docstring) -C:716, 0: Missing function docstring (missing-docstring) -C:729, 0: Missing function docstring (missing-docstring) -C:734, 8: Variable name "n" doesn't conform to snake_case naming style (invalid-name) -C:736, 8: Variable name "n" doesn't conform to snake_case naming style (invalid-name) -C:738, 8: Variable name "d" doesn't conform to snake_case naming style (invalid-name) -C:744, 0: Missing function docstring (missing-docstring) -C:763, 0: Missing function docstring (missing-docstring) -R:763, 0: Too many local variables (20/15) (too-many-locals) -C:797, 0: Argument name "d" doesn't conform to snake_case naming style (invalid-name) -C:797, 0: Missing function docstring (missing-docstring) -R:797, 0: Too many local variables (20/15) (too-many-locals) -C:829, 8: Variable name "n" doesn't conform to snake_case naming style (invalid-name) -C:845, 0: Argument name "d" doesn't conform to snake_case naming style (invalid-name) -C:845, 0: Missing function docstring (missing-docstring) -C:851, 0: Argument name "d" doesn't conform to snake_case naming style (invalid-name) -C:851, 0: Missing function docstring (missing-docstring) -E:854,26: Undefined variable 'plane' (undefined-variable) -W:853, 8: Unused variable 'face' (unused-variable) -W: 1, 0: Unused List imported from typing (unused-import) -W: 4, 0: Unused pi imported from numpy (unused-import) -W: 4, 0: Unused sqrt imported from numpy (unused-import) - ------------------------------------------------------------------- -Your code has been rated at 5.90/10 (previous run: 5.90/10, +0.00) - diff --git a/tpy_r3d.py b/tpy_r3d.py index 0ae36a7..a76b319 100644 --- a/tpy_r3d.py +++ b/tpy_r3d.py @@ -7,11 +7,11 @@ import numpy from numpy import sin, cos, pi from numpy.linalg import norm -from . import pyr3d -from .shapes import build_tetrahedron, build_box, planes_from_tetrahedron, volume_of_tetrahedron -from .boundary import build_polyhedron, boundary_from_poly -from .util import check_poly, number_of_moments -from .voxel import voxelize +from chop import pyr3d +from chop.shapes import build_tetrahedron, build_box, planes_from_tetrahedron, volume_of_tetrahedron +from chop.boundary import build_polyhedron, boundary_from_poly +from chop.util import check_poly, number_of_moments +from chop.voxel import voxelize logger = logging.getLogger(__name__)