Skip to main content

Helper library for operations of spatial transformation

Project description

Spatial Transformation

Installation

TL;DR

python -m venv .venv
source .venv/bin/activate

git clone git@github.com:TrafoToolkit/spatial_transformation.git
cd spatial_transformation

pip install -e .

Usage

Basic example:

from transform.position_3d import Position3D
from transform.rotation_3d import Rotation3D
from transform.transform_3d import Transform3D

p_0 = Position3D.from_cartesian(30, 450, 20, Unit.MM_DEG)
o_0 = Rotation3D.from_EULER_INTRINSIC_XYZ(210, 120, 140, Unit.MM_DEG)

sys_R = Transform3D(p_0, o_0)


print(p_0)

Development

This project is structured according to the guidelines of hatchling 1.7.

Setup

In order to install the requirements for development, install the dependencies from the requirements.txt:

This project uses pre-commits. To setup this up, do the following:

# With activated virtual environment
pip install -r requirements.txt
pre-commit install

This will install the pre-commit hook. When trying the next commit, the tools for the code check will be installed. Further commits will not need this setup step.

This will apply the checks to all files in the repository. During a commit only the diff is style-checked, the commit is aborted, if style / format is not according to the configuration.

In order to run the files over all git-tracked files, invoke:

pre-commit run --all

Testing

Testing requires you to install pip packages pytest pytest-cov

Run bash tools/runtest.sh MARKERNAME for running the tests in test/ directory. MARKERNAME can be

  • randomized for randomized tests using a random number generator with seed 0
  • hardcoded for testcases that test if an operation generates a known error, so mathematical problems can be found
  • or omitted for running all testcases

Coverage reports will be generated into htmlcov/

Documentation

For building the documentation you need pip packages Sphinx sphinx-autoapi and you need to install Sphinx with apt-get install python3-sphinx.

Run bash tools/generate_classdiagrams.sh for generating classdiagrams in docs/classdiagrams/ using pyreverse.

[WIP] Run bash tools/build_docs.sh for auto-generating documentation in docs/build/ using sphinx.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spatial_transformation-1.1.0.tar.gz (457.6 kB view details)

Uploaded Source

Built Distribution

spatial_transformation-1.1.0-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file spatial_transformation-1.1.0.tar.gz.

File metadata

File hashes

Hashes for spatial_transformation-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9fd4213c10db7cd91b2d93eb884f5ec5160380274b35f1e15e7c8c0f774b560b
MD5 e91f56365274930b4a204b48e1c677d5
BLAKE2b-256 185698b45eafdfcf35669b44f1bd10c572fda0b7501ba4ed2cb46518fe288d92

See more details on using hashes here.

File details

Details for the file spatial_transformation-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for spatial_transformation-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9513cd907e79cb7bbf5240969607478c26da847cb07b91bcab51cf65cad81b72
MD5 d950a00581bc3d1aaaccf60e4ef39df7
BLAKE2b-256 71d45e3584bc650f11bec2bf79a2d35af7a6af8447731c2715c5565de7e7cb37

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page