semvec/pypi-packages huggingface dataset:
easysemver 0.2.0
Simple semver utilities for Python.

# easysemver

This package provides utilities for comparing [SemVer](https://semver.org/) versions,
with special attention on the correct treatment of prerelease parts.

## Installation

`easysemver` can be installed from PyPI:

```sh
pip install easysemver
```

## Usage

Before versions can be compared, they must be converted into `Version` objects. If the version
is not valid SemVer, a `TypeError` will be raised.

```python
from easysemver import Version

# Not a valid SemVer version, so raises TypeError
version = Version("20230809-1")
# Create a SemVer version
version = Version("1.2.3")
# Prerelease and build parts are supported
version = Version("1.2.3-alpha.0+abcdefg")

# Comparing versions respects prerelease parts
#   The following all resolve to True
Version("1.2.3") < Version("1.2.4")
Version("1.2.3") < Version("2.0.0")
Version("1.2.3") < Version("1.2.4-alpha.0")
Version("1.2.3-alpha.0") < Version("1.2.3")
#   Prerelease parts that are all digits are compared as numbers
Version("1.2.3-alpha.0") < Version("1.2.3-alpha.100")
#   Prerelease parts that are strings are compared as strings
Version("1.2.3-alpha.0") < Version("1.2.3-beta.0")
#   Note that build parts don't affect comparison
Version("1.2.3") == Version("1.2.3+abcdefg")
```

Versions can also be compared to a SemVer range, which consists of a number of constraints
separated by commas. Similar to `Version`, a `TypeError` will be raised if the constraints
are not valid.

The supported constraints are SemVer versions with an operator, where the supported operators
are `==`, `!=`, `>=`, `>`, `<=` and `<`.

```python
from easysemver import Range, Version

# Resolves to True
Version("1.2.3") in Range(">=1.0.0,<2.0.0")
# Resolves to False
Version("1.2.3") in Range(">=2.0.0")
# Prerelease versions are only considered part of a range if the lower bound includes a prerelease part
#   Resolves to False
Version("1.2.3-alpha.0") in Range(">=1.0.0")
#   Resolves to True
Version("1.2.3-alpha.0") in Range(">=1.0.0-0")
# Specific versions can be exclulded
#   Resolves to False
Version("1.2.3") in Range(">=1.0.0,<2.0.0,!=1.2.3")
#   Resolves to True
Version("1.2.4") in Range(">=1.0.0,<2.0.0,!=1.2.3")
```
polaregistration 0.1.1
POLAR package
Requires Python: >=3.7

# POint cloud LAtent Registration

# Getting started

POLAR is a method to simultaneously register numerous highly degraded point clouds corresponding to views of the same unknown reference object.

## Installation

> [!WARNING]
> PyTorch3D is required by POLAR. Since its installation is quite specific, you need to install it manually.

If you want to user POLAR with the provided pretrained autoencoder, run
```
pip install polaregistration
```

If you want to retrain the autoencoder on your own, run
```
pip install polaregistration[train]
```

If you want to use the interactive visualization function, run
```
pip install polaregistration[vis]
```

Finally, to install everything, run
```
pip install polaregistration[all]
```


## Minimal example

```python

from polar import load_sample_data, POLAR

X, degradations, R_abs_gt = load_sample_data()

model = POLAR(**degradations)
X_hat = model.fit_transform(X)
```
POLAR partially respects the [Scikit-Learn Estimator API](https://scikit-learn.org/stable/modules/generated/sklearn.base.BaseEstimator.html#sklearn.base.BaseEstimator). Specifically, it has the two main methods:

- `fit(X: Tensor | Sequence[Tensor]) -> None` 
- `fit_transform(X: Tensor | Sequence[Tensor]) -> Tensor | Sequence[Tensor]`

They take a list of PyTorch tensors (each of shape $(K_i, 3)$ if point clouds are of varying lengths) or a single batch tensor of shape
$(N, K, 3)$ containing all the (same length) views.


## Documentation

A documentation, containing full api reference as well as small showcases is available [here](https://pypolar.github.io/polar/).