Skip to content

Commit

Permalink
Merge branch 'main' into update/docker-container
Browse files Browse the repository at this point in the history
  • Loading branch information
yakutovicha committed Mar 19, 2024
2 parents 9913e21 + 30adaa3 commit f2bcdcb
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 39 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
2 changes: 1 addition & 1 deletion aiida_cp2k/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
###############################################################################
"""The official AiiDA plugin for CP2K."""

__version__ = "2.0.0"
__version__ = "2.1.0b1"

# EOF
4 changes: 3 additions & 1 deletion aiida_cp2k/parsers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
###############################################################################
"""AiiDA-CP2K output parser."""

import re

import ase
import numpy as np
from aiida import common, engine, orm, parsers, plugins
Expand Down Expand Up @@ -128,7 +130,7 @@ def _read_stdout(self):
def _parse_trajectory(self, structure):
"""CP2K trajectory parser."""

symbols = [str(site.kind_name) for site in structure.sites]
symbols = [re.sub(r"\d+", "", str(site.kind_name)) for site in structure.sites]

# Handle the positions trajectory
xyz_traj_fname = self.node.process_class._DEFAULT_TRAJECT_XYZ_FILE_NAME
Expand Down
2 changes: 1 addition & 1 deletion aiida_cp2k/workchains/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def results(self):
trajectories = self._collect_all_trajetories()
if trajectories:
self.report("Work chain completed successfully, collecting all trajectories")
if self.ctx.inputs.parameters.get("GLOBAL", {}).get("RUN_TYPE") == "GEO_OPT":
if self.ctx.inputs.parameters.get_dict().get("GLOBAL", {}).get("RUN_TYPE") == "GEO_OPT":
output_trajectory = utils.merge_trajectory_data_non_unique(*trajectories)
else:
output_trajectory = utils.merge_trajectory_data_unique(*trajectories)
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
6 changes: 3 additions & 3 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 Expand Up @@ -74,7 +74,7 @@ filterwarnings = [
]

[tool.bumpver]
current_version = "v2.0.0"
current_version = "v2.1.0b1"
version_pattern = "vMAJOR.MINOR.PATCH[PYTAGNUM]"
commit_message = "Bump version {old_version} -> {new_version}."
commit = true
Expand Down

0 comments on commit f2bcdcb

Please sign in to comment.