Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 23, 2023
1 parent 00fedf7 commit abb9428
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 17 deletions.
1 change: 0 additions & 1 deletion example/example_laz_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

# This function will generate `NUM_POINTS` random points within the voxel bounds
def RandomPoints(las_header, number_points):

# Create a Points object based on the LAS header
points = copc.Points(las_header)

Expand Down
4 changes: 1 addition & 3 deletions example/example_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
if not os.path.exists(os.path.join(os.path.join(DATADIRECTORY, "out"))):
os.makedirs(os.path.join(DATADIRECTORY, "out"))


# In this example, we'll filter the autzen dataset to only contain depth levels 0-3.
def TrimFileExample(compressor_example_flag):

# We'll get our point data from this file
reader = copc.FileReader(os.path.join(DATADIRECTORY, "autzen-classified.copc.laz"))

Expand Down Expand Up @@ -188,7 +188,6 @@ def ResolutionTrimFileExample():

# This function will generate `NUM_POINTS` random points within the voxel bounds
def RandomPoints(key, las_header, number_points):

# Voxel cube dimensions will be calculated from the maximum spacing of the file
span = max(
{
Expand Down Expand Up @@ -234,7 +233,6 @@ def RandomPoints(key, las_header, number_points):

# In this example, we'll create our own file from scratch
def NewFileExample():

# Create our new file with the specified format, scale, and offset
cfg = copc.CopcConfigWriter(
point_format_id=8,
Expand Down
1 change: 1 addition & 0 deletions python/copclib/mp/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import concurrent.futures


# Initialize each multiprocessing thread with a copy of the copc reader
def init_mp(copc_path):
_read_node.copc_reader = copc.FileReader(copc_path)
Expand Down
2 changes: 0 additions & 2 deletions test/box_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


def test_box_constructors():

# 2D box constructor
box = copc.Box(1.0, 0.0, 1.0, 1.0)
assert box.x_min == 1.0
Expand Down Expand Up @@ -63,7 +62,6 @@ def test_box_constructors():


def test_box_functions():

# Intersects 2D box
## Contains
assert copc.Box(0, 0, 4, 4).Intersects((1, 1, 2, 2))
Expand Down
1 change: 0 additions & 1 deletion test/extents_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


def test_copc_extents():

point_format_id = 7
num_eb_items = 3

Expand Down
1 change: 0 additions & 1 deletion test/key_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def test_get_parents():


def test_key_spatial_functions():

# Make a LasHeader with span 2
header = copc.LasHeader()
header.min = (0, 0, 0)
Expand Down
1 change: 0 additions & 1 deletion test/mp_read_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def test_xyz_map_class_limit():
)

for node in reader.GetAllNodes():

points = reader.GetPoints(node)
point_limit = [p for p in points if p.classification in classification_limits]
if len(point_limit) == 0:
Expand Down
1 change: 0 additions & 1 deletion test/pickle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def test_node():


def test_las_header():

reader = copc.FileReader(get_autzen_file())
las_header = reader.copc_config.las_header

Expand Down
1 change: 0 additions & 1 deletion test/point_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ def test_operator_copy():


def test_scaled_xyz():

pfid = 8

# No scale and offset
Expand Down
2 changes: 0 additions & 2 deletions test/points_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ def test_points_group_accessors():


def test_within():

points = copc.Points(6)

# generate points
Expand All @@ -278,7 +277,6 @@ def test_within():


def test_get_within():

points = copc.Points(6)

# generate points
Expand Down
1 change: 0 additions & 1 deletion test/reader_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ def test_point_error_handling():


def test_spatial_query_functions():

reader = copc.FileReader(get_autzen_file())

# Make horizontal 2D box of [400,400] roughly in the middle of the point cloud.
Expand Down
1 change: 0 additions & 1 deletion test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def generate_test_file():

# This function will generate `NUM_POINTS` random points within the voxel bounds
def RandomPoints(key, las_header, number_points):

# Voxel cube dimensions will be calculated from the maximum spacing of the file
span = max(
{
Expand Down
2 changes: 0 additions & 2 deletions test/writer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ def test_writer_copy():


def test_writer_copy_and_update():

# Create test file
orig_point_format_id = 7
orig_scale = copc.Vector3(0.1, 0.1, 0.1)
Expand Down Expand Up @@ -693,7 +692,6 @@ def test_writer_copy_and_update():


def test_check_spatial_bounds():

file_path = os.path.join(get_data_dir(), "writer_test.copc.laz")

cfg = copc.CopcConfigWriter(7, (0.1, 0.1, 0.1), (50, 50, 50))
Expand Down

0 comments on commit abb9428

Please sign in to comment.