From f4b4a0cc4d7e527b98aaf214649f8e82d57f8619 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 15:42:39 +0100 Subject: [PATCH 01/20] [pre-commit.ci] pre-commit autoupdate (#78) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 20.8b1 → 22.1.0](https://github.com/psf/black/compare/20.8b1...22.1.0) - https://gitlab.com/pycqa/flake8 → https://github.com/PyCQA/flake8 - [github.com/PyCQA/flake8: 3.8.4 → 4.0.1](https://github.com/PyCQA/flake8/compare/3.8.4...4.0.1) - [github.com/pycqa/isort: 5.6.4 → 5.10.1](https://github.com/pycqa/isort/compare/5.6.4...5.10.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5b4a7e3..a5ba771 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,18 +1,18 @@ repos: - repo: https://github.com/psf/black - rev: 20.8b1 + rev: 22.1.0 hooks: - id: black language_version: python3 # Should be a command that runs python3.6+ - - repo: https://gitlab.com/pycqa/flake8 - rev: '3.8.4' + - repo: https://github.com/PyCQA/flake8 + rev: '4.0.1' hooks: - id: flake8 args: [--count, --show-source, --statistics] - repo: https://github.com/pycqa/isort - rev: 5.6.4 + rev: 5.10.1 hooks: - id: isort args: ["--profile", "black", "--filter-files"] From ebd08e268fd180f1e656b19cf1697425f221fe58 Mon Sep 17 00:00:00 2001 From: Carl Simon Adorf Date: Mon, 21 Feb 2022 16:03:01 +0100 Subject: [PATCH 02/20] CI: Update pre-commit config. (#79) --- .github/workflows/ci.yml | 27 ++++++++++--------- .pre-commit-config.yaml | 58 +++++++++++++++++++++++++++++----------- LICENSE.txt | 2 +- setup.cfg | 18 ++++++++----- 4 files changed, 69 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97842f9..bb87d3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ +--- # Run basic tests for this app on the latest aiidalab-docker image. name: continuous-integration @@ -6,22 +7,22 @@ on: [push, pull_request] jobs: - pre-commit: + pre-commit: # Adapted from: https://github.com/CasperWA/voila-optimade-client - runs-on: ubuntu-latest + runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + steps: + - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 - - name: Install dependencies - run: | - pip install .[pre_commit] + - name: Install dependencies + run: | + pip install .[pre_commit] - - name: Run pre-commit - run: pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) + - name: Run pre-commit + run: pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a5ba771..047a88a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,18 +1,46 @@ +--- repos: - - repo: https://github.com/psf/black - rev: 22.1.0 - hooks: - - id: black - language_version: python3 # Should be a command that runs python3.6+ - - repo: https://github.com/PyCQA/flake8 - rev: '4.0.1' - hooks: - - id: flake8 - args: [--count, --show-source, --statistics] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.1.0 + hooks: + - id: check-json + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + exclude: miscellaneous/structures/SiO2.xyz - - repo: https://github.com/pycqa/isort - rev: 5.10.1 - hooks: - - id: isort - args: ["--profile", "black", "--filter-files"] + - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt + rev: 0.1.0 + hooks: + - id: yamlfmt + + - repo: https://github.com/psf/black + rev: 22.1.0 + hooks: + - id: black + language_version: python3 # Should be a command that runs python3.6+ + + - repo: https://github.com/PyCQA/flake8 + rev: 4.0.1 + hooks: + - id: flake8 + args: [--count, --show-source, --statistics] + additional_dependencies: + - flake8-bugbear==21.3.1 + + - repo: https://github.com/pycqa/isort + rev: 5.10.1 + hooks: + - id: isort + args: [--profile, black, --filter-files] + + - repo: https://github.com/asottile/setup-cfg-fmt + rev: v1.20.0 + hooks: + - id: setup-cfg-fmt + + - repo: https://github.com/sirosen/check-jsonschema + rev: 0.10.1 + hooks: + - id: check-github-workflows diff --git a/LICENSE.txt b/LICENSE.txt index a6a7277..dacf60f 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/setup.cfg b/setup.cfg index 552f5c3..a889a19 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,38 +1,42 @@ [metadata] -name = aiidalab-home +name = aiidalab_home version = attr: home.__version__ -author = The AiiDAlab Team -author_email = aiidalab@materialscloud.org description = Package for the AiiDAlab Home app. long_description = file: README.md long_description_content_type = text/markdown url = https://github.com/aiidalab/aiidalab-home -project_urls = - Bug Tracker = https://github.com/aiidalab/aiidalab-home/issues +author = The AiiDAlab Team +author_email = aiidalab@materialscloud.org +license = MIT +license_file = LICENSE.txt classifiers = Development Status :: 4 - Beta Framework :: AiiDA License :: OSI Approved :: MIT License + Programming Language :: Python :: 3 + Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 +project_urls = + Bug Tracker = https://github.com/aiidalab/aiidalab-home/issues [options] packages = find: -python_requires = >=3.7 install_requires = aiidalab>=v21.06.0 ipython~=7.25 ipywidgets~=7.6 jinja2~=2.11 traitlets~=4.3 +python_requires = >=3.7 [options.extras_require] pre_commit = pre-commit==2.15.0 [flake8] -# Adapted from: https://github.com/CasperWA/voila-optimade-client ignore = E501 # Line length handled by black. W503 # Line break before binary operator, preferred formatting for black. From 8de75a84810ef7dc243f4075cc65f93707b85008 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 08:38:46 +0100 Subject: [PATCH 03/20] [pre-commit.ci] pre-commit autoupdate (#80) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/sirosen/check-jsonschema: 0.10.1 → 0.13.0](https://github.com/sirosen/check-jsonschema/compare/0.10.1...0.13.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 047a88a..b487e58 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,6 +41,6 @@ repos: - id: setup-cfg-fmt - repo: https://github.com/sirosen/check-jsonschema - rev: 0.10.1 + rev: 0.13.0 hooks: - id: check-github-workflows From 90131b4775ba9aeaf7a646d9694a594e6d393018 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 08:59:47 +0100 Subject: [PATCH 04/20] [pre-commit.ci] pre-commit autoupdate (#81) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/sirosen/check-jsonschema: 0.13.0 → 0.14.0](https://github.com/sirosen/check-jsonschema/compare/0.13.0...0.14.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b487e58..8f8e800 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,6 +41,6 @@ repos: - id: setup-cfg-fmt - repo: https://github.com/sirosen/check-jsonschema - rev: 0.13.0 + rev: 0.14.0 hooks: - id: check-github-workflows From 269a11acdee1679f8c3a8028cb5a7d7ebe4eb8f7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 5 Apr 2022 13:23:20 +0200 Subject: [PATCH 05/20] [pre-commit.ci] pre-commit autoupdate (#83) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/jumanjihouse/pre-commit-hook-yamlfmt: 0.1.0 → 0.1.1](https://github.com/jumanjihouse/pre-commit-hook-yamlfmt/compare/0.1.0...0.1.1) - [github.com/psf/black: 22.1.0 → 22.3.0](https://github.com/psf/black/compare/22.1.0...22.3.0) - [github.com/asottile/setup-cfg-fmt: v1.20.0 → v1.20.1](https://github.com/asottile/setup-cfg-fmt/compare/v1.20.0...v1.20.1) - [github.com/sirosen/check-jsonschema: 0.14.0 → 0.14.2](https://github.com/sirosen/check-jsonschema/compare/0.14.0...0.14.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8f8e800..dd13d8a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,12 +11,12 @@ repos: exclude: miscellaneous/structures/SiO2.xyz - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt - rev: 0.1.0 + rev: 0.1.1 hooks: - id: yamlfmt - repo: https://github.com/psf/black - rev: 22.1.0 + rev: 22.3.0 hooks: - id: black language_version: python3 # Should be a command that runs python3.6+ @@ -36,11 +36,11 @@ repos: args: [--profile, black, --filter-files] - repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.20.0 + rev: v1.20.1 hooks: - id: setup-cfg-fmt - repo: https://github.com/sirosen/check-jsonschema - rev: 0.14.0 + rev: 0.14.2 hooks: - id: check-github-workflows From 102abd2ccf624fa5faa599dd332111113f6b3f53 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 11:09:53 +0200 Subject: [PATCH 06/20] [pre-commit.ci] pre-commit autoupdate (#84) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.1.0 → v4.2.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.1.0...v4.2.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dd13d8a..c919695 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.2.0 hooks: - id: check-json - id: check-yaml From fe03aae4892ff9ad5e11d6948405a0efee6da5ef Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 11:44:40 +0200 Subject: [PATCH 07/20] [pre-commit.ci] pre-commit autoupdate (#85) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/sirosen/check-jsonschema: 0.14.2 → 0.14.3](https://github.com/sirosen/check-jsonschema/compare/0.14.2...0.14.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c919695..15a93ff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,6 +41,6 @@ repos: - id: setup-cfg-fmt - repo: https://github.com/sirosen/check-jsonschema - rev: 0.14.2 + rev: 0.14.3 hooks: - id: check-github-workflows From 5a9a47952e754fc941a4584a0574e6da3982a9f2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 17 May 2022 10:16:04 +0200 Subject: [PATCH 08/20] [pre-commit.ci] pre-commit autoupdate (#86) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/jumanjihouse/pre-commit-hook-yamlfmt: 0.1.1 → 0.2.1](https://github.com/jumanjihouse/pre-commit-hook-yamlfmt/compare/0.1.1...0.2.1) - [github.com/sirosen/check-jsonschema: 0.14.3 → 0.15.0](https://github.com/sirosen/check-jsonschema/compare/0.14.3...0.15.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 15a93ff..b7dd0c9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: exclude: miscellaneous/structures/SiO2.xyz - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt - rev: 0.1.1 + rev: 0.2.1 hooks: - id: yamlfmt @@ -41,6 +41,6 @@ repos: - id: setup-cfg-fmt - repo: https://github.com/sirosen/check-jsonschema - rev: 0.14.3 + rev: 0.15.0 hooks: - id: check-github-workflows From 20e4a77a2329344ad9d4d9de6b079fd3709b3526 Mon Sep 17 00:00:00 2001 From: Aliaksandr Yakutovich Date: Thu, 19 May 2022 13:16:57 +0200 Subject: [PATCH 09/20] Update min version of aiidalab dependency. (#87) The min version of aiidalab is set to be >= 21.10.2. Previously, `logo` was an attribute of the `_AiidaLabApp` class, but not anymore. Now it is a part of `_AiidaLabApp`'s metadata. --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index a889a19..f9db9cf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,11 +25,11 @@ project_urls = [options] packages = find: install_requires = - aiidalab>=v21.06.0 + aiidalab>=v21.10.2 ipython~=7.25 ipywidgets~=7.6 jinja2~=2.11 - traitlets~=4.3 + traitlets~=5.0 python_requires = >=3.7 [options.extras_require] From 55d7e7dd37de86c1e7e845450d5ee9793dff2ccc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 31 May 2022 11:32:42 +0200 Subject: [PATCH 10/20] [pre-commit.ci] pre-commit autoupdate (#88) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/sirosen/check-jsonschema: 0.15.0 → 0.15.1](https://github.com/sirosen/check-jsonschema/compare/0.15.0...0.15.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b7dd0c9..c57ea9b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,6 +41,6 @@ repos: - id: setup-cfg-fmt - repo: https://github.com/sirosen/check-jsonschema - rev: 0.15.0 + rev: 0.15.1 hooks: - id: check-github-workflows From c2f0c8d9887f71c035cbd3d5ae833cbbfe156c34 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 14:22:46 +0200 Subject: [PATCH 11/20] [pre-commit.ci] pre-commit autoupdate (#89) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/sirosen/check-jsonschema: 0.15.1 → 0.16.0](https://github.com/sirosen/check-jsonschema/compare/0.15.1...0.16.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c57ea9b..69afa21 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,6 +41,6 @@ repos: - id: setup-cfg-fmt - repo: https://github.com/sirosen/check-jsonschema - rev: 0.15.1 + rev: 0.16.0 hooks: - id: check-github-workflows From c012f81d09533417e5d4ad82657e43f4b21ea7b9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 14 Jun 2022 13:06:02 +0200 Subject: [PATCH 12/20] [pre-commit.ci] pre-commit autoupdate (#91) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.3.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.2.0...v4.3.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 69afa21..0622138 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v4.3.0 hooks: - id: check-json - id: check-yaml From 1f86493a9c24860dd4aff0509ffc2b20687badc9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 17:27:03 +0200 Subject: [PATCH 13/20] [pre-commit.ci] pre-commit autoupdate (#92) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/sirosen/check-jsonschema: 0.16.0 → 0.16.2](https://github.com/sirosen/check-jsonschema/compare/0.16.0...0.16.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0622138..7ef1039 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,6 +41,6 @@ repos: - id: setup-cfg-fmt - repo: https://github.com/sirosen/check-jsonschema - rev: 0.16.0 + rev: 0.16.2 hooks: - id: check-github-workflows From be9c9fe3aaf495ed70bdc3bb3ae27d9a42189b9a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 5 Jul 2022 13:31:55 +0200 Subject: [PATCH 14/20] [pre-commit.ci] pre-commit autoupdate (#93) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.3.0 → 22.6.0](https://github.com/psf/black/compare/22.3.0...22.6.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ef1039..d011623 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - id: yamlfmt - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 22.6.0 hooks: - id: black language_version: python3 # Should be a command that runs python3.6+ From 193cce229ab3dc3376b9f073c0871752cf934934 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Jul 2022 11:46:44 +0200 Subject: [PATCH 15/20] [pre-commit.ci] pre-commit autoupdate (#97) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/jumanjihouse/pre-commit-hook-yamlfmt: 0.2.1 → 0.2.2](https://github.com/jumanjihouse/pre-commit-hook-yamlfmt/compare/0.2.1...0.2.2) - [github.com/sirosen/check-jsonschema: 0.16.2 → 0.17.0](https://github.com/sirosen/check-jsonschema/compare/0.16.2...0.17.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d011623..3ce02dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: exclude: miscellaneous/structures/SiO2.xyz - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt - rev: 0.2.1 + rev: 0.2.2 hooks: - id: yamlfmt @@ -41,6 +41,6 @@ repos: - id: setup-cfg-fmt - repo: https://github.com/sirosen/check-jsonschema - rev: 0.16.2 + rev: 0.17.0 hooks: - id: check-github-workflows From e3b659ab0adf63a92aa98844151ea9be1584ca03 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 20 Jul 2022 15:41:16 +0200 Subject: [PATCH 16/20] [pre-commit.ci] pre-commit autoupdate (#98) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/sirosen/check-jsonschema: 0.17.0 → 0.17.1](https://github.com/sirosen/check-jsonschema/compare/0.17.0...0.17.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3ce02dd..a8ddc39 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,6 +41,6 @@ repos: - id: setup-cfg-fmt - repo: https://github.com/sirosen/check-jsonschema - rev: 0.17.0 + rev: 0.17.1 hooks: - id: check-github-workflows From 63236dcd754e9c8f123a13570ddb94a5dc9d007e Mon Sep 17 00:00:00 2001 From: Carl Simon Adorf Date: Thu, 21 Jul 2022 12:59:51 +0200 Subject: [PATCH 17/20] Implement open_app tool. (#96) The tool allows to reliably open an app by ensuring that is installed before opening it. --- open_app.ipynb | 132 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 open_app.ipynb diff --git a/open_app.ipynb b/open_app.ipynb new file mode 100644 index 0000000..8f23ee0 --- /dev/null +++ b/open_app.ipynb @@ -0,0 +1,132 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "1e6a8c8c", + "metadata": {}, + "outputs": [], + "source": [ + "import urllib.parse as urlparse\n", + "import ipywidgets as ipw" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7e7e205e", + "metadata": {}, + "outputs": [], + "source": [ + "import sys\n", + "from aiidalab.__main__ import _find_version_to_install, _parse_requirement\n", + "from aiidalab.utils import PEP508CompliantUrl\n", + "\n", + "\n", + "def identify_app_and_version(app_query, prereleases, force): \n", + " try:\n", + " requirement = _parse_requirement(app_query)\n", + " except Exception as error:\n", + " raise RuntimeError(str(error)) from error\n", + " \n", + " try:\n", + " return _find_version_to_install(\n", + " requirement,\n", + " dependencies=\"install\",\n", + " force=force,\n", + " python_bin=sys.executable,\n", + " prereleases=prereleases)\n", + " except Exception as error:\n", + " raise RuntimeError(str(error)) from error" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b3e749de", + "metadata": {}, + "outputs": [], + "source": [ + "url = urlparse.urlsplit(jupyter_notebook_url)\n", + "\n", + "query = urlparse.parse_qs(url.query)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c25a71a5", + "metadata": {}, + "outputs": [], + "source": [ + "from home.widgets import LogOutputWidget, Spinner, StatusHTML\n", + "from IPython.display import Javascript\n", + "\n", + "header = ipw.HTML()\n", + "logs = LogOutputWidget(layout=ipw.Layout(min_height=\"250px\", max_height=\"100px\"))\n", + "spinner = Spinner()\n", + "\n", + "display(ipw.VBox([ipw.HBox([header, spinner]), logs]))\n", + "\n", + "try:\n", + " try:\n", + " app_query = query[\"app\"][0]\n", + " except KeyError:\n", + " raise RuntimeError(\"No app to install specified.\")\n", + " \n", + " force = query.get(\"force\", [False])[0]\n", + " prereleases = query.get(\"prereleases\", [False])[0]\n", + " \n", + " app, version = identify_app_and_version(query[\"app\"][0], force=force, prereleases=prereleases)\n", + "except Exception as error:\n", + " header.value = f\"Error: {error}\"\n", + "\n", + "try:\n", + " if version is None:\n", + " header.value = \"App already installed.\"\n", + " else:\n", + " header.value = f\"Installing app '{app.name}': {version}...\"\n", + "\n", + " spinner.enabled = True\n", + " app.install(\n", + " version=version,\n", + " install_dependencies=True,\n", + " python_bin=sys.executable,\n", + " stdout=logs,\n", + " )\n", + "except Exception as error:\n", + " header.value = f\"Error while trying to install the app: {error}\"\n", + "else:\n", + " redirect = query.get(\"redirect\", None)\n", + " if redirect:\n", + " redirect_url = urlparse.urlunsplit(url._replace(path=redirect[0], query=None, fragment=None))\n", + " header.value = f'Redirecting now to {redirect_url}...'\n", + " js = Javascript(f\"window.location = '{redirect_url}'\")\n", + " display(js)\n", + "finally:\n", + " spinner.enabled = False" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 5b7d68e099549113a0249eaad1916fccca36de80 Mon Sep 17 00:00:00 2001 From: Carl Simon Adorf Date: Wed, 27 Jul 2022 10:32:16 +0200 Subject: [PATCH 18/20] Suppress compatibility warnings during app installation (#101) The app manager will sometimes falsely report that the checked out version is detached during the installation process because the widget refresh is triggered while the git clone/checkout process is still ongoing. With this fix, the message is suppressed while the widget is busy. --- home/app_manager.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/home/app_manager.py b/home/app_manager.py index c0ffbbb..f4dd289 100644 --- a/home/app_manager.py +++ b/home/app_manager.py @@ -260,7 +260,11 @@ def _refresh_widget_state(self, _=None): # Check app compatibility and show banner if not compatible. self.compatibility_warning.layout.visibility = ( "visible" - if (self.app.is_installed() and self.app.compatible is False) + if ( + not busy + and self.app.is_installed() + and self.app.compatible is False + ) else "hidden" ) @@ -374,6 +378,8 @@ def _refresh_widget_state(self, _=None): self.issue_indicator.value = f' Unable to reach the registry server.' elif not registered: self.issue_indicator.value = f' The app is not registered.' + elif busy: + self.issue_indicator.value = "" elif detached: self.issue_indicator.value = ( f' The app has local modifications or was checked out ' @@ -388,7 +394,8 @@ def _refresh_widget_state(self, _=None): ) if ( - any(self.app.compatibility_info.values()) + not busy + and any(self.app.compatibility_info.values()) and self.app.compatible is False ): self.compatibility_info.value = self.COMPATIBILITY_INFO.render( @@ -429,6 +436,7 @@ def _install_version(self, _=None): self._show_msg_success( f"Installed app ({self._formatted_version(version)})." ) + self.dependencies_log.value = "" def _update_app(self, _): """Attempt to update the app.""" @@ -439,6 +447,7 @@ def _update_app(self, _): self._show_msg_failure(str(error)) else: self._show_msg_success("Updated app.") + self.dependencies_log.value = "" def _uninstall_app(self, _): """Attempt to uninstall the app.""" From 571d6eb730043a2f71beb6582a574c8686dbcfa9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 27 Jul 2022 18:19:14 +0200 Subject: [PATCH 19/20] [pre-commit.ci] pre-commit autoupdate (#99) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/setup-cfg-fmt: v1.20.1 → v1.20.2](https://github.com/asottile/setup-cfg-fmt/compare/v1.20.1...v1.20.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a8ddc39..227df0e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: args: [--profile, black, --filter-files] - repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.20.1 + rev: v1.20.2 hooks: - id: setup-cfg-fmt From 175fccddb44803f44aad3c6f55a44596a198bbd6 Mon Sep 17 00:00:00 2001 From: Carl Simon Adorf Date: Thu, 28 Jul 2022 15:22:39 +0200 Subject: [PATCH 20/20] Aiida 2.0 (#102) * Relax requirements. * Add missing requirement (Markdown). * Update setup.cfg * Remove support of Python 3.7 --- setup.cfg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index f9db9cf..f3225b1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,6 @@ classifiers = License :: OSI Approved :: MIT License Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -25,12 +24,13 @@ project_urls = [options] packages = find: install_requires = + Jinja2>=2.11.3,<4 + Markdown>=3.4 aiidalab>=v21.10.2 - ipython~=7.25 + ipython~=7.0 ipywidgets~=7.6 - jinja2~=2.11 traitlets~=5.0 -python_requires = >=3.7 +python_requires = >=3.8 [options.extras_require] pre_commit =