From 64018d9cb66144167187db88f0ea522509f6817e Mon Sep 17 00:00:00 2001 From: Alex Morling Date: Tue, 20 Aug 2024 10:57:04 +0200 Subject: [PATCH 1/4] add maximize option to to_html() --- ecoscope/mapping/map.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ecoscope/mapping/map.py b/ecoscope/mapping/map.py index 7b188c3a..469ee3f9 100644 --- a/ecoscope/mapping/map.py +++ b/ecoscope/mapping/map.py @@ -7,7 +7,8 @@ import numpy as np import pandas as pd from io import BytesIO -from typing import Dict, List, Union +from typing import Dict, IO, List, Optional, TextIO, Union +from pathlib import Path try: import matplotlib as mpl @@ -510,6 +511,17 @@ def get_named_tile_layer(layer: str) -> BitmapTileLayer: max_requests=layer.get("max_requests", None), ) + def to_html( + self, + filename: Union[str, Path, TextIO, IO[str], None] = None, + title: Optional[str] = None, + maximize: bool = True, + ) -> Union[None, str]: + if maximize: + self.height = "100%" + self.width = "100%" + return super().to_html(filename=filename, title=title) + @staticmethod def hex_to_rgb(hex: str) -> list: hex = hex.strip("#") From 3b51d2f349702290ac18b81633a7ec411b66414b Mon Sep 17 00:00:00 2001 From: Alex Morling Date: Tue, 20 Aug 2024 11:07:32 +0200 Subject: [PATCH 2/4] bump lonboard version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c6357500..77cb1aaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ async_earthranger = [ "earthranger-client @ git+https://github.com/PADAS/er-client@v1.2.3", ] mapping = [ - "lonboard @ git+https://github.com/wildlife-dynamics/lonboard@77c56d30a9c2dd96fd863e910bf62952cfa36da8", + "lonboard @ git+https://github.com/wildlife-dynamics/lonboard@a8adb48ec43fff795506db5a9e7e0103f877d65c", "matplotlib", "mapclassify", ] From 68a31e696f6d642ba3d5628321e6f169f23969e3 Mon Sep 17 00:00:00 2001 From: Alex Morling Date: Tue, 20 Aug 2024 16:33:40 +0200 Subject: [PATCH 3/4] pin numpy version --- environment.yml | 1 + pyproject.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/environment.yml b/environment.yml index 622c537a..869f4146 100644 --- a/environment.yml +++ b/environment.yml @@ -7,6 +7,7 @@ dependencies: - git - jupyterlab - geopandas<=0.14.2 + - numpy<2 - ipywidgets - pip: - kaleido diff --git a/pyproject.toml b/pyproject.toml index 77cb1aaf..dd5e25d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ dependencies = [ "earthengine-api", "earthranger-client", "geopandas<=0.14.2", + "numpy<2", "pyproj", "rasterio", "tqdm", From 5f230ec8cacc6a08a0a7c995df5d210106c69786 Mon Sep 17 00:00:00 2001 From: Charles Stern <62192187+cisaacstern@users.noreply.github.com> Date: Wed, 21 Aug 2024 07:17:42 -0700 Subject: [PATCH 4/4] print env --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 463736ff..4926dc6a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,14 @@ jobs: with: environment-file: ${{ matrix.env }} + - name: Print env + run: | + python -V + python -c "import geopandas; geopandas.show_versions();" + micromamba info + micromamba list + python -m pip list + - name: Test env: ER_USERNAME: ${{ secrets.ER_USERNAME }}