From 3423b86679fc7724c6e383ce96240a10ea61c657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Fredrik=20Ki=C3=A6r?= <31612826+anders-kiaer@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:23:50 +0100 Subject: [PATCH 1/3] Support Python 3.11 and 3.12 (#299) --- .github/workflows/webviz-core-components.yml | 11 ++++++++--- CHANGELOG.md | 3 ++- README.md | 2 +- setup.py | 2 +- tests/test_color_scales.py | 2 +- tests/test_graph.py | 2 +- tests/test_plugin_placeholder.py | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/webviz-core-components.yml b/.github/workflows/webviz-core-components.yml index 5036332e..0fa4b988 100644 --- a/.github/workflows/webviz-core-components.yml +++ b/.github/workflows/webviz-core-components.yml @@ -19,16 +19,16 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 📖 Checkout commit locally uses: actions/checkout@v3 - - name: 🐍 Set up Python ${{ matrix.python-version }} + - name: 🐍 Set up Python 3.8 uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: 3.8 # For compiling the JavaScript part we need dash<2.5, which is not supported on recent versions of Python - name: ℹī¸ Node and npm versions run: | @@ -50,6 +50,11 @@ jobs: run: | npm run build --prefix ./react + - name: 🐍 Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: đŸ“Ļ Install webviz-core-components with dependencies run: | pip install --upgrade pip diff --git a/CHANGELOG.md b/CHANGELOG.md index 28c22ba1..067566f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [UNRELEASED] - YYYY-MM-DD +## [0.7.0] - 2024-01-29 ### Fixed @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - [#275](https://github.com/equinor/webviz-core-components/pull/275) - Added `WebvizDialog` component. New dialog component which handles multiple instances simultaneously, where the currently active dialog is placed on top and highlighted with box shadow. +- [#299](https://github.com/equinor/webviz-core-components/pull/299) - Support Python 3.11 and 3.12. ### Changed diff --git a/README.md b/README.md index a6524a16..342bd592 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Total alerts](https://img.shields.io/lgtm/alerts/g/equinor/webviz-core-components.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/equinor/webviz-core-components/alerts/) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/equinor/webviz-core-components.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/equinor/webviz-core-components/context:javascript) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/equinor/webviz-core-components.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/equinor/webviz-core-components/context:python) -[![Python 3.8 | 3.9 | 3.10](https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10-blue.svg)](https://www.python.org/) +[![Python 3.8 | 3.9 | 3.10 | 3.11 | 3.12](https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12-blue.svg)](https://www.python.org/) [![Code style: black](https://img.shields.io/badge/code%20style-black%20%28Python%29-000000.svg)](https://github.com/psf/black) [![code style: prettier](https://img.shields.io/badge/code_style-prettier%20%28JavaScript%29-ff69b4.svg)](https://github.com/prettier/prettier) diff --git a/setup.py b/setup.py index 285df2ee..ec32c96d 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ TESTS_REQUIRE = [ "bandit", - "black>=22.12", + "black>=22.12,<24", "dash[testing]", "flask<2.3", "pylint", diff --git a/tests/test_color_scales.py b/tests/test_color_scales.py index 57694774..b8910eaf 100644 --- a/tests/test_color_scales.py +++ b/tests/test_color_scales.py @@ -27,4 +27,4 @@ def test_colorscale(dash_duo): dash_duo.start_server(app) - assert dash_duo.get_logs() == [], "browser console should contain no error" + assert dash_duo.get_logs() is None, "browser console should contain no error" diff --git a/tests/test_graph.py b/tests/test_graph.py index 7d59f9d4..ffdc8266 100644 --- a/tests/test_graph.py +++ b/tests/test_graph.py @@ -42,4 +42,4 @@ def test_container_placeholder(dash_duo): dash_duo.start_server(app) - assert dash_duo.get_logs() == [], "browser console should contain no error" + assert dash_duo.get_logs() is None, "browser console should contain no error" diff --git a/tests/test_plugin_placeholder.py b/tests/test_plugin_placeholder.py index f633d741..be2e1d84 100644 --- a/tests/test_plugin_placeholder.py +++ b/tests/test_plugin_placeholder.py @@ -25,4 +25,4 @@ def test_plugin_placeholder(dash_duo): dash_duo.start_server(app) - assert dash_duo.get_logs() == [], "browser console should contain no error" + assert dash_duo.get_logs() is None, "browser console should contain no error" From 4753ce96f118cf08ef8c9e87de30e17bcbfa7cf9 Mon Sep 17 00:00:00 2001 From: Hans Kallekleiv <16436291+HansKallekleiv@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:24:45 +0100 Subject: [PATCH 2/3] Add SECURITY.md (#298) --- SECURITY.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..53118977 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,16 @@ +If you discover a security vulnerability in this project, please follow these steps to responsibly disclose it: + +1. **Do not** create a public GitHub issue for the vulnerability. + +2. Follow our guideline for Responsible Disclosure Policy at https://www.equinor.com/about-us/csirt to report the issue + +The following information will help us triage your report more quickly: + +- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) +- Full paths of source file(s) related to the manifestation of the issue +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- Step-by-step instructions to reproduce the issue +- Proof-of-concept or exploit code (if possible) +- Impact of the issue, including how an attacker might exploit the issue +- We prefer all communications to be in English. From f08d7ad212e1be45bbb46c98fe91f1ac6e59d29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Fredrik=20Ki=C3=A6r?= <31612826+anders-kiaer@users.noreply.github.com> Date: Thu, 1 Feb 2024 08:54:46 +0100 Subject: [PATCH 3/3] Remove deprecated `npm` `always-auth` (#300) --- .github/workflows/webviz-core-components.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/webviz-core-components.yml b/.github/workflows/webviz-core-components.yml index 0fa4b988..ef2835fb 100644 --- a/.github/workflows/webviz-core-components.yml +++ b/.github/workflows/webviz-core-components.yml @@ -96,7 +96,6 @@ jobs: cp ../README.md . npm version --no-git-tag-version ${GITHUB_REF//refs\/tags\//} npm config set '//registry.npmjs.org/:_authToken' '${NPM_TOKEN}' - npm config set always-auth true # Use 'latest' tag if $NPM_PUBLISH_TAG is not set: npm publish --access public --tag ${NPM_PUBLISH_TAG:-latest}