From 30adaa3dede7102060c991fae598c60eb4cdeb6d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 22:23:45 +0600 Subject: [PATCH] Package management (#204) * Set min Python version to 3.9. * Remove the pre-commit run from the ci, as it is done by the pre-commit app. * Update pre-commit hooks. * Remove `load_documentation_profile` from docs builds to fix it. --- .github/workflows/ci.yml | 23 +---------------------- .pre-commit-config.yaml | 10 +++++----- docs/source/conf.py | 8 ++------ pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a5febf..e8586ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,33 +52,12 @@ jobs: docker exec --tty --user aiida $DOCKERID /bin/bash -l -c 'cd /home/aiida/aiida-cp2k/ && py.test --cov aiida_cp2k --cov-append .' - pre-commit: - runs-on: ubuntu-latest - timeout-minutes: 10 - strategy: - matrix: - python-version: [3.8] - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install python dependencies - run: | - pip install --upgrade pip - pip install -e .[dev,docs] - - name: Run pre-commit - run: | - pre-commit install - pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) - docs: runs-on: ubuntu-latest timeout-minutes: 10 strategy: matrix: - python-version: [3.8] + python-version: [3.11] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ba2854e..e274c7b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-json @@ -19,7 +19,7 @@ repos: exclude: *exclude_pre_commit_hooks - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 23.12.1 hooks: - id: black language_version: python3 # Should be a command that runs python3.6+ @@ -32,19 +32,19 @@ repos: args: [--count, --show-source, --statistics] - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort args: [--profile, black, --filter-files] - repo: https://github.com/asottile/pyupgrade - rev: v3.14.0 + rev: v3.15.0 hooks: - id: pyupgrade args: [--py37-plus] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.5.1 + rev: v1.8.0 hooks: - id: mypy additional_dependencies: diff --git a/docs/source/conf.py b/docs/source/conf.py index 4c169e5..deed168 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,13 +15,9 @@ import time from typing import Dict -from aiida.manage.configuration import load_documentation_profile +from aiida.manage.configuration import Profile, load_profile -# -- AiiDA-related setup -------------------------------------------------- - -# Load the dummy profile even if we are running locally, this way the documentation will succeed even if the current -# default profile of the AiiDA installation does not use a Django backend. -load_documentation_profile() +load_profile(Profile("docs", {"process_control": {}, "storage": {}})) # If we are not on READTHEDOCS load the Sphinx theme manually if not os.environ.get("READTHEDOCS", None): diff --git a/pyproject.toml b/pyproject.toml index 95be358..bb200c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ classifiers = [ "Operating System :: MacOS :: MacOS X", "Programming Language :: Python :: 3", ] -requires-python = ">=3.8" +requires-python = ">=3.9" dependencies = [ "aiida-core>=2.0.0,<3.0.0", "aiida-gaussian-datatypes", @@ -40,7 +40,7 @@ dev = [ "pytest~=6.0", "pytest-cov~=2.11.1", "coverage", - "pre-commit~=2.19", + "pre-commit~=3.6", ] docs = [ "sphinx",