Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task/WG-379: upgrade python to 3.11; reorg Dockerfiles; reorg pyproject.toml (first pass) #222

Merged
merged 20 commits into from
Nov 25, 2024

Conversation

rstijerina
Copy link
Contributor

@rstijerina rstijerina commented Nov 14, 2024

Overview:

  • Upgrades python to 3.11
  • Upgrades all packages
  • Reorganizes python dependencies into groups
  • Adds a new makefile build target: make build-dev
    • Target for local development, production builds will not include dev dependencies

Related Jira tickets:

@@ -31,7 +34,7 @@ def get(database_session, pointCloudId: int) -> PointCloud:
:param pointCloudId: int
:return: PointCloud
"""
point_cloud = database_session.query(PointCloud).get(pointCloudId)
point_cloud = database_session.get(PointCloud, pointCloudId)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.



def test_process_shapefile_missing_additional_files(shapefile_fixture):
with pytest.raises(fiona.errors.DriverError):
_, _ = next(VectorService.process_shapefile(shapefile_fixture, additional_files=[]))
with pytest.raises(pyogrio.errors.DataSourceError):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 72 to 78
las_file = laspy.read(input_file)
min_point = _transform_to_geojson(
proj4=proj4, point=tuple(las_file.header.mins[:3])
)
max_point = _transform_to_geojson(
proj4=proj4, point=tuple(las_file.header.maxs[:3])
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rstijerina rstijerina force-pushed the task/WG-379--dockerfile-and-poetry-lock branch from c936c72 to b9e8bbb Compare November 22, 2024 00:13
@rstijerina rstijerina changed the base branch from main to black-formatter November 22, 2024 00:13
@rstijerina rstijerina force-pushed the task/WG-379--dockerfile-and-poetry-lock branch 2 times, most recently from e291538 to e23719b Compare November 22, 2024 00:25
@rstijerina rstijerina force-pushed the task/WG-379--dockerfile-and-poetry-lock branch from e23719b to 3b2e1e5 Compare November 22, 2024 00:27

[tool.poetry.dependencies]
python = "^3.9"
celery = "5.2.3"
python = "^3.11"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@@ -69,14 +69,13 @@ def get_bounding_box_2d(filePaths: List[str]) -> MultiPolygon:
for input_file in filePaths:
proj4 = getProj4(input_file)

las_file = laspy.file.File(input_file, mode="r-")
las_file = laspy.read(input_file)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to add lazrs python package. looks like in the new laspy a backed needs to be installed. i installed lazrs and all works well with that locally. I'm investigating why the unit tests didn't pick that up (maybe the files we use to test this function don't trigger the error: "LaspyException: No LazBackend selected, cannot decompress data" ).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, i see the issue and added a unit test. we were never testing any compressed files (ie. laz). we had some files that had .laz ending but they were uncompressed. i got a PR targeting this branch and adding a unit test. see #224

@rstijerina rstijerina merged commit 404e8d9 into black-formatter Nov 25, 2024
3 checks passed
@rstijerina rstijerina deleted the task/WG-379--dockerfile-and-poetry-lock branch November 25, 2024 17:18
@rstijerina rstijerina restored the task/WG-379--dockerfile-and-poetry-lock branch November 25, 2024 17:22
rstijerina added a commit that referenced this pull request Nov 25, 2024
… `pyproject.toml` (first pass) (#222)"

This reverts commit 404e8d9.
rstijerina added a commit that referenced this pull request Nov 27, 2024
* python black formatting; flake8 on everything

* task/WG-379: upgrade python to 3.11; reorg Dockerfiles; reorg `pyproject.toml` (first pass) (#222)

* upgrade python to 3.11; reorg Dockerfiles; reorg pyproject

* update github actions to 3.11; formatting

* gh actions dev dependenceis

* upgrade packages

* move laspy to main group; fix conda env name

* fix tests

* fix packages

* fix initdb

* upgrade packages; update import

* resolve sqalchemy warnings

* sqlalchemy 2.x syntax

* laspy upgrades

* update test; add rabbitmq healthcheck

* use poetry flake8 and black

* update workflows

* Update devops/docker-compose.local.yml

Co-authored-by: Nathan Franklin <[email protected]>

* add make build-dev instruction to readme

* Update devops/docker-compose.local.yml

Co-authored-by: Nathan Franklin <[email protected]>

* update gh action pg

* add lazrs

---------

Co-authored-by: Nathan Franklin <[email protected]>

* Revert "task/WG-379: upgrade python to 3.11; reorg Dockerfiles; reorg `pyproject.toml` (first pass) (#222)"

This reverts commit 404e8d9.

---------

Co-authored-by: Nathan Franklin <[email protected]>
rstijerina added a commit that referenced this pull request Nov 27, 2024
…ect.toml` (first pass) (#225)

* python black formatting; flake8 on everything

* upgrade python to 3.11; reorg Dockerfiles; reorg pyproject

* update github actions to 3.11; formatting

* gh actions dev dependenceis

* upgrade packages

* move laspy to main group; fix conda env name

* fix tests

* fix packages

* fix initdb

* upgrade packages; update import

* resolve sqalchemy warnings

* sqlalchemy 2.x syntax

* laspy upgrades

* update test; add rabbitmq healthcheck

* use poetry flake8 and black

* update workflows

* Update devops/docker-compose.local.yml

Co-authored-by: Nathan Franklin <[email protected]>

* add make build-dev instruction to readme

* Update devops/docker-compose.local.yml

Co-authored-by: Nathan Franklin <[email protected]>

* update gh action pg

* add lazrs

* task/WG-379: upgrade python to 3.11; reorg Dockerfiles; reorg `pyproject.toml` (first pass) (#222)

* upgrade python to 3.11; reorg Dockerfiles; reorg pyproject

* update github actions to 3.11; formatting

* gh actions dev dependenceis

* upgrade packages

* move laspy to main group; fix conda env name

* fix tests

* fix packages

* fix initdb

* upgrade packages; update import

* resolve sqalchemy warnings

* sqlalchemy 2.x syntax

* laspy upgrades

* update test; add rabbitmq healthcheck

* use poetry flake8 and black

* update workflows

* Update devops/docker-compose.local.yml

Co-authored-by: Nathan Franklin <[email protected]>

* add make build-dev instruction to readme

* Update devops/docker-compose.local.yml

Co-authored-by: Nathan Franklin <[email protected]>

* update gh action pg

* add lazrs

---------

Co-authored-by: Nathan Franklin <[email protected]>

* Revert "task/WG-379: upgrade python to 3.11; reorg Dockerfiles; reorg `pyproject.toml` (first pass) (#222)"

This reverts commit 404e8d9.

* hotfix: add unit test using compressed laz file (#224)

* Add compressed laz file

Changed some file names as the previous .laz files were uncompressed.

* Add lidar_medium_subset_las1pt2_utmzone13N_compressed.laz

* Fix formatting

---------

Co-authored-by: Sal Tijerina <[email protected]>

---------

Co-authored-by: Nathan Franklin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants