semvec/pypi-packages huggingface dataset:
fake-geo-images 0.1.5
Fake geospatial images for unit tests
License: MIT
Requires Python: >=3.6

# fake-geo-images

A module to programmatically create geotiff images which can be used for unit tests.

<p align="center">
    <img src="./coverage.svg">
</p>

The underlying idea is that in order to write unit tests for geospatial image processsing algorithms, 
it is necessary to have an actual input image file or array. Organising these test images becomes a chore over time,
they should not be stored in git as they are large binary data and when stored outside, there always
is the danger that they are not updated according to changes in the code repo.

**fake-geo-images** provides a solution to the problem by providing simple code that allows to create
geospatial images (so far geotiffs) in a parameterised way. 

## Install package
```bash
pip install fake-geo-images
```

## Run tests
```bash
pytest
```

## Usage

In the following an example unit test for a hypothetical NDVI function.

```python
import numpy as np
import rasterio as rio
from pathlib import Path

from rasterio.transform import from_origin
from my_image_processing import ndvi
from fake_geo_images.fakegeoimages import FakeGeoImage

def test_ndvi():
    """
    A unit test if an NDVI method works in general
    """
    # Create 4-band image simulating RGBN as needed for NDVI
    test_image, _ = FakeGeoImage(
        300,
        150,
        4,
        "uint16",
        out_dir=Path("/tmp"),
        crs=4326,
        nodata=0,
        nodata_fill=3,
        cog=False,
    ).create(seed=42, transform=from_origin(13.428596, 52.494384, 0.000006, 0.000006))

    ndvi_image = ndvi(test_image)

    with rio.open(str(ndvi_image)) as src:
        ndvi_array = src.read()
        # NDVI only has one band of same size as input bands
        assert ndvi_array.shape == (1, 300, 150)
        # NDVI has float values between -1 and 1
        assert ndvi_array.dtype == np.float
        assert ndvi_array.min >= -1
        assert ndvi_array.max <= 1

```
v3iofs 0.1.18
fsspec driver for v3io
License: MIT

# v3iofs

<!--
[![CI](https://github.com/v3io/v3io-fs/workflows/CI/badge.svg)](https://github.com/v3io/v3io-fs/actions?query=workflow%3ACI)
-->
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)


An [fsspec][fsspec] driver for [v3io][v3io].


## Examples


### Python

```python
>>> from v3iofs import V3ioFS  # Will register 'v3io' protocol in ffspec
>>> fs = V3ioFS('api.app.yh48.iguazio-cd2.com', v3io_access_key='s3cr3t')
>>> fs.ls('/container/path')
```

### Pandas

```python
# Use V3IO_ACCESS_KEY & V3IO_API from environment
>> df = pd.read_csv('v3io://container/path/to/file.csv')
```

### Dask

```python
>>> from v3iofs import V3ioFS
>>> from dask import bag

# Use V3IO_ACCESS_KEY & V3IO_API from environment
>>> url = 'v3io://container/path'
>>> file = bag.read_text(url)
>>> data, _ = file.compute()

# Pass key in storage_options
>>> storage_options={
...     'v3io_api': 'webapi.app.iguazio.com',
...     'v3io_access_key': 's3cr3t',
... }
>>> file = bag.read_text(url, storage_options=storage_options)
>>> data, _ = file.compute()
```

## Development


### Testing

You need to set `V3IO_ACCESS_KEY` and `V3IO_API` environment variables.
Then run `make test` to run the tests.


### Environment

Deployment requirements are in `requirements.txt` and development requirements
are in `dev-requirements.txt`.

```
$ python -m venv venv
$ ./venv/bin/python -m pip install -r dev-requirements.txt
```


[fsspec]: https://filesystem-spec.readthedocs.io
[v3io]: https://www.iguazio.com/docs/tutorials/latest-release/getting-started/containers/
curler 0.2.2
Import curl command in python and use it with requests, httpx, etc. libraries.
License: MIT
Requires Python: >=3.9

# curler

Import curl command in python and use it with requests, httpx, etc. libraries.

## 🎉 Installation

Install **curler** package using `pip` command:

```sh
pip install -U curler
```

## 🧩 Usage

```python
import curler

command = """curl 'https://pypi.python.org/project/arv-easy-analysis' \
  -H 'Accept-Encoding:gzip,deflate,sdch' \
  -H 'Accept-Language:en-US,en;q=0.8'"""
curler.parse_curl(command)
```

```python
# Output:

ParsedCurl(
    method="GET",
    url="https://pypi.python.org/project/arv-easy-analysis",
    params={},
    data=None,
    data_binary=None,
    headers={
        "Accept-Encoding": "gzip,deflate,sdch",
        "Accept-Language": "en-US,en;q=0.8",
    },
    cookies={},
    insecure=False,
    user=(),
    proxy={},
    compressed=False,
    include=False,
    silent=False,
)
```

### 🧪 You can also check [package tests](./tests/) to gain more insights about this package.

## 😎 Acknowledgment

- 🤗 This package is heavily inspired by [@spulec/uncurl](https://github.com/spulec/uncurl).