Skip to content

Commit

Permalink
Package management (#204)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
pre-commit-ci[bot] authored Mar 18, 2024
1 parent a2a6d97 commit 30adaa3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 35 deletions.
23 changes: 1 addition & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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+
Expand All @@ -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:
Expand Down
8 changes: 2 additions & 6 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -40,7 +40,7 @@ dev = [
"pytest~=6.0",
"pytest-cov~=2.11.1",
"coverage",
"pre-commit~=2.19",
"pre-commit~=3.6",
]
docs = [
"sphinx",
Expand Down

0 comments on commit 30adaa3

Please sign in to comment.