From edc84f4e891aee41f7665c8b84b4d492ec2fcc6b Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Mon, 4 Sep 2023 12:08:36 +0300 Subject: [PATCH 1/4] Upgrade dependencies --- requirements.in | 1 + requirements.txt | 104 +++++++++++++++++++++++------------------------ 2 files changed, 52 insertions(+), 53 deletions(-) diff --git a/requirements.in b/requirements.in index 84c3d59..cd057ec 100644 --- a/requirements.in +++ b/requirements.in @@ -3,3 +3,4 @@ jinja2 openpyxl pandas pandas-profiling +pydantic<2.0 diff --git a/requirements.txt b/requirements.txt index bc635be..5bac598 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,22 +1,26 @@ # -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: # # pip-compile requirements.in # -attrs==22.1.0 +attrs==23.1.0 # via visions -bokeh==2.4.3 +bokeh==3.2.2 # via -r requirements.in -certifi==2022.9.24 +certifi==2023.7.22 # via requests -charset-normalizer==2.1.1 +charset-normalizer==3.2.0 # via requests +contourpy==1.1.0 + # via + # bokeh + # matplotlib cycler==0.11.0 # via matplotlib et-xmlfile==1.1.0 # via openpyxl -fonttools==4.37.4 +fonttools==4.42.1 # via matplotlib htmlmin==0.1.12 # via pandas-profiling @@ -29,121 +33,115 @@ jinja2==3.1.2 # -r requirements.in # bokeh # pandas-profiling -joblib==1.1.0 +joblib==1.1.1 # via # pandas-profiling # phik -kiwisolver==1.4.4 +kiwisolver==1.4.5 # via matplotlib -markupsafe==2.1.1 - # via jinja2 -matplotlib==3.5.3 +markupsafe==2.1.3 + # via + # jinja2 + # pandas-profiling +matplotlib==3.7.2 # via # missingno # pandas-profiling # phik # seaborn -missingno==0.5.1 +missingno==0.5.2 # via pandas-profiling -multimethod==1.8 +multimethod==1.9.1 # via # pandas-profiling # visions -networkx==2.8.7 +networkx==3.1 # via visions -numpy==1.23.3 +numpy==1.25.2 # via # bokeh + # contourpy # imagehash # matplotlib # missingno # pandas # pandas-profiling - # patsy # phik # pywavelets # scipy # seaborn - # statsmodels # visions -openpyxl==3.0.10 +openpyxl==3.1.2 # via -r requirements.in -packaging==21.3 +packaging==23.1 # via # bokeh # matplotlib - # statsmodels -pandas==1.4.4 +pandas==2.1.0 # via # -r requirements.in + # bokeh # pandas-profiling # phik # seaborn - # statsmodels # visions -pandas-profiling==3.3.0 +pandas-profiling==3.2.0 # via -r requirements.in -patsy==0.5.2 - # via statsmodels -phik==0.12.2 +phik==0.12.3 # via pandas-profiling -pillow==9.2.0 +pillow==10.0.0 # via # bokeh # imagehash # matplotlib # visions -pydantic==1.9.2 - # via pandas-profiling -pyparsing==3.0.9 +pydantic==1.10.12 # via - # matplotlib - # packaging + # -r requirements.in + # pandas-profiling +pyparsing==3.0.9 + # via matplotlib python-dateutil==2.8.2 # via # matplotlib # pandas -pytz==2022.4 +pytz==2023.3 # via pandas pywavelets==1.4.1 # via imagehash -pyyaml==6.0 +pyyaml==6.0.1 # via # bokeh # pandas-profiling -requests==2.28.1 +requests==2.31.0 # via pandas-profiling -scipy==1.9.1 +scipy==1.11.2 # via # imagehash # missingno # pandas-profiling # phik - # seaborn - # statsmodels -seaborn==0.11.2 +seaborn==0.12.2 # via # missingno # pandas-profiling six==1.16.0 - # via - # patsy - # python-dateutil -statsmodels==0.13.2 - # via pandas-profiling + # via python-dateutil tangled-up-in-unicode==0.2.0 # via # pandas-profiling # visions -tornado==6.2 +tornado==6.3.3 # via bokeh -tqdm==4.64.1 +tqdm==4.66.1 # via pandas-profiling -typing-extensions==4.3.0 - # via - # bokeh - # pydantic -urllib3==1.26.12 +typing-extensions==4.7.1 + # via pydantic +tzdata==2023.3 + # via pandas +urllib3==2.0.4 # via requests -visions[type_image_path]==0.7.5 +visions[type_image_path]==0.7.4 # via pandas-profiling +xyzservices==2023.7.0 + # via bokeh From ba95db768d93f6b768cd7c440bea2720870c01a8 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Mon, 4 Sep 2023 12:09:29 +0300 Subject: [PATCH 2/4] Upgrade GHA workflow --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2e81dd..15b496d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,10 +15,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" cache: pip - name: Install dependencies run: python -m pip install -r requirements.txt @@ -26,7 +26,7 @@ jobs: run: make -j3 - uses: actions/setup-node@v3 with: - node-version: '16' + node-version: "20" cache: yarn cache-dependency-path: analysaattori/yarn.lock - run: yarn @@ -38,7 +38,7 @@ jobs: - run: cp -a analysaattori/dist ./out/analysaattori - run: ls -laR out - name: Deploy - uses: JamesIves/github-pages-deploy-action@4.0.0 + uses: JamesIves/github-pages-deploy-action@v4 with: branch: gh-pages folder: out From 9f98b96c68afdb911b96ef993f3ed368944df13f Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Mon, 4 Sep 2023 14:17:49 +0300 Subject: [PATCH 3/4] Switch to ydata-profiling --- pulkka/generate_profiling.py | 2 +- requirements.in | 3 +- requirements.txt | 87 +++++++++++++++++++----------------- 3 files changed, 49 insertions(+), 43 deletions(-) diff --git a/pulkka/generate_profiling.py b/pulkka/generate_profiling.py index 4332b3a..b0f215a 100644 --- a/pulkka/generate_profiling.py +++ b/pulkka/generate_profiling.py @@ -1,6 +1,6 @@ from pulkka.config import OUT_DIR from pulkka.data_ingest import read_data, force_tulot_numeric, force_age_numeric -from pandas_profiling import ProfileReport +from ydata_profiling import ProfileReport def main(): diff --git a/requirements.in b/requirements.in index cd057ec..08d07cc 100644 --- a/requirements.in +++ b/requirements.in @@ -2,5 +2,4 @@ bokeh jinja2 openpyxl pandas -pandas-profiling -pydantic<2.0 +ydata-profiling diff --git a/requirements.txt b/requirements.txt index 5bac598..76e4166 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,87 +18,88 @@ contourpy==1.1.0 # matplotlib cycler==0.11.0 # via matplotlib +dacite==1.8.1 + # via ydata-profiling et-xmlfile==1.1.0 # via openpyxl fonttools==4.42.1 # via matplotlib htmlmin==0.1.12 - # via pandas-profiling + # via ydata-profiling idna==3.4 # via requests imagehash==4.3.1 - # via visions + # via + # visions + # ydata-profiling jinja2==3.1.2 # via # -r requirements.in # bokeh - # pandas-profiling -joblib==1.1.1 - # via - # pandas-profiling - # phik + # ydata-profiling +joblib==1.3.2 + # via phik kiwisolver==1.4.5 # via matplotlib markupsafe==2.1.3 - # via - # jinja2 - # pandas-profiling + # via jinja2 matplotlib==3.7.2 # via - # missingno - # pandas-profiling # phik # seaborn -missingno==0.5.2 - # via pandas-profiling + # wordcloud + # ydata-profiling multimethod==1.9.1 # via - # pandas-profiling # visions + # ydata-profiling networkx==3.1 # via visions -numpy==1.25.2 +numpy==1.23.5 # via # bokeh # contourpy # imagehash # matplotlib - # missingno # pandas - # pandas-profiling + # patsy # phik # pywavelets # scipy # seaborn + # statsmodels # visions + # wordcloud + # ydata-profiling openpyxl==3.1.2 # via -r requirements.in packaging==23.1 # via # bokeh # matplotlib -pandas==2.1.0 + # statsmodels +pandas==2.0.3 # via # -r requirements.in # bokeh - # pandas-profiling # phik # seaborn + # statsmodels # visions -pandas-profiling==3.2.0 - # via -r requirements.in + # ydata-profiling +patsy==0.5.3 + # via statsmodels phik==0.12.3 - # via pandas-profiling + # via ydata-profiling pillow==10.0.0 # via # bokeh # imagehash # matplotlib # visions + # wordcloud pydantic==1.10.12 - # via - # -r requirements.in - # pandas-profiling + # via ydata-profiling pyparsing==3.0.9 # via matplotlib python-dateutil==2.8.2 @@ -112,36 +113,42 @@ pywavelets==1.4.1 pyyaml==6.0.1 # via # bokeh - # pandas-profiling + # ydata-profiling requests==2.31.0 - # via pandas-profiling + # via ydata-profiling scipy==1.11.2 # via # imagehash - # missingno - # pandas-profiling # phik + # statsmodels + # ydata-profiling seaborn==0.12.2 - # via - # missingno - # pandas-profiling + # via ydata-profiling six==1.16.0 - # via python-dateutil -tangled-up-in-unicode==0.2.0 # via - # pandas-profiling - # visions + # patsy + # python-dateutil +statsmodels==0.14.0 + # via ydata-profiling +tangled-up-in-unicode==0.2.0 + # via visions tornado==6.3.3 # via bokeh tqdm==4.66.1 - # via pandas-profiling + # via ydata-profiling +typeguard==2.13.3 + # via ydata-profiling typing-extensions==4.7.1 # via pydantic tzdata==2023.3 # via pandas urllib3==2.0.4 # via requests -visions[type_image_path]==0.7.4 - # via pandas-profiling +visions[type_image_path]==0.7.5 + # via ydata-profiling +wordcloud==1.9.2 + # via ydata-profiling xyzservices==2023.7.0 # via bokeh +ydata-profiling==4.5.1 + # via -r requirements.in From 0cb68e7486204a92490a5f88c8e9ff55096db960 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Sun, 24 Sep 2023 15:34:12 +0300 Subject: [PATCH 4/4] Reorder makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e5355da..cdf7e43 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -DATA_DIR := data/2022 -OUT_DIR := out/2022 YEAR := 2022 +DATA_DIR := data/${YEAR} +OUT_DIR := out/${YEAR} XLSX_URL := https://docs.google.com/spreadsheets/d/1PxBV-MzFlPl1IxOp6EGj6C80HSTgfHcXUhBeL8hZ0Ck/export?format=xlsx TSV_URL := https://docs.google.com/spreadsheets/d/1PxBV-MzFlPl1IxOp6EGj6C80HSTgfHcXUhBeL8hZ0Ck/export?format=tsv