Removed vsketch from install_requires. User will have to install it manually if they want to use plotter mode, but its not required.

This commit is contained in:
Marcelo Prates 2024-07-02 18:32:07 -03:00
parent f4aab1a676
commit f0bb0a2008
14 changed files with 55 additions and 58 deletions

View File

@ -29,13 +29,17 @@ This work is [licensed](LICENSE) under a GNU Affero General Public License v3.0
# Installation
OBS. I'm trying to solve a dependency issue with [vsketch](https://vsketch.readthedocs.io/en/latest/install.html) before publishing prettymaps v0.1.3, so, for now, please install directly from GitHub.
To enable plotter mode:
```
pip install git+https://github.com/abey79/vsketch@1.0.0
```
### Install locally:
Install prettymaps with:
```
pip install git+https://github.com/marceloprates/prettymaps
pip install prettymaps
```
### Install on Google Colaboratory:
@ -62,9 +66,6 @@ prettymaps.plot(your_query)
```python
%load_ext autoreload
%autoreload 2
import prettymaps
plot = prettymaps.plot('Stad van de Zon, Heerhugowaard, Netherlands')
@ -72,7 +73,7 @@ plot = prettymaps.plot('Stad van de Zon, Heerhugowaard, Netherlands')
![png](README_files/README_7_0.png)
![png](README_files/README_8_0.png)
@ -92,7 +93,7 @@ plot = prettymaps.plot(
![png](README_files/README_9_0.png)
![png](README_files/README_10_0.png)
@ -364,7 +365,7 @@ plot = prettymaps.plot(
![png](README_files/README_15_0.png)
![png](README_files/README_16_0.png)
@ -385,7 +386,7 @@ plot = prettymaps.plot(
![png](README_files/README_17_0.png)
![png](README_files/README_18_0.png)
@ -763,7 +764,7 @@ plot.geodataframes['building'][
![svg](README_files/README_21_1.svg)
![svg](README_files/README_22_1.svg)
@ -804,7 +805,7 @@ for ax,building in zip(np.concatenate(axes),buildings):
![png](README_files/README_23_0.png)
![png](README_files/README_24_0.png)
@ -831,7 +832,7 @@ _ = plot.ax.set_title(
![png](README_files/README_25_0.png)
![png](README_files/README_26_0.png)
@ -853,7 +854,7 @@ plot = prettymaps.plot(
![png](README_files/README_27_0.png)
![png](README_files/README_28_0.png)
@ -873,12 +874,6 @@ plot = prettymaps.plot(
```
![png](README_files/README_29_0.png)
```python
import prettymaps
@ -890,7 +885,7 @@ plot = prettymaps.plot(
![png](README_files/README_30_0.png)
![png](README_files/README_31_0.png)
@ -1170,7 +1165,7 @@ plot = prettymaps.multiplot(
![png](README_files/README_36_0.png)
![png](README_files/README_37_0.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 KiB

After

Width:  |  Height:  |  Size: 5.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100.0" height="100.0" viewBox="-51.23032682800001 -30.034281028 0.0006073560000103839 0.0008053559999900983" preserveAspectRatio="xMinYMin meet"><g transform="matrix(1,0,0,-1,0,-60.067756700000004)"><path fill-rule="evenodd" fill="#66cc99" stroke="#555555" stroke-width="1.6107119999801965e-05" opacity="0.6" d="M -51.2298412,-30.03353870000001 L -51.2298154,-30.033540599999984 L -51.2298126,-30.0335408 L -51.2298129,-30.033544300000003 L -51.2297808,-30.033546700000002 L -51.2297805,-30.033544400000007 L -51.2297758,-30.0335447 L -51.2297562,-30.0335462 L -51.2297493,-30.033546699999995 L -51.2297572,-30.033627 L -51.22975770000001,-30.033632 L -51.2298302,-30.033626299999995 L -51.2298538,-30.033865 L -51.2298442,-30.033865799999994 L -51.2298477,-30.033909500000004 L -51.2298412,-30.03390990000001 L -51.2298357,-30.03390249999999 L -51.2298133,-30.033912799999996 L -51.2298168,-30.0339188 L -51.2297959,-30.0339406 L -51.2297906,-30.033939 L -51.2297826,-30.03395859999999 L -51.2297866,-30.033959199999998 L -51.2297957,-30.034019000000004 L -51.2297902,-30.034021399999997 L -51.229800700000006,-30.0340417 L -51.2298073,-30.0340393 L -51.2298344,-30.034053999999994 L -51.2298319,-30.034065200000008 L -51.2298509,-30.034070399999994 L -51.2298558,-30.034059600000003 L -51.2298704,-30.0340585 L -51.2298741,-30.034097 L -51.2298921,-30.034095599999993 L -51.2298985,-30.03416019999999 L -51.2298609,-30.034163 L -51.2298683,-30.034238599999984 L -51.2299531,-30.0342322 L -51.2299549,-30.0342512 L -51.2301846,-30.034234 L -51.2301825,-30.03421339999999 L -51.2302643,-30.03420729999999 L -51.2302569,-30.034132200000002 L -51.2302241,-30.034134599999994 L -51.2302178,-30.0340702 L -51.2302266,-30.034069400000007 L -51.2302229,-30.034030399999995 L -51.2302285,-30.03403000000001 L -51.230236500000004,-30.0340294 L -51.2302396,-30.034038299999995 L -51.230256600000004,-30.03403409999999 L -51.2302532,-30.0340242 L -51.230280900000004,-30.034001599999996 L -51.2302902,-30.0340033 L -51.23029700000001,-30.03398119999999 L -51.2302871,-30.0339784 L -51.2302841,-30.033920999999992 L -51.2302898,-30.033919600000008 L -51.2302806,-30.0338995 L -51.2302726,-30.033902399999995 L -51.2302486,-30.033885599999994 L -51.2302511,-30.033877399999998 L -51.2302264,-30.033868700000003 L -51.2302198,-30.033880699999987 L -51.2302148,-30.033878999999995 L -51.230213000000006,-30.03383810000001 L -51.2302054,-30.033838700000004 L -51.2301818,-30.0336 L -51.2302499,-30.033594899999997 L -51.2302471,-30.033566499999996 L -51.2302452,-30.033566699999998 L -51.2302423,-30.0335373 L -51.2302448,-30.033537100000004 L -51.2302419,-30.0335085 L -51.2302051,-30.033511199999992 L -51.2302053,-30.03351359999999 L -51.2301756,-30.0335159 L -51.2301752,-30.033512399999992 L -51.23014450000001,-30.0335147 L -51.2301449,-30.033518200000003 L -51.2300854,-30.033522699999995 L -51.2300843,-30.03351139999999 L -51.2300823,-30.0335115 L -51.2300635,-30.033512799999997 L -51.2300628,-30.033505500000008 L -51.2300334,-30.0335078 L -51.2300336,-30.03350989999999 L -51.2300339,-30.033513 L -51.22995280000001,-30.033519100000003 L -51.229952600000004,-30.033516999999996 L -51.2299524,-30.0335151 L -51.2299225,-30.03351729999999 L -51.2299228,-30.033520499999998 L -51.2298995,-30.03352229999999 L -51.2299009,-30.033536999999992 L -51.2298443,-30.033541300000003 L -51.229844,-30.0335385 L -51.2298412,-30.03353870000001 z" /></g></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 5.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 KiB

After

Width:  |  Height:  |  Size: 3.0 MiB

File diff suppressed because one or more lines are too long

View File

@ -19,7 +19,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
import re
import os
import json
import vsketch
import pathlib
import warnings
import matplotlib
@ -47,6 +46,13 @@ from shapely.geometry import (
box,
)
try:
import vsketch
except:
warnings.warn(
'Install Vsketch with "pip install git+https://github.com/abey79/vsketch@1.0.0" to enable pen plotter mode.'
)
class Subplot:
"""

View File

@ -3,7 +3,7 @@ from pathlib import Path
from setuptools import setup, find_packages
parent_dir = Path(__file__).resolve().parent
presets_dir = os.path.abspath(os.path.join(os.path.pardir, 'presets'))
presets_dir = os.path.abspath(os.path.join(os.path.pardir, "presets"))
setup(
name="prettymaps",
@ -15,16 +15,16 @@ setup(
author="Marcelo Prates",
author_email="marceloorp@gmail.com",
license="MIT License",
packages=find_packages(
exclude=("assets", "notebooks", "prints", "script")),
install_requires=parent_dir.joinpath(
"requirements.txt").read_text().splitlines() + [
'vsketch @ git+https://github.com/abey79/vsketch@1.0.0'
],
packages=find_packages(exclude=("assets", "notebooks", "prints", "script")),
install_requires=parent_dir.joinpath("requirements.txt")
.read_text()
.splitlines(), # + [
#'vsketch @ git+https://github.com/abey79/vsketch@1.0.0'
# ],
classifiers=[
"Intended Audience :: Science/Research",
],
package_dir={'prettymaps': 'prettymaps'},
package_data={'prettymaps': ['presets/*.json']},
python_requires = '>=3.11',
package_dir={"prettymaps": "prettymaps"},
package_data={"prettymaps": ["presets/*.json"]},
python_requires=">=3.11",
)