Metadata-Version: 2.1
Name: superblockify
Version: 1.0.0rc4
Summary: Automated Generation, Visualization, and Analysis of potential Superblocks in Cities
Author-email: Carlson Büth <carlson@cbueth.de>
Maintainer: superblockify contributors
License: APGL-3.0
Project-URL: Documentation, https://NERDSITU.github.io/superblockify
Project-URL: Repository, https://github.com/NERDSITU/superblockify
Project-URL: Changelog, https://NERDSITU.github.io/superblockify/changelog/
Keywords: Low Traffic Neighborhoods,GIS,Networks,OpenStreetMap,Urban Planning,Urban Mobility,Urban Data
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Natural Language :: English
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: osmnx
Requires-Dist: geopandas
Requires-Dist: rasterio
Requires-Dist: shapely
Requires-Dist: pyrosm
Requires-Dist: numba
Requires-Dist: tqdm
Requires-Dist: contextily
Requires-Dist: ruamel.yaml
Requires-Dist: pyarrow
Requires-Dist: seaborn
Requires-Dist: psutil
Provides-Extra: lint
Requires-Dist: blackd; extra == "lint"
Requires-Dist: isort; extra == "lint"
Requires-Dist: pylint; extra == "lint"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: coverage; extra == "test"
Provides-Extra: doc
Requires-Dist: sphinx; extra == "doc"
Requires-Dist: numpydoc; extra == "doc"
Requires-Dist: myst-nb; extra == "doc"
Requires-Dist: sphinx-book-theme; extra == "doc"
Requires-Dist: rasterstats; extra == "doc"
Requires-Dist: momepy; extra == "doc"
Provides-Extra: all
Requires-Dist: superblockify[doc,lint,test]; extra == "all"

# `superblockify`

[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://NERDSITU.github.io/superblockify/)
[![codecov](https://codecov.io/gh/NERDSITU/superblockify/branch/main/graph/badge.svg?token=AS72IFT2Q4)](https://codecov.io/gh/NERDSITU/superblockify)
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

[![Docs](https://github.com/NERDSITU/superblockify/actions/workflows/docs.yml/badge.svg)](https://github.com/NERDSITU/superblockify/actions/workflows/docs.yml)
[![Lint](https://github.com/NERDSITU/superblockify/actions/workflows/lint.yml/badge.svg)](https://github.com/NERDSITU/superblockify/actions/workflows/lint.yml)
[![Test](https://github.com/NERDSITU/superblockify/actions/workflows/test.yml/badge.svg)](https://github.com/NERDSITU/superblockify/actions/workflows/test.yml)

Source code for blockifying existing street networks.

---

## Installation

Create a new environment with `conda` or `mamba` and install the package from the
`conda-forge` channel.

```bash
conda create -n sb_env -c conda-forge superblockify
conda activate sb_env
```

This installs the package and its dependencies,
ready for use when activating the environment.
Learn more about `superblockify` by reading
the [documentation](https://NERDSITU.github.io/superblockify/)
or
the [minimal working example](https://github.com/NERDSITU/superblockify/blob/main/scripts/examples/mwe.py).

## Development Setup

For development, we recommend using `micromamba` to create a virtual
environment and installing the package in editable mode.
Alternatively, one can use `conda` or `mamba` to create the environment
(they can be used interchangeably).
After cloning the repository, navigate to the root folder and
create the environment with the wished python version and the development dependencies.

```bash
micromamba create -n sb_env -c conda-forge python=3.12 --file=environment.yml
micromamba activate sb_env
```

Now it is possible to import the package relatively to the root folder.
Optionally, register the package in editable mode with `pip`:

```bash
pip install --no-build-isolation --no-deps -e .
```

## Usage

For a quick start there are example scripts in
the [`examples/`](https://github.com/NERDSITU/superblockify/blob/main/scripts/examples/)
folder and
a [minimal working example](https://github.com/NERDSITU/superblockify/blob/main/scripts/examples/mwe.py).

## Logging

The logging is done using the `logging` module. The logging level can be set in the
`setup.cfg` file. The logging level can be set to `DEBUG`, `INFO`, `WARNING`, `ERROR`
or `CRITICAL`. It defaults to `INFO` and a rotating file handler is set up to log
to `results/logs/superblockify.log`. The log file is rotated every megabyte, and the
last three log files are kept.

## Testing

The tests are specified using the `pytest` signature, see [`tests/`](tests/) folder, and
can be run using a test runner of choice.
A pipeline is set up, see [`.github/workflows/test.yml`](.github/workflows/test.yml).
