From 4ad2482577c3b1c442f991b39f7b2fb1439578eb Mon Sep 17 00:00:00 2001 From: VijithaEkanayake Date: Wed, 14 Feb 2024 16:03:09 +0530 Subject: [PATCH 1/7] feat: Support python 3.10 runtime in apps Fixes: https://github.com/h2oai/wave-apps/issues/125 --- churn-risk/app.toml | 2 +- churn-risk/requirements.txt | 4 ++-- credit-risk/app.toml | 2 +- credit-risk/requirements.txt | 6 ++--- credit-risk/src/app.py | 2 +- explaining-ratings/app.toml | 2 +- explaining-ratings/requirements.txt | 2 +- guess-the-number/app.toml | 2 +- guess-the-number/guess_the_number/guess.py | 22 +++++++++---------- guess-the-number/requirements.txt | 22 +++++++++---------- insurance-churn-risk/app.toml | 2 +- insurance-churn-risk/requirements.txt | 4 ++-- sales-forecasting/requirements.txt | 4 ++-- shopping-cart-recommendations/app.toml | 2 +- .../requirements.txt | 2 +- .../requirements.txt | 2 +- twitter-sentiment/app.toml | 2 +- 17 files changed, 42 insertions(+), 42 deletions(-) diff --git a/churn-risk/app.toml b/churn-risk/app.toml index da714259..00248a2d 100644 --- a/churn-risk/app.toml +++ b/churn-risk/app.toml @@ -1,6 +1,6 @@ [App] Name = "ai.h2o.wave.churn-risk" -Version = "1.1.0" +Version = "1.2.0" Title = "Telco Churn Risk" Description = "Demo to predict churn risk of telco customers and display top reason codes." LongDescription = "about.md" diff --git a/churn-risk/requirements.txt b/churn-risk/requirements.txt index 8cb2308d..2e8a508f 100644 --- a/churn-risk/requirements.txt +++ b/churn-risk/requirements.txt @@ -1,5 +1,5 @@ -pandas==1.1.0 -pygments==2.7.1 +pandas==1.4.0 +Pygments==2.15.0 h2o-wave<1.0 h2o-wave-ml>=0.7.0 https://h2o-release.s3.amazonaws.com/h2o/rel-zizler/7/Python/h2o-3.34.0.7-py2.py3-none-any.whl diff --git a/credit-risk/app.toml b/credit-risk/app.toml index a7d4d65e..5065adf8 100644 --- a/credit-risk/app.toml +++ b/credit-risk/app.toml @@ -1,6 +1,6 @@ [App] Name = "ai.h2o.wave.credit-risk" -Version = "1.1.0" +Version = "1.2.0" Title = "Credit Card Risk" Description = "Demo for business users to review and update model predictions." LongDescription = "about.md" diff --git a/credit-risk/requirements.txt b/credit-risk/requirements.txt index 61ec1d4a..3fa550d3 100644 --- a/credit-risk/requirements.txt +++ b/credit-risk/requirements.txt @@ -1,7 +1,7 @@ -numpy==1.19.1 -pandas==1.1.0 +numpy==1.21.0 +pandas==1.4.0 plotly==4.10.0 -pygments==2.7.1 +pygments==2.15.0 h2o-wave<1.0 h2o-wave-ml>=0.7.0 requests diff --git a/credit-risk/src/app.py b/credit-risk/src/app.py index 5c7e93e2..54e9374f 100644 --- a/credit-risk/src/app.py +++ b/credit-risk/src/app.py @@ -160,7 +160,7 @@ async def render_customer_page(q: Q): ) # summary - top_feature = contribs.idxmin(axis=1) if approve else contribs.idxmax(axis=1) + top_feature = contribs.idxmin(axis=0) if approve else contribs.idxmax(axis=0) explanation_data = { 'will_or_will_not': 'will' if approve else 'will not', 'top_contributing_feature': top_feature, diff --git a/explaining-ratings/app.toml b/explaining-ratings/app.toml index 96caa819..3a90e64e 100644 --- a/explaining-ratings/app.toml +++ b/explaining-ratings/app.toml @@ -1,6 +1,6 @@ [App] Name = "ai.h2o.wave.explaining-ratings" -Version = "1.1.0" +Version = "1.2.0" Title = "Explainable Hotel Ratings" Description = "Demo to visually explore and compare predictions from text data." LongDescription = "about.md" diff --git a/explaining-ratings/requirements.txt b/explaining-ratings/requirements.txt index 2e822ec0..134b3f12 100644 --- a/explaining-ratings/requirements.txt +++ b/explaining-ratings/requirements.txt @@ -1,4 +1,4 @@ -pandas==1.1.0 +pandas==1.4.0 h2o-wave<1.0 matplotlib wordcloud \ No newline at end of file diff --git a/guess-the-number/app.toml b/guess-the-number/app.toml index 5e1773a4..a801fb61 100644 --- a/guess-the-number/app.toml +++ b/guess-the-number/app.toml @@ -1,6 +1,6 @@ [App] Name = "ai.h2o.wave.h2o-guess-the-number" -Version = "1.1.0" +Version = "1.2.0" Title = "Guess the Number" Description = "Prove you’re smarter than AI with this simple game." LongDescription = "about.md" diff --git a/guess-the-number/guess_the_number/guess.py b/guess-the-number/guess_the_number/guess.py index 928e746b..13c06076 100644 --- a/guess-the-number/guess_the_number/guess.py +++ b/guess-the-number/guess_the_number/guess.py @@ -357,24 +357,24 @@ async def client_initialize(q: Q): async def theme_switch_handler(q: Q): - q.client.active_theme = 'h2o-dark' if q.args.toggle_theme else 'default' + q.client.active_theme = 'h2o-dark' if 'toggle_theme' in q.args.data and q.args.data['toggle_theme'] else 'default' q.page['meta'].theme = q.client.active_theme await q.page.save() async def run_app(q: Q): - if q.args.start_game: - if q.args.submit_game: + if 'start_game' in q.args.data and q.args.data['start_game']: + if 'submit_game' in q.args.data and q.args.data['submit_game']: q.client.game.is_public = True q.app.games[q.client.game.game_id] = q.client.game del q.page['leaderboard'] del q.page['hello'] await start_new_game(q) - elif q.args.quit_game: + elif 'quit_game' in q.args.data and q.args.data['quit_game']: del q.page['starting_game'] await make_welcome_card(q) - elif q.args.guess: - message = q.client.game.guess(q.args.guess) + elif 'guess' in q.args.data and q.args.data['guess']: + message = q.client.game.guess(q.args.data['guess']) if message == 'You Got It!': q.page['starting_game'].items = [ ui.text_l( @@ -421,7 +421,7 @@ async def run_app(q: Q): label='your guess', min=1, max=100, - value=q.args.guess, + value=q.args.data['guess'] if 'guess' in q.args.data else "", trigger=True, ), ui.text_xs('⠀'), @@ -430,16 +430,16 @@ async def run_app(q: Q): justify='center', ), ] - elif q.args.leaderboard: - if q.args.submit_game: + elif 'leaderboard' in q.args.data and q.args.data['leaderboard']: + if 'submit_game' in q.args.data and q.args.data['submit_game']: q.client.game.is_public = True q.app.games[q.client.game.game_id] = q.client.game del q.page['starting_game'] await show_leaderboard(q) - elif q.args.private_leaderboard: + elif 'private_leaderboard' in q.args.data and q.args.data['private_leaderboard']: await show_private_leaderboard(q) - if q.args.toggle_theme is not None: + if 'toggle_theme' in q.args.data and q.args.data['toggle_theme'] is not None: await theme_switch_handler(q) await q.page.save() diff --git a/guess-the-number/requirements.txt b/guess-the-number/requirements.txt index 52d0f8e5..8381187c 100644 --- a/guess-the-number/requirements.txt +++ b/guess-the-number/requirements.txt @@ -1,12 +1,12 @@ -certifi==2020.12.5; python_version >= "3.6" and python_full_version >= "3.6.1" -click==7.1.2; python_full_version >= "3.6.1" -h11==0.11.0; python_version >= "3.6" and python_full_version >= "3.6.1" +certifi==2020.12.5 +click==7.1.2 +h11==0.11.0 h2o-wave<1.0 -httpcore==0.12.2; python_version >= "3.6" and python_full_version >= "3.6.1" -httpx==0.16.1; python_version >= "3.6" and python_full_version >= "3.6.1" -idna==2.10; python_version >= "3.6" and python_full_version >= "3.6.1" -rfc3986==1.4.0; python_version >= "3.6" and python_full_version >= "3.6.1" -sniffio==1.2.0; python_version >= "3.6" and python_full_version >= "3.6.1" -starlette==0.13.8; python_version >= "3.6" and python_full_version >= "3.6.1" -typing-extensions==3.7.4.3; python_version < "3.8" and python_full_version >= "3.6.1" -uvicorn==0.12.2; python_full_version >= "3.6.1" +httpcore==0.12.2 +httpx==0.16.1 +idna==2.10 +rfc3986==1.4.0 +sniffio==1.2.0 +starlette==0.13.8 +typing-extensions==3.7.4.3 +uvicorn==0.12.2 diff --git a/insurance-churn-risk/app.toml b/insurance-churn-risk/app.toml index 0e339b58..a57d4d30 100644 --- a/insurance-churn-risk/app.toml +++ b/insurance-churn-risk/app.toml @@ -1,6 +1,6 @@ [App] Name = "ai.h2o.wave.insurance-churn-risk" -Version = "1.1.0" +Version = "1.2.0" Title = "Home Insurance Churn Risk" Description = "Demo to predict churn risk of insurance customers and display top factors." LongDescription = "about.md" diff --git a/insurance-churn-risk/requirements.txt b/insurance-churn-risk/requirements.txt index d5ccb6ff..8f625de3 100644 --- a/insurance-churn-risk/requirements.txt +++ b/insurance-churn-risk/requirements.txt @@ -1,5 +1,5 @@ -pandas==1.1.0 -pygments==2.7.1 +pandas==1.4.0 +Pygments==2.15.0 h2o-wave<1.0 h2o-wave-ml>=0.6.0 https://h2o-release.s3.amazonaws.com/h2o/rel-zizler/7/Python/h2o-3.34.0.7-py2.py3-none-any.whl diff --git a/sales-forecasting/requirements.txt b/sales-forecasting/requirements.txt index 325f33da..54230e02 100644 --- a/sales-forecasting/requirements.txt +++ b/sales-forecasting/requirements.txt @@ -8,8 +8,8 @@ httpcore==0.12.2; python_version >= "3.6" and python_full_version >= "3.6.1" httpx==0.16.1; python_version >= "3.6" and python_full_version >= "3.6.1" idna==2.10; python_version >= "3.6" and python_full_version >= "3.6.1" jmespath==0.10.0; python_version >= "2.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" -numpy==1.19.4; python_version >= "3.6" and python_full_version >= "3.6.1" -pandas==1.1.4; python_full_version >= "3.6.1" +numpy==1.21.0; python_version >= "3.6" and python_full_version >= "3.6.1" +pandas==1.4.0; python_version >= "3.6" and python_full_version >= "3.6.1" python-dateutil==2.8.1; python_full_version >= "3.6.1" pytz==2020.4; python_full_version >= "3.6.1" rfc3986==1.4.0; python_version >= "3.6" and python_full_version >= "3.6.1" diff --git a/shopping-cart-recommendations/app.toml b/shopping-cart-recommendations/app.toml index 0106665d..09ca31e7 100644 --- a/shopping-cart-recommendations/app.toml +++ b/shopping-cart-recommendations/app.toml @@ -1,6 +1,6 @@ [App] Name = "ai.h2o.wave.shopping-cart-recommendations" -Version = "1.1.0" +Version = "1.2.0" Title = "Shopping Cart Recommendations" Description = "Demo of a recommendation engine on groceries items." LongDescription="about.md" diff --git a/shopping-cart-recommendations/requirements.txt b/shopping-cart-recommendations/requirements.txt index 62f4f724..4e477ae9 100644 --- a/shopping-cart-recommendations/requirements.txt +++ b/shopping-cart-recommendations/requirements.txt @@ -1,2 +1,2 @@ h2o-wave<1.0 -pandas==1.1.4 +pandas==1.4.0 diff --git a/template-explore-binary-classification/requirements.txt b/template-explore-binary-classification/requirements.txt index 0468ec28..db4c4c25 100644 --- a/template-explore-binary-classification/requirements.txt +++ b/template-explore-binary-classification/requirements.txt @@ -1,5 +1,5 @@ h2o_wave==0.20.0 toml==0.10.2 loguru==0.6.0 -pandas==1.4.1 +pandas==1.4.0 matplotlib==3.5.1 \ No newline at end of file diff --git a/twitter-sentiment/app.toml b/twitter-sentiment/app.toml index d8585c03..d5e212bc 100644 --- a/twitter-sentiment/app.toml +++ b/twitter-sentiment/app.toml @@ -1,6 +1,6 @@ [App] Name = "ai.h2o.wave.twitter-sentiment" -Version = "1.1.0" +Version = "1.2.0" Title = "Twitter Sentiment" Description = "Search keywords on twitter and see the sentiments of the latest tweets." LongDescription="about.md" From 7358b87f58d1590cb02a07795bef81a6b5536fe4 Mon Sep 17 00:00:00 2001 From: VijithaEkanayake Date: Wed, 14 Feb 2024 17:59:59 +0530 Subject: [PATCH 2/7] chore: update starlette to 0.37.1 Fixes: https://github.com/h2oai/wave-apps/issues/125 --- .github/workflows/snyk-scan.yaml | 12 ++++++------ guess-the-number/requirements.txt | 4 ++-- sales-forecasting/requirements.txt | 4 ++-- .../requirements.txt | 6 ++++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/snyk-scan.yaml b/.github/workflows/snyk-scan.yaml index 51fa73cd..dbf84f6c 100644 --- a/.github/workflows/snyk-scan.yaml +++ b/.github/workflows/snyk-scan.yaml @@ -19,7 +19,7 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.10' - name: Check changed Deps files uses: tj-actions/changed-files@v35 @@ -42,12 +42,12 @@ jobs: sed '/^\.\//d; /^https:\/\//d; /^flake8/d; /^black==/d' requirements.txt > t.txt \ && mv t.txt requirements.txt - python3.8 -m pip install -r requirements.txt && cd $topdir + python3.10 -m pip install -r requirements.txt && cd $topdir snyk test \ -d \ --file=$file \ - --command=python3.8 \ + --command=python3.10 \ --skip-unresolved \ --package-manager=pip done @@ -66,7 +66,7 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.10' - name: Monitor Python dependencies env: @@ -80,12 +80,12 @@ jobs: sed '/^\.\//d; /^https:\/\//d; /^flake8/d; /^black==/d' requirements.txt > t.txt \ && mv t.txt requirements.txt - python3.8 -m pip install -r requirements.txt && cd $topdir + python3.10 -m pip install -r requirements.txt && cd $topdir snyk monitor \ -d \ --file=$file \ - --command=python3.8 \ + --command=python3.10 \ --skip-unresolved \ --package-manager=pip \ --remote-repo-url=wave-apps/${{ steps.extract_ref.outputs.ref }} \ diff --git a/guess-the-number/requirements.txt b/guess-the-number/requirements.txt index 8381187c..86814403 100644 --- a/guess-the-number/requirements.txt +++ b/guess-the-number/requirements.txt @@ -7,6 +7,6 @@ httpx==0.16.1 idna==2.10 rfc3986==1.4.0 sniffio==1.2.0 -starlette==0.13.8 -typing-extensions==3.7.4.3 +starlette==0.37.1 +typing-extensions==3.10.0 uvicorn==0.12.2 diff --git a/sales-forecasting/requirements.txt b/sales-forecasting/requirements.txt index 54230e02..72c5a60e 100644 --- a/sales-forecasting/requirements.txt +++ b/sales-forecasting/requirements.txt @@ -16,7 +16,7 @@ rfc3986==1.4.0; python_version >= "3.6" and python_full_version >= "3.6.1" s3transfer==0.3.3 six==1.15.0; python_full_version >= "3.6.1" sniffio==1.2.0; python_version >= "3.6" and python_full_version >= "3.6.1" -starlette==0.13.8; python_version >= "3.6" and python_full_version >= "3.6.1" -typing-extensions==3.7.4.3; python_version < "3.8" and python_full_version >= "3.6.1" +starlette==0.37.1 +typing-extensions==3.10.0 urllib3==1.26.2; python_version >= "2.7" and python_full_version < "3.0.0" and python_version != "3.4" or python_full_version >= "3.5.0" and python_version < "4" and python_version != "3.4" uvicorn==0.12.2; python_full_version >= "3.6.1" diff --git a/template-explore-binary-classification/requirements.txt b/template-explore-binary-classification/requirements.txt index db4c4c25..c29b9436 100644 --- a/template-explore-binary-classification/requirements.txt +++ b/template-explore-binary-classification/requirements.txt @@ -1,5 +1,7 @@ -h2o_wave==0.20.0 +h2o_wave==0.26.3 toml==0.10.2 loguru==0.6.0 pandas==1.4.0 -matplotlib==3.5.1 \ No newline at end of file +matplotlib==3.5.1 +starlette==0.37.1 +typing-extensions==3.10.0 From 8143ae8156d4d1ba853220175b4175464e84209d Mon Sep 17 00:00:00 2001 From: VijithaEkanayake Date: Wed, 14 Feb 2024 21:49:23 +0530 Subject: [PATCH 3/7] chore: Update dependencies Fixes: https://github.com/h2oai/wave-apps/issues/125 --- churn-risk/.snyk | 5 +++++ credit-risk/.snyk | 5 +++++ guess-the-number/requirements.txt | 2 +- insurance-churn-risk/.snyk | 5 +++++ insurance-churn-risk/requirements.txt | 3 ++- sales-forecasting/requirements.txt | 2 +- shopping-cart-recommendations/requirements.txt | 1 + template-explore-binary-classification/requirements.txt | 1 + 8 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 churn-risk/.snyk create mode 100644 credit-risk/.snyk create mode 100644 insurance-churn-risk/.snyk diff --git a/churn-risk/.snyk b/churn-risk/.snyk new file mode 100644 index 00000000..78a523d6 --- /dev/null +++ b/churn-risk/.snyk @@ -0,0 +1,5 @@ +ignore: + SNYK-PYTHON-H2O-6125908: + - "*": + reason: Not fixed version for h2o yet + expires: 2025-01-01T00:00:00.000Z diff --git a/credit-risk/.snyk b/credit-risk/.snyk new file mode 100644 index 00000000..78a523d6 --- /dev/null +++ b/credit-risk/.snyk @@ -0,0 +1,5 @@ +ignore: + SNYK-PYTHON-H2O-6125908: + - "*": + reason: Not fixed version for h2o yet + expires: 2025-01-01T00:00:00.000Z diff --git a/guess-the-number/requirements.txt b/guess-the-number/requirements.txt index 86814403..450d9faf 100644 --- a/guess-the-number/requirements.txt +++ b/guess-the-number/requirements.txt @@ -1,4 +1,4 @@ -certifi==2020.12.5 +certifi==2024.2.2 click==7.1.2 h11==0.11.0 h2o-wave<1.0 diff --git a/insurance-churn-risk/.snyk b/insurance-churn-risk/.snyk new file mode 100644 index 00000000..78a523d6 --- /dev/null +++ b/insurance-churn-risk/.snyk @@ -0,0 +1,5 @@ +ignore: + SNYK-PYTHON-H2O-6125908: + - "*": + reason: Not fixed version for h2o yet + expires: 2025-01-01T00:00:00.000Z diff --git a/insurance-churn-risk/requirements.txt b/insurance-churn-risk/requirements.txt index 8f625de3..8076c261 100644 --- a/insurance-churn-risk/requirements.txt +++ b/insurance-churn-risk/requirements.txt @@ -1,5 +1,6 @@ +certifi==2024.2.2 pandas==1.4.0 -Pygments==2.15.0 +pygments==2.15.0 h2o-wave<1.0 h2o-wave-ml>=0.6.0 https://h2o-release.s3.amazonaws.com/h2o/rel-zizler/7/Python/h2o-3.34.0.7-py2.py3-none-any.whl diff --git a/sales-forecasting/requirements.txt b/sales-forecasting/requirements.txt index 72c5a60e..3fe60ca3 100644 --- a/sales-forecasting/requirements.txt +++ b/sales-forecasting/requirements.txt @@ -1,6 +1,6 @@ boto3==1.16.23 botocore==1.19.23 -certifi==2020.11.8; python_version >= "3.6" and python_full_version >= "3.6.1" +certifi==2024.2.2 click==7.1.2; python_full_version >= "3.6.1" h11==0.11.0; python_version >= "3.6" and python_full_version >= "3.6.1" h2o-wave<1.0; python_full_version >= "3.6.1" diff --git a/shopping-cart-recommendations/requirements.txt b/shopping-cart-recommendations/requirements.txt index 4e477ae9..c4f7489d 100644 --- a/shopping-cart-recommendations/requirements.txt +++ b/shopping-cart-recommendations/requirements.txt @@ -1,2 +1,3 @@ +certifi==2024.2.2 h2o-wave<1.0 pandas==1.4.0 diff --git a/template-explore-binary-classification/requirements.txt b/template-explore-binary-classification/requirements.txt index c29b9436..0dbfebc0 100644 --- a/template-explore-binary-classification/requirements.txt +++ b/template-explore-binary-classification/requirements.txt @@ -1,3 +1,4 @@ +certifi==2024.2.2 h2o_wave==0.26.3 toml==0.10.2 loguru==0.6.0 From 37d15d2b5db42da7071f08ddf0b80bbc0f99fab8 Mon Sep 17 00:00:00 2001 From: VijithaEkanayake Date: Wed, 14 Feb 2024 22:49:43 +0530 Subject: [PATCH 4/7] chore: Add .synk configurations Fixes: https://github.com/h2oai/wave-apps/issues/125 --- churn-risk/.snyk | 4 ++++ churn-risk/requirements.txt | 1 + credit-risk/.snyk | 4 ++++ credit-risk/requirements.txt | 3 ++- explaining-ratings/.snyk | 5 +++++ explaining-ratings/requirements.txt | 4 +++- guess-the-number/.snyk | 5 +++++ guess-the-number/requirements.txt | 6 +++--- insurance-churn-risk/.snyk | 4 ++++ insurance-churn-risk/requirements.txt | 2 ++ sales-forecasting/.snyk | 5 +++++ sales-forecasting/requirements.txt | 10 +++++----- shopping-cart-recommendations/.snyk | 5 +++++ shopping-cart-recommendations/requirements.txt | 2 ++ template-explore-binary-classification/.snyk | 5 +++++ .../requirements.txt | 3 +++ 16 files changed, 58 insertions(+), 10 deletions(-) create mode 100644 explaining-ratings/.snyk create mode 100644 guess-the-number/.snyk create mode 100644 sales-forecasting/.snyk create mode 100644 shopping-cart-recommendations/.snyk create mode 100644 template-explore-binary-classification/.snyk diff --git a/churn-risk/.snyk b/churn-risk/.snyk index 78a523d6..1fe908a7 100644 --- a/churn-risk/.snyk +++ b/churn-risk/.snyk @@ -3,3 +3,7 @@ ignore: - "*": reason: Not fixed version for h2o yet expires: 2025-01-01T00:00:00.000Z + snyk:lic:pip:certifi:MPL-2.0: + - "*": + reason: False positive + expires: 2025-01-01T00:00:00.000Z diff --git a/churn-risk/requirements.txt b/churn-risk/requirements.txt index 2e8a508f..34356eb2 100644 --- a/churn-risk/requirements.txt +++ b/churn-risk/requirements.txt @@ -3,6 +3,7 @@ Pygments==2.15.0 h2o-wave<1.0 h2o-wave-ml>=0.7.0 https://h2o-release.s3.amazonaws.com/h2o/rel-zizler/7/Python/h2o-3.34.0.7-py2.py3-none-any.whl +setuptools==65.5.1 black==20.8b1 flake8-black==0.2.1 diff --git a/credit-risk/.snyk b/credit-risk/.snyk index 78a523d6..1fe908a7 100644 --- a/credit-risk/.snyk +++ b/credit-risk/.snyk @@ -3,3 +3,7 @@ ignore: - "*": reason: Not fixed version for h2o yet expires: 2025-01-01T00:00:00.000Z + snyk:lic:pip:certifi:MPL-2.0: + - "*": + reason: False positive + expires: 2025-01-01T00:00:00.000Z diff --git a/credit-risk/requirements.txt b/credit-risk/requirements.txt index 3fa550d3..415f4241 100644 --- a/credit-risk/requirements.txt +++ b/credit-risk/requirements.txt @@ -1,4 +1,4 @@ -numpy==1.21.0 +numpy==1.22.2 pandas==1.4.0 plotly==4.10.0 pygments==2.15.0 @@ -8,4 +8,5 @@ requests tabulate colorama>=0.3.8 future +setuptools==65.5.1 https://h2o-release.s3.amazonaws.com/h2o/rel-zizler/7/Python/h2o-3.34.0.7-py2.py3-none-any.whl diff --git a/explaining-ratings/.snyk b/explaining-ratings/.snyk new file mode 100644 index 00000000..041b3462 --- /dev/null +++ b/explaining-ratings/.snyk @@ -0,0 +1,5 @@ +ignore: + snyk:lic:pip:certifi:MPL-2.0: + - "*": + reason: False positive + expires: 2025-01-01T00:00:00.000Z diff --git a/explaining-ratings/requirements.txt b/explaining-ratings/requirements.txt index 134b3f12..b08a7d5d 100644 --- a/explaining-ratings/requirements.txt +++ b/explaining-ratings/requirements.txt @@ -1,4 +1,6 @@ pandas==1.4.0 h2o-wave<1.0 matplotlib -wordcloud \ No newline at end of file +wordcloud +numpy==1.22.2 +setuptools==65.5.1 \ No newline at end of file diff --git a/guess-the-number/.snyk b/guess-the-number/.snyk new file mode 100644 index 00000000..041b3462 --- /dev/null +++ b/guess-the-number/.snyk @@ -0,0 +1,5 @@ +ignore: + snyk:lic:pip:certifi:MPL-2.0: + - "*": + reason: False positive + expires: 2025-01-01T00:00:00.000Z diff --git a/guess-the-number/requirements.txt b/guess-the-number/requirements.txt index 450d9faf..e03804fa 100644 --- a/guess-the-number/requirements.txt +++ b/guess-the-number/requirements.txt @@ -2,11 +2,11 @@ certifi==2024.2.2 click==7.1.2 h11==0.11.0 h2o-wave<1.0 -httpcore==0.12.2 -httpx==0.16.1 +httpcore==0.15.0 +httpx==0.23.0 idna==2.10 rfc3986==1.4.0 sniffio==1.2.0 starlette==0.37.1 typing-extensions==3.10.0 -uvicorn==0.12.2 +uvicorn==0.12.3 diff --git a/insurance-churn-risk/.snyk b/insurance-churn-risk/.snyk index 78a523d6..1fe908a7 100644 --- a/insurance-churn-risk/.snyk +++ b/insurance-churn-risk/.snyk @@ -3,3 +3,7 @@ ignore: - "*": reason: Not fixed version for h2o yet expires: 2025-01-01T00:00:00.000Z + snyk:lic:pip:certifi:MPL-2.0: + - "*": + reason: False positive + expires: 2025-01-01T00:00:00.000Z diff --git a/insurance-churn-risk/requirements.txt b/insurance-churn-risk/requirements.txt index 8076c261..1c14a6c5 100644 --- a/insurance-churn-risk/requirements.txt +++ b/insurance-churn-risk/requirements.txt @@ -3,6 +3,8 @@ pandas==1.4.0 pygments==2.15.0 h2o-wave<1.0 h2o-wave-ml>=0.6.0 +numpy==1.22.2 +setuptools==65.5.1 https://h2o-release.s3.amazonaws.com/h2o/rel-zizler/7/Python/h2o-3.34.0.7-py2.py3-none-any.whl black==20.8b1 diff --git a/sales-forecasting/.snyk b/sales-forecasting/.snyk new file mode 100644 index 00000000..041b3462 --- /dev/null +++ b/sales-forecasting/.snyk @@ -0,0 +1,5 @@ +ignore: + snyk:lic:pip:certifi:MPL-2.0: + - "*": + reason: False positive + expires: 2025-01-01T00:00:00.000Z diff --git a/sales-forecasting/requirements.txt b/sales-forecasting/requirements.txt index 3fe60ca3..67a60ec4 100644 --- a/sales-forecasting/requirements.txt +++ b/sales-forecasting/requirements.txt @@ -4,11 +4,11 @@ certifi==2024.2.2 click==7.1.2; python_full_version >= "3.6.1" h11==0.11.0; python_version >= "3.6" and python_full_version >= "3.6.1" h2o-wave<1.0; python_full_version >= "3.6.1" -httpcore==0.12.2; python_version >= "3.6" and python_full_version >= "3.6.1" -httpx==0.16.1; python_version >= "3.6" and python_full_version >= "3.6.1" +httpcore==0.15.0 +httpx==0.23.0 idna==2.10; python_version >= "3.6" and python_full_version >= "3.6.1" jmespath==0.10.0; python_version >= "2.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" -numpy==1.21.0; python_version >= "3.6" and python_full_version >= "3.6.1" +numpy==1.22.2 pandas==1.4.0; python_version >= "3.6" and python_full_version >= "3.6.1" python-dateutil==2.8.1; python_full_version >= "3.6.1" pytz==2020.4; python_full_version >= "3.6.1" @@ -18,5 +18,5 @@ six==1.15.0; python_full_version >= "3.6.1" sniffio==1.2.0; python_version >= "3.6" and python_full_version >= "3.6.1" starlette==0.37.1 typing-extensions==3.10.0 -urllib3==1.26.2; python_version >= "2.7" and python_full_version < "3.0.0" and python_version != "3.4" or python_full_version >= "3.5.0" and python_version < "4" and python_version != "3.4" -uvicorn==0.12.2; python_full_version >= "3.6.1" +urllib3==1.26.18 +uvicorn==0.12.3 diff --git a/shopping-cart-recommendations/.snyk b/shopping-cart-recommendations/.snyk new file mode 100644 index 00000000..041b3462 --- /dev/null +++ b/shopping-cart-recommendations/.snyk @@ -0,0 +1,5 @@ +ignore: + snyk:lic:pip:certifi:MPL-2.0: + - "*": + reason: False positive + expires: 2025-01-01T00:00:00.000Z diff --git a/shopping-cart-recommendations/requirements.txt b/shopping-cart-recommendations/requirements.txt index c4f7489d..a30e7937 100644 --- a/shopping-cart-recommendations/requirements.txt +++ b/shopping-cart-recommendations/requirements.txt @@ -1,3 +1,5 @@ certifi==2024.2.2 h2o-wave<1.0 pandas==1.4.0 +numpy==1.22.2 +urllib3==1.26.18 diff --git a/template-explore-binary-classification/.snyk b/template-explore-binary-classification/.snyk new file mode 100644 index 00000000..041b3462 --- /dev/null +++ b/template-explore-binary-classification/.snyk @@ -0,0 +1,5 @@ +ignore: + snyk:lic:pip:certifi:MPL-2.0: + - "*": + reason: False positive + expires: 2025-01-01T00:00:00.000Z diff --git a/template-explore-binary-classification/requirements.txt b/template-explore-binary-classification/requirements.txt index 0dbfebc0..6e970ee2 100644 --- a/template-explore-binary-classification/requirements.txt +++ b/template-explore-binary-classification/requirements.txt @@ -6,3 +6,6 @@ pandas==1.4.0 matplotlib==3.5.1 starlette==0.37.1 typing-extensions==3.10.0 +httpcore==0.15.0 +httpx==0.23.0 +setuptools==65.5.1 From c51419603c7b5892d38b3da2e9df74f716a3e507 Mon Sep 17 00:00:00 2001 From: VijithaEkanayake Date: Fri, 16 Feb 2024 11:21:26 +0530 Subject: [PATCH 5/7] chore: Address review suggestions Fixes: https://github.com/h2oai/wave-apps/issues/125 --- churn-risk/requirements.txt | 4 +-- credit-risk/requirements.txt | 12 +++---- explaining-ratings/requirements.txt | 8 ++--- insurance-churn-risk/requirements.txt | 6 ++-- sales-forecasting/requirements.txt | 32 +++++++++---------- .../requirements.txt | 4 +-- .../requirements.txt | 2 +- 7 files changed, 34 insertions(+), 34 deletions(-) diff --git a/churn-risk/requirements.txt b/churn-risk/requirements.txt index 34356eb2..d8e68b5d 100644 --- a/churn-risk/requirements.txt +++ b/churn-risk/requirements.txt @@ -1,5 +1,5 @@ -pandas==1.4.0 -Pygments==2.15.0 +pandas==1.5.3 +pygments==2.17.2 h2o-wave<1.0 h2o-wave-ml>=0.7.0 https://h2o-release.s3.amazonaws.com/h2o/rel-zizler/7/Python/h2o-3.34.0.7-py2.py3-none-any.whl diff --git a/credit-risk/requirements.txt b/credit-risk/requirements.txt index 415f4241..c7663bf9 100644 --- a/credit-risk/requirements.txt +++ b/credit-risk/requirements.txt @@ -1,12 +1,12 @@ -numpy==1.22.2 -pandas==1.4.0 +numpy==1.26.4 +pandas==1.5.3 plotly==4.10.0 -pygments==2.15.0 +pygments==2.17.2 h2o-wave<1.0 h2o-wave-ml>=0.7.0 -requests -tabulate +requests==2.31.0 +tabulate==0.9.0 colorama>=0.3.8 -future +future==0.18.3 setuptools==65.5.1 https://h2o-release.s3.amazonaws.com/h2o/rel-zizler/7/Python/h2o-3.34.0.7-py2.py3-none-any.whl diff --git a/explaining-ratings/requirements.txt b/explaining-ratings/requirements.txt index b08a7d5d..efe15539 100644 --- a/explaining-ratings/requirements.txt +++ b/explaining-ratings/requirements.txt @@ -1,6 +1,6 @@ -pandas==1.4.0 +pandas==1.5.3 h2o-wave<1.0 -matplotlib -wordcloud -numpy==1.22.2 +matplotlib==3.8.3 +wordcloud==1.9.3 +numpy==1.26.4 setuptools==65.5.1 \ No newline at end of file diff --git a/insurance-churn-risk/requirements.txt b/insurance-churn-risk/requirements.txt index 1c14a6c5..7c899018 100644 --- a/insurance-churn-risk/requirements.txt +++ b/insurance-churn-risk/requirements.txt @@ -1,9 +1,9 @@ certifi==2024.2.2 -pandas==1.4.0 -pygments==2.15.0 +pandas==1.5.3 +pygments==2.17.2 h2o-wave<1.0 h2o-wave-ml>=0.6.0 -numpy==1.22.2 +numpy==1.26.4 setuptools==65.5.1 https://h2o-release.s3.amazonaws.com/h2o/rel-zizler/7/Python/h2o-3.34.0.7-py2.py3-none-any.whl diff --git a/sales-forecasting/requirements.txt b/sales-forecasting/requirements.txt index 67a60ec4..13fab85d 100644 --- a/sales-forecasting/requirements.txt +++ b/sales-forecasting/requirements.txt @@ -1,22 +1,22 @@ boto3==1.16.23 botocore==1.19.23 -certifi==2024.2.2 -click==7.1.2; python_full_version >= "3.6.1" -h11==0.11.0; python_version >= "3.6" and python_full_version >= "3.6.1" -h2o-wave<1.0; python_full_version >= "3.6.1" -httpcore==0.15.0 -httpx==0.23.0 -idna==2.10; python_version >= "3.6" and python_full_version >= "3.6.1" +certifi==2024.2.2; python_version >= "3.10" and python_full_version >= "3.10.10" +click==7.1.2; python_full_version >= "3.10.10" +h11==0.11.0; python_version >= "3.10" and python_full_version >= "3.10.10" +h2o-wave<1.0; python_full_version >= "3.10.10" +httpcore==0.15.0; python_version >= "3.10" and python_full_version >= "3.10.10" +httpx==0.23.0; python_version >= "3.10" and python_full_version >= "3.10.10" +idna==2.10; python_version >= "3.10" and python_full_version >= "3.10.10" jmespath==0.10.0; python_version >= "2.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" -numpy==1.22.2 -pandas==1.4.0; python_version >= "3.6" and python_full_version >= "3.6.1" -python-dateutil==2.8.1; python_full_version >= "3.6.1" -pytz==2020.4; python_full_version >= "3.6.1" -rfc3986==1.4.0; python_version >= "3.6" and python_full_version >= "3.6.1" +numpy==1.26.4; python_version >= "3.10" and python_full_version >= "3.10.10" +pandas==1.5.3; python_version >= "3.10" and python_full_version >= "3.10.10" +python-dateutil==2.8.1; python_full_version >= "3.10.10" +pytz==2020.4; python_full_version >= "3.10.1" +rfc3986==1.4.0; python_version >= "3.10" and python_full_version >= "3.10.10" s3transfer==0.3.3 -six==1.15.0; python_full_version >= "3.6.1" -sniffio==1.2.0; python_version >= "3.6" and python_full_version >= "3.6.1" -starlette==0.37.1 -typing-extensions==3.10.0 +six==1.15.0; python_full_version >= "3.10.10" +sniffio==1.2.0; python_version >= "3.10" and python_full_version >= "3.10.10" +starlette==0.37.1; python_version >= "3.10" and python_full_version >= "3.10.10" +typing-extensions==3.10.0; python_version >= "3.10" and python_full_version >= "3.10.10" urllib3==1.26.18 uvicorn==0.12.3 diff --git a/shopping-cart-recommendations/requirements.txt b/shopping-cart-recommendations/requirements.txt index a30e7937..c5a20202 100644 --- a/shopping-cart-recommendations/requirements.txt +++ b/shopping-cart-recommendations/requirements.txt @@ -1,5 +1,5 @@ certifi==2024.2.2 h2o-wave<1.0 -pandas==1.4.0 -numpy==1.22.2 +pandas==1.5.3 +numpy==1.26.4 urllib3==1.26.18 diff --git a/template-explore-binary-classification/requirements.txt b/template-explore-binary-classification/requirements.txt index 6e970ee2..720c4807 100644 --- a/template-explore-binary-classification/requirements.txt +++ b/template-explore-binary-classification/requirements.txt @@ -2,7 +2,7 @@ certifi==2024.2.2 h2o_wave==0.26.3 toml==0.10.2 loguru==0.6.0 -pandas==1.4.0 +pandas==1.5.3 matplotlib==3.5.1 starlette==0.37.1 typing-extensions==3.10.0 From 3d11c008d319f3ec7a5197d1e252f3492c7f5e69 Mon Sep 17 00:00:00 2001 From: VijithaEkanayake Date: Fri, 16 Feb 2024 11:24:07 +0530 Subject: [PATCH 6/7] chore: Address review suggestions Fixes: https://github.com/h2oai/wave-apps/issues/125 --- sales-forecasting/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sales-forecasting/requirements.txt b/sales-forecasting/requirements.txt index 13fab85d..be5cb20a 100644 --- a/sales-forecasting/requirements.txt +++ b/sales-forecasting/requirements.txt @@ -7,7 +7,7 @@ h2o-wave<1.0; python_full_version >= "3.10.10" httpcore==0.15.0; python_version >= "3.10" and python_full_version >= "3.10.10" httpx==0.23.0; python_version >= "3.10" and python_full_version >= "3.10.10" idna==2.10; python_version >= "3.10" and python_full_version >= "3.10.10" -jmespath==0.10.0; python_version >= "2.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" +jmespath==0.10.0; python_version >= "3.10" and python_full_version >= "3.10.10" numpy==1.26.4; python_version >= "3.10" and python_full_version >= "3.10.10" pandas==1.5.3; python_version >= "3.10" and python_full_version >= "3.10.10" python-dateutil==2.8.1; python_full_version >= "3.10.10" From 8ae91f1df06fd3f87cda89ece578a2d710467fc9 Mon Sep 17 00:00:00 2001 From: VijithaEkanayake Date: Fri, 16 Feb 2024 18:48:28 +0530 Subject: [PATCH 7/7] fix: Remove unnecessary dependencies Fixes: https://github.com/h2oai/wave-apps/issues/125 --- guess-the-number/guess_the_number/guess.py | 22 +++++++++++----------- guess-the-number/requirements.txt | 10 ---------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/guess-the-number/guess_the_number/guess.py b/guess-the-number/guess_the_number/guess.py index 13c06076..928e746b 100644 --- a/guess-the-number/guess_the_number/guess.py +++ b/guess-the-number/guess_the_number/guess.py @@ -357,24 +357,24 @@ async def client_initialize(q: Q): async def theme_switch_handler(q: Q): - q.client.active_theme = 'h2o-dark' if 'toggle_theme' in q.args.data and q.args.data['toggle_theme'] else 'default' + q.client.active_theme = 'h2o-dark' if q.args.toggle_theme else 'default' q.page['meta'].theme = q.client.active_theme await q.page.save() async def run_app(q: Q): - if 'start_game' in q.args.data and q.args.data['start_game']: - if 'submit_game' in q.args.data and q.args.data['submit_game']: + if q.args.start_game: + if q.args.submit_game: q.client.game.is_public = True q.app.games[q.client.game.game_id] = q.client.game del q.page['leaderboard'] del q.page['hello'] await start_new_game(q) - elif 'quit_game' in q.args.data and q.args.data['quit_game']: + elif q.args.quit_game: del q.page['starting_game'] await make_welcome_card(q) - elif 'guess' in q.args.data and q.args.data['guess']: - message = q.client.game.guess(q.args.data['guess']) + elif q.args.guess: + message = q.client.game.guess(q.args.guess) if message == 'You Got It!': q.page['starting_game'].items = [ ui.text_l( @@ -421,7 +421,7 @@ async def run_app(q: Q): label='your guess', min=1, max=100, - value=q.args.data['guess'] if 'guess' in q.args.data else "", + value=q.args.guess, trigger=True, ), ui.text_xs('⠀'), @@ -430,16 +430,16 @@ async def run_app(q: Q): justify='center', ), ] - elif 'leaderboard' in q.args.data and q.args.data['leaderboard']: - if 'submit_game' in q.args.data and q.args.data['submit_game']: + elif q.args.leaderboard: + if q.args.submit_game: q.client.game.is_public = True q.app.games[q.client.game.game_id] = q.client.game del q.page['starting_game'] await show_leaderboard(q) - elif 'private_leaderboard' in q.args.data and q.args.data['private_leaderboard']: + elif q.args.private_leaderboard: await show_private_leaderboard(q) - if 'toggle_theme' in q.args.data and q.args.data['toggle_theme'] is not None: + if q.args.toggle_theme is not None: await theme_switch_handler(q) await q.page.save() diff --git a/guess-the-number/requirements.txt b/guess-the-number/requirements.txt index e03804fa..79dce6cd 100644 --- a/guess-the-number/requirements.txt +++ b/guess-the-number/requirements.txt @@ -1,12 +1,2 @@ certifi==2024.2.2 -click==7.1.2 -h11==0.11.0 h2o-wave<1.0 -httpcore==0.15.0 -httpx==0.23.0 -idna==2.10 -rfc3986==1.4.0 -sniffio==1.2.0 -starlette==0.37.1 -typing-extensions==3.10.0 -uvicorn==0.12.3