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

Add notes about running the test suite #21

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@

<img src="docs/figs/polyscope.jpg" width="350">

[![PyPI](https://img.shields.io/pypi/v/startinpy?style=for-the-badge)](https://pypi.org/project/startinpy/) [![docs](https://img.shields.io/badge/docs-startinpy.rtfd.io-brightgreen?style=for-the-badge)](https://startinpy.rtfd.io/) [![GitHub license](https://img.shields.io/github/license/hugoledoux/startinpy?style=for-the-badge)](https://github.com/hugoledoux/startinpy/blob/master/LICENSE)

[![PyPI](https://img.shields.io/pypi/v/startinpy?style=for-the-badge)](https://pypi.org/project/startinpy/) [![docs](https://img.shields.io/badge/docs-startinpy.rtfd.io-brightgreen?style=for-the-badge)](https://startinpy.rtfd.io/) [![GitHub license](https://img.shields.io/github/license/hugoledoux/startinpy?style=for-the-badge)](https://github.com/hugoledoux/startinpy/blob/master/LICENSE)

startinpy
=========

A library for modelling and processing 2.5D terrains using a (2D) Delaunay triangulation.
A library for modelling and processing 2.5D terrains using a (2D) Delaunay triangulation.
The triangulation is computed in 2D, but the *z*-elevation of the vertices are kept.

The underlying code is written in [Rust](https://www.rust-lang.org/) (so it's rather fast) and [robust arithmetic](https://crates.io/crates/robust) is used (so it shouldn't crash).
Expand All @@ -20,14 +19,12 @@ startinpy allows you to:
3. interpolate with several methods: TIN, natural neighbours, IDW, Laplace, etc.
4. use other useful terrain Python libraries that are also NumPy-based, eg [laspy](https://laspy.readthedocs.io), [rasterio](https://rasterio.readthedocs.io), [meshio](https://github.com/nschloe/meshio)
5. output the TIN to several formats: OBJ, PLY, GeoJSON, and CityJSON
6. store extra attributes with the vertices (the ones from LAS/LAZ)

6. store extra attributes with the vertices (the ones from LAS/LAZ)

Documentation
=============

https://startinpy.rtfd.io

<https://startinpy.rtfd.io>

Installation
============
Expand All @@ -39,7 +36,6 @@ To install the latest release: `pip install startinpy`

(watch out: this does not work with Linux currently, it installs an old version!)


If you want to compile it yourself
----------------------------------

Expand All @@ -57,6 +53,13 @@ Development
3. `maturin develop`
4. move to another folder, and `import startinpy` shouldn't return any error

Testing
-------

To run the automated test suite:

1. install the test requirements: `pip install -r tests/requirements.txt`
2. `pytest`

Examples
========
Expand Down Expand Up @@ -95,4 +98,4 @@ print(dt.incident_triangles_to_vertex(vi))
#-- interpolate at a location with the linear in TIN method
zhat = dt.interpolate({"method": "TIN"}, [[85718.5, 447211.6]])
print("result: ", zhat[0])
```
```
3 changes: 3 additions & 0 deletions tests/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
laspy[lazrs]
numpy
pytest
18 changes: 18 additions & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file was autogenerated by uv via the following command:
# uv pip compile tests/requirements.in
iniconfig==2.0.0
# via pytest
laspy==2.5.4
# via -r tests/requirements.in
lazrs==0.6.1
# via laspy
numpy==2.1.0
# via
# -r tests/requirements.in
# laspy
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pytest==8.3.2
# via -r tests/requirements.in