Skip to content

Commit

Permalink
Merge pull request #468 from healthysustainablecities/enhancements
Browse files Browse the repository at this point in the history
Enhancements
  • Loading branch information
carlhiggs authored Jul 25, 2024
2 parents 338588b + f4aa3c8 commit 6768d3f
Show file tree
Hide file tree
Showing 13 changed files with 252 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .ghsci_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.5.3
4.6.0
3 changes: 1 addition & 2 deletions .test-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: "3"
services:
ghsci:
image: globalhealthyliveablecities/global-indicators:v4.5.1
image: globalhealthyliveablecities/global-indicators:v4.6.0
container_name: ghsci
shm_size: 2g
stdin_open: true # docker run -i
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
ghsci:
image: globalhealthyliveablecities/global-indicators:v4.5.2
image: globalhealthyliveablecities/global-indicators:v4.6.0
container_name: ghsci
shm_size: 2g
stdin_open: true # docker run -i
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# >>> docker rmi $(docker images -q) --force
##############################################################################

FROM continuumio/miniconda3:latest as build
FROM continuumio/miniconda3:latest AS build
LABEL maintainer="Global Healthy Liveable City Indicator Study Collaboration Group"
LABEL url="https://github.com/global-healthy-liveable-cities/global-indicators"

Expand All @@ -39,7 +39,7 @@ RUN conda config --set show_channel_urls true && \

# =============================================================================
# Runtime environment
FROM debian:stable-slim as runtime
FROM debian:stable-slim AS runtime

# Install the environment pack
COPY --from=build /env.tar.gz .
Expand Down
16 changes: 7 additions & 9 deletions docker/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,19 @@ channels:
- conda-forge
dependencies:
- python
- osmnx=1.5.* # OpenStreetMap network retrieval and analysis
- osmnx=1.9.3 # OpenStreetMap network retrieval and analysis
- geopandas=1.0.*
- pandas=2.1.*
- fpdf2=2.7.* # pdf templating
- sqlalchemy=1.4.* # SQL connectivity with PostgreSQL
- nicegui=1.4.26 # web app framework
- nicegui=1.4.29 # web app framework
- cryptography=42.0.*,>=42.0.4
- requests=2.31.*
- tornado>=6.3.*
- tornado=6.4.*,>=6.4.1
- fonttools=4.43.*
- jupyterlab=4.0.* # code notebooks / web interface
- jupyter-lsp=2.2.*
- urllib3=2.0.*
- jupyterlab=4.2.* # code notebooks / web interface
- pillow=10.*,>=10.3.0
- pip>=24.*
- pip=24.*
- pyrosm=0.6.* # possible alternate OSM/network retrieval
- orjson=3.9.*,>=3.9.15
- idna>=3.7
- tqdm=4.*, >=4.66.3
- openpyxl
Expand All @@ -33,3 +30,4 @@ dependencies:
- psycopg2 # PostgreSQL connection
- pyyaml # YAML parsing
- websockets
- zipp=3.19.*, >=3.19.1 # https://github.com/healthysustainablecities/global-indicators/security/dependabot/61
98 changes: 49 additions & 49 deletions docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
affine==2.4.0
aiofiles==23.2.1
aiofiles==24.1.0
aiohttp==3.9.5
aiosignal==1.3.1
annotated-types==0.7.0
Expand All @@ -18,7 +18,7 @@ branca==0.7.2
Brotli==1.1.0
cached-property==1.5.2
Cartopy==0.23.0
certifi==2024.2.2
certifi==2024.7.4
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
Expand All @@ -28,34 +28,33 @@ colorama==0.4.6
comm==0.2.2
contextily==1.6.0
contourpy==1.2.1
cryptography==42.0.7
cryptography==42.0.8
cycler==0.12.1
cykhash==2.0.1
Cython==3.0.10
dataclasses==0.8
debugpy==1.8.1
debugpy==1.8.2
decorator==5.1.1
defusedxml==0.7.1
docutils==0.21.2
entrypoints==0.4
et-xmlfile==1.1.0
exceptiongroup==1.2.0
exceptiongroup==1.2.2
executing==2.0.1
fastapi==0.109.2
fastjsonschema==2.19.1
fiona==1.9.6
folium==0.16.0
fastjsonschema==2.20.0
folium==0.17.0
fonttools==4.43.1
fpdf2==2.7.9
fqdn==1.5.1
frozenlist==1.4.1
GDAL==3.8.5
GeoAlchemy2==0.14.7
GDAL==3.9.1
GeoAlchemy2==0.15.2
geographiclib==2.0
geopandas==0.14.4
geopandas==1.0.1
geopy==2.4.1
greenlet==3.0.3
gtfs-lite==0.2.1
gtfs-lite==0.2.2
h11==0.14.0
h2==4.1.0
hpack==4.0.0
Expand All @@ -64,36 +63,36 @@ httpx==0.27.0
hyperframe==6.0.1
idna==3.7
ifaddr==0.2.0
importlib_metadata==7.1.0
importlib_metadata==8.0.0
importlib_resources==6.4.0
ipykernel==6.29.3
ipython==8.25.0
ipykernel==6.29.5
ipython==8.26.0
ipywidgets==8.1.3
isoduration==20.11.0
itsdangerous==2.2.0
jedi==0.19.1
Jinja2==3.1.4
joblib==1.4.2
json5==0.9.25
jsonpointer==2.4
jsonschema==4.22.0
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2023.12.1
jupyter_client==8.6.2
jupyter_core==5.7.2
jupyter-events==0.10.0
jupyter-lsp==2.2.5
jupyter_server==2.14.1
jupyter_server==2.14.2
jupyter_server_terminals==0.5.3
jupyterlab==4.0.13
jupyterlab==4.2.3
jupyterlab_pygments==0.3.0
jupyterlab_server==2.27.2
jupyterlab_server==2.27.3
jupyterlab_widgets==3.0.11
kiwisolver==1.4.5
lxml==5.2.2
mapclassify==2.6.1
markdown2==2.4.13
markdown2==2.5.0
MarkupSafe==2.1.5
matplotlib==3.8.4
matplotlib==3.9.1
matplotlib-inline==0.1.7
mercantile==1.2.1
mistune==3.0.2
Expand All @@ -104,39 +103,40 @@ nbconvert==7.16.4
nbformat==5.10.4
nest_asyncio==1.6.0
networkx==3.3
nicegui==1.4.25.dev0
nicegui==1.4.28.dev0
notebook_shim==0.2.4
numexpr==2.10.0
numpy==1.26.4
openpyxl==3.1.2
orjson==3.9.15
osmnx==1.5.1
openpyxl==3.1.4
orjson==3.10.6
osmnx==1.9.3
overrides==7.7.0
OWSLib==0.31.0
packaging==24.0
packaging==24.1
pandana==0.7
pandas==2.1.4
pandocfilters==1.5.0
parso==0.8.4
pexpect==4.9.0
pickleshare==0.7.5
pillow==10.3.0
pillow==10.4.0
pip==24.0
pkgutil_resolve_name==1.3.10
platformdirs==4.2.2
prometheus_client==0.20.0
prompt-toolkit==3.0.42
prompt_toolkit==3.0.47
pscript==0.7.7
psutil==5.9.8
psutil==6.0.0
psycopg2==2.9.9
ptyprocess==0.7.0
pure-eval==0.2.2
py-cpuinfo==9.0.0
pycparser==2.22
pydantic==2.7.2
pydantic_core==2.18.3
pydantic==2.8.2
pydantic_core==2.20.1
pygeometa==0.15.3
Pygments==2.18.0
pyogrio==0.9.0
pyparsing==3.1.2
pyproj==3.6.1
pyrobuf==0.9.3
Expand All @@ -147,23 +147,22 @@ python-dateutil==2.9.0
python-engineio==4.9.1
python-json-logger==2.0.7
python-multipart==0.0.9
python-rapidjson==1.17
python-socketio==5.11.2
python-rapidjson==1.18
python-socketio==5.11.3
pytz==2024.1
PyYAML==6.0.1
pyzmq==26.0.3
rasterio==1.3.10
referencing==0.35.1
requests==2.31.0
requests==2.32.3
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.18.1
Rtree==1.2.0
scikit-learn==1.5.0
scipy==1.13.1
rpds-py==0.19.0
scikit-learn==1.5.1
scipy==1.14.0
Send2Trash==1.8.3
setuptools==70.0.0
shapely==2.0.4
setuptools==71.0.1
shapely==2.0.5
simple-websocket==1.0.0
six==1.16.0
sniffio==1.3.1
Expand All @@ -178,27 +177,28 @@ terminado==0.18.1
threadpoolctl==3.5.0
tinycss2==1.3.0
tomli==2.0.1
tornado==6.4
tornado==6.4.1
tqdm==4.66.4
traitlets==5.14.3
types-python-dateutil==2.9.0.20240316
typing_extensions==4.12.1
typing_extensions==4.12.2
typing-utils==0.1.0
tzdata==2024.1
uharfbuzz==0.39.1
uharfbuzz==0.39.3
uri-template==1.3.0
urllib3==2.0.7
uvicorn==0.30.0
urllib3==2.2.2
uvicorn==0.30.1
vbuild==0.8.2
watchfiles==0.22.0
wcwidth==0.2.13
webcolors==1.13
webcolors==24.6.0
webencodings==0.5.1
websocket-client==1.8.0
websockets==12.0
wheel==0.43.0
widgetsnbextension==4.0.11
wsproto==1.2.0
xyzservices==2024.4.0
xyzservices==2024.6.0
yarl==1.9.4
zipp==3.17.0
zipp==3.19.2
zstandard==0.23.0
1 change: 1 addition & 0 deletions process/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def analysis(r):
"When using psql, you can type '\\dt' to list database tables, '\\d <table_name>' to list table columns, and 'SELECT * FROM <table_name> LIMIT 10;' to view the first 10 rows of a table. To exit psql, enter '\\q'."
'\n\n',
)
append_to_log_file.close()


def main():
Expand Down
Binary file modified process/configuration/templates/_report_configuration.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion process/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.12.4"
}
},
"nbformat": 4,
Expand Down
12 changes: 9 additions & 3 deletions process/subprocesses/bulk_gdal_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ def valid_path(arg):
description='Generate origin destination matrix',
)
parser.add_argument(
'-dir', help='parent directory', default=cwd, type=valid_path,
'-dir',
help='parent directory',
default=cwd,
type=valid_path,
)
parser.add_argument(
'-outfile', help='outfile name', default='gdal_merged.tif', type=str,
'-outfile',
help='outfile name',
default='gdal_merged.tif',
type=str,
)
parser.add_argument(
'-gdal_loc',
Expand All @@ -39,7 +45,7 @@ def valid_path(arg):

# initialise tif list file
tif_list_name = 'tif_list_{date:%Y-%m-%d}.txt'.format(
date=datetime.datetime.now(),
date=datetime.datetime.now(datetime.UTC),
)
tif_list_path = os.path.join(args.dir, tif_list_name)
tif_list = open(tif_list_path, 'w')
Expand Down
Loading

0 comments on commit 6768d3f

Please sign in to comment.