Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest released version #168

Merged
merged 40 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
37bc7f1
Bump pre-commit from 3.5.0 to 3.6.2
dependabot[bot] Feb 19, 2024
c9e1483
Bump pylint from 3.0.2 to 3.1.0
dependabot[bot] Feb 26, 2024
b7f0a57
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 7, 2024
5b741c6
add shapefun_overwrite input to voro calc
dantogni Oct 8, 2024
19bc1c9
Merge branch 'develop' of https://github.com/JuDFTteam/aiida-kkr into…
dantogni Oct 8, 2024
19e728a
Extend parse_Jij function compatibility
dantogni Oct 8, 2024
27616f7
Add example notebook combining Jij extraction and spin dynamics simul…
PhilippRue Nov 11, 2024
cf2b57c
Update decimation workchain
PhilippRue Nov 15, 2024
f6abcf1
Merge pull request #151 from JuDFTteam/dependabot/pip/develop/pre-com…
PhilippRue Nov 15, 2024
33c356d
Merge pull request #152 from JuDFTteam/dependabot/pip/develop/pylint-…
PhilippRue Nov 15, 2024
3a486e4
Merge pull request #154 from JuDFTteam/pre-commit-ci-update-config
PhilippRue Nov 15, 2024
de83ddc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 15, 2024
620cc4c
Update ci.yml
PhilippRue Nov 15, 2024
4d33c2c
Update github actions
PhilippRue Nov 18, 2024
fc98f34
Fix pylint checks for decimation workflow
PhilippRue Nov 18, 2024
d0cb33b
Update developer guide
PhilippRue Nov 20, 2024
bd38be8
Try updating aiida-testing (renamed aiida-test-cache), maybe needs ai…
PhilippRue Nov 20, 2024
fb57239
Downgrade aiida-core to v2.2.2 to fix caching
PhilippRue Nov 20, 2024
28662e0
Fixes tests with caching for KkrCalculation and VoronoiCalculation
PhilippRue Nov 20, 2024
a65b13e
Reactivate KKRimp caching test and minor cleanups
PhilippRue Nov 20, 2024
9a2c0db
Update developer guide
PhilippRue Nov 20, 2024
eb18b6c
Update yapf, pre-commit, MakrupSafe and pylint dependencies
PhilippRue Nov 20, 2024
bbcd765
pylint fixes
PhilippRue Nov 20, 2024
f3621b1
Update vorostart tests with new caching files
PhilippRue Nov 20, 2024
e8466ef
Update tests for bs, dos and gf_writeout workchains
PhilippRue Nov 20, 2024
68dc4a0
activate scf test
PhilippRue Nov 20, 2024
33655e7
update eos test
PhilippRue Nov 20, 2024
5f44eb2
update decimation tests
PhilippRue Nov 20, 2024
e5472d4
update kkrimp workflow tests
PhilippRue Nov 21, 2024
769220f
Activate all test that should work (with the proper aiida-test-cache …
PhilippRue Nov 21, 2024
391697d
use aiida-test-cache as dependency for CI
PhilippRue Nov 21, 2024
9fc9e18
Merge remote-tracking branch 'origin/master' into update_tests
PhilippRue Nov 21, 2024
ce9414c
Fix SyntaxWarning
PhilippRue Nov 21, 2024
07fcc3d
homogenize ci and cd actions
PhilippRue Nov 21, 2024
335aa03
update README with checklist how to create a release
PhilippRue Nov 21, 2024
29fb18c
add pull request template for releases
PhilippRue Nov 21, 2024
e367d69
Merge pull request #165 from JuDFTteam/update_tests
PhilippRue Nov 21, 2024
4128ab0
bump version number to v2.2.0
PhilippRue Nov 21, 2024
9e53278
Remove direct dependency from pyptoject.toml (gets rejected by pypi o…
PhilippRue Nov 21, 2024
3144c3a
bump version number to v2.2.1
PhilippRue Nov 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.1.0
current_version = 2.2.1
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
Expand Down
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Next release

## Description of important changes

... Add here ...

## Checklist for next release

- [ ] finish your development and merge it into the `develop` branch
- [ ] update documentation
- [ ] update / fix tests
- [ ] bump version numbers (in files `aiida_kkr/__init__.py`, `pyproject.toml`, `.bumpversion.cfg`)

If everything is done, you can merge your changes from `develop` back into `master` and create a tag for the new version number. Creating a new tag always triggers publication to pypi (see `.github/workflows/cd.yml` for the definition of this github action).
40 changes: 20 additions & 20 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Cache python dependencies
id: cache-pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-docs-${{ hashFiles('**/setup.json') }}
Expand Down Expand Up @@ -53,21 +53,21 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache python dependencies
id: cache-pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-pre-commit-${{ hashFiles('**/setup.json') }}
restore-keys: |
pip-pre-commit-

- name: Set up Python 3.8
uses: actions/setup-python@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Install python dependencies
run: |
Expand All @@ -93,8 +93,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
aiida: [{version: 'aiida-core==2.3.0', name: '2.3.0'}]
python-version: ["3.10", "3.11", "3.12"]
aiida: [{version: 'aiida-core==2.5.2', name: '2.5.2'}]
masci-tools: [{version: 'git+https://github.com/JuDFTteam/masci-tools.git@develop', name: '-masci-develop'}]
allowed-to-fail: [false]

Expand Down Expand Up @@ -122,10 +122,10 @@ jobs:
- 5001:22

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -143,7 +143,7 @@ jobs:
- name: Install aiida-kkr
run: |
pip install ${{ matrix.aiida.version }} ${{ matrix.masci-tools.version }}
pip install git+https://github.com/JuDFTteam/aiida-testing.git@4ddb0e48a8a720e8fca5f8d09576c5aff8c36dbf
pip install git+https://github.com/PhilippRue/aiida-test-cache.git@change_aiida-core_version
pip install .[testing]
pip install reentry
reentry scan
Expand Down Expand Up @@ -176,14 +176,14 @@ jobs:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.12
- name: Install flit
run: |
pip install flit~=3.4
pip install flit~=3.10
- name: Build and publish to PyPi
run: |
flit publish
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Cache python dependencies
id: cache-pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-docs-${{ hashFiles('**/setup.json') }}
Expand Down Expand Up @@ -47,21 +47,21 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache python dependencies
id: cache-pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-pre-commit-${{ hashFiles('**/setup.json') }}
restore-keys: |
pip-pre-commit-

- name: Set up Python 3.8
uses: actions/setup-python@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Install python dependencies
run: |
Expand All @@ -87,8 +87,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
aiida: [{version: 'aiida-core==2.3.0', name: '2.3.0'}]
python-version: ["3.10", "3.11", "3.12"]
aiida: [{version: 'aiida-core==2.5.2', name: '2.5.2'}]
masci-tools: [{version: 'git+https://github.com/JuDFTteam/masci-tools.git@develop', name: '-masci-develop'}]
allowed-to-fail: [false]

Expand Down Expand Up @@ -116,10 +116,10 @@ jobs:
- 5001:22

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -137,7 +137,7 @@ jobs:
- name: Install aiida-kkr
run: |
pip install ${{ matrix.aiida.version }} ${{ matrix.masci-tools.version }}
pip install git+https://github.com/JuDFTteam/aiida-testing.git@4ddb0e48a8a720e8fca5f8d09576c5aff8c36dbf
pip install git+https://github.com/PhilippRue/aiida-test-cache.git@change_aiida-core_version
pip install .[testing]
pip install reentry
reentry scan
Expand Down Expand Up @@ -174,14 +174,14 @@ jobs:
GITHUB_SUITE=True ./run_all.sh || exit 0

- name: Archive test output artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results-AIIDA__${{ matrix.aiida.name }}__MASCI__${{ matrix.masci-tools.name }}
path: tests

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./tests/coverage.xml
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,19 @@ $ reentry scan -r aiida

# Usage and Documentation

* see http://aiida-kkr.readthedocs.io for user's guide and API reference.
* see http://aiida-kkr.readthedocs.io for user's and developer's guides and API reference
* check out http://judft.de and https://jukkr.fz-juelich.de for information of the KKR codes used by the plugin

# Contributing

Thank you for your interest in contributing to aiida-kkr.
Check out our [contributing guide](CONTRIBUTING.md) for some information.

# Releasing new versions

To create a new release follow these steps:
- finish your development and merge it into the `develop` branch
- update documentation
- update / fix tests
- bump version numbers (in files `aiida_kkr/__init__.py`, `pyproject.toml`, `.bumpversion.cfg`)
- merge changes from `develop` back into `master` and create a tag for the new version number (this triggers publication to pypi)
2 changes: 1 addition & 1 deletion aiida_kkr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
AiiDA KKR
"""

__version__ = '2.1.0'
__version__ = '2.2.1'
1 change: 1 addition & 0 deletions aiida_kkr/calculations/kkrimp.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ def _get_and_verify_hostfiles(self, tempfolder):
parent_calc = parent_calcs.first().node
# extract impurity_info
found_impurity_inputnode = False
found_host_parent = False
if 'impurity_info' in self.inputs:
imp_info_inputnode = self.inputs.impurity_info
if not isinstance(imp_info_inputnode, Dict):
Expand Down
6 changes: 3 additions & 3 deletions aiida_kkr/calculations/kkrnano.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def prepare_for_submission(self, tempfolder):

else:
raise InputValidationError(
'Either `strucwithpot` or a `parent_folder` has to be provided.\ If necessary remove one of the inputs.'
'Either `strucwithpot` or a `parent_folder` has to be provided. If necessary remove one of the inputs.'
)

print('passed lattice constant=', passed_lattice_const)
Expand Down Expand Up @@ -278,7 +278,7 @@ def prepare_for_submission(self, tempfolder):

if noco:
with tempfolder.open(self._DEFAULT_NOCO_INPUT_FILE, u'w') as nonco_angles_handle:
self._write_nonco_angles(nonco_angles_handle, nonco_angles, structure)
self._write_nonco_angles(nonco_angles_handle, nonco_angles, structure) # pylint: disable=possibly-used-before-assignment

# Prepare rbasis.xyz and input.conf from Structure and input parameter data unless convert mode
if not convert:
Expand All @@ -288,7 +288,7 @@ def prepare_for_submission(self, tempfolder):
self._write_rbasis(rbasis_handle, structure, passed_lattice_const)
if write_efermi:
with tempfolder.open(self._DEFAULT_EFERMI_FILE, u'w') as efermi_file_handle:
self._write_efermi_file(efermi_file_handle, fermi)
self._write_efermi_file(efermi_file_handle, fermi) # pylint: disable=used-before-assignment

# Prepare potential and shapefun file from strucwithpot, if necessary
if use_strucwithpot:
Expand Down
20 changes: 16 additions & 4 deletions aiida_kkr/calculations/voro.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ def define(cls, spec):
required=False,
help='Use a node that specifies the potential which is used instead of the voronoi output potential'
)
spec.input(
'shapefun_overwrite',
valid_type=SinglefileData,
required=False,
help='Use a node that specifies the shapefun which is used instead of the voronoi output'
)
# define outputs
spec.output('output_parameters', valid_type=Dict, required=True, help='results of the calculation')
spec.default_output_node = 'output_parameters'
Expand All @@ -101,7 +107,7 @@ def prepare_for_submission(self, tempfolder):
vca_structure = False
if found_structure:
# for VCA: check if input structure and parameter node define VCA structure
vca_structure = vca_check(structure, parameters)
vca_structure = vca_check(structure, parameters) # pylint: disable=used-before-assignment

code = self.inputs.code

Expand All @@ -114,7 +120,7 @@ def prepare_for_submission(self, tempfolder):

if found_parent:
# check if parent is either Voronoi or previous KKR calculation
overwrite_potential, parent_calc = self._check_valid_parent(parent_calc_folder)
overwrite_potential, parent_calc = self._check_valid_parent(parent_calc_folder) # pylint: disable=possibly-used-before-assignment

#cross check if no structure was given and extract structure from parent
if found_structure and not vca_structure:
Expand Down Expand Up @@ -182,7 +188,7 @@ def prepare_for_submission(self, tempfolder):
outfolder = parent_calc.outputs.retrieved # copy from remote folder
copylist = [parent_calc.process_class._OUT_POTENTIAL]
elif has_potfile_overwrite:
outfolder = potfile_overwrite # copy from potential sfd
outfolder = potfile_overwrite # copy from potential sfd # pylint: disable=possibly-used-before-assignment
copylist = [potfile_overwrite.filename]
else:
copylist = []
Expand All @@ -191,7 +197,13 @@ def prepare_for_submission(self, tempfolder):
filename = file1
if (found_parent or has_potfile_overwrite) and file1 == copylist[0]:
filename = self._POTENTIAL_IN_OVERWRITE
local_copy_list.append((outfolder.uuid, file1, filename))
local_copy_list.append((outfolder.uuid, file1, filename)) # pylint: disable=possibly-used-before-assignment

# add shapefun to overwrite
if 'shapefun_overwrite' in self.inputs:
shapefun_overwrite = self.inputs.shapefun_overwrite
filename = shapefun_overwrite.filename
local_copy_list.append((shapefun_overwrite.uuid, filename, 'shapefun_overwrite'))

# Prepare CalcInfo to be returned to aiida
calcinfo = CalcInfo()
Expand Down
2 changes: 1 addition & 1 deletion aiida_kkr/parsers/kkrnano.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def _findSimpleEntries(self, string2find, retrieved_folder, output_file_name, li
array = np.genfromtxt(StringIO(keyvalue.replace('D', 'e')), delimiter=' ', dtype=None) #[0]

try:
returnlist.append(array.item()[0])
returnlist.append(array.item()[0]) # pylint: disable=possibly-used-before-assignment
except TypeError:
returnlist.append(array.item())

Expand Down
2 changes: 1 addition & 1 deletion aiida_kkr/tools/imp_cluster_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def create_combined_imp_info(

# set zimp in scoef file (not used by the code but makes it easier to read the files / debug)
if single_single:
clust1[0][4] = zimp1
clust1[0][4] = zimp1 # pylint: disable=possibly-used-before-assignment
clust2[0][4] = zimp2
#if debug:
# print('cls1:', clust1)
Expand Down
12 changes: 6 additions & 6 deletions aiida_kkr/tools/ldau.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ def get_ldaumatrices(retrieved):
iphi = ii
ii += 1
# save matrices to output dict
txt_dict_ldaumats['wldau'] = txt[iwldau + 1:iuldau]
txt_dict_ldaumats['uldau'] = txt[iuldau + 1:iphi]
txt_dict_ldaumats['phi'] = txt[iphi + 1:]
txt_dict_ldaumats['wldau'] = txt[iwldau + 1:iuldau] # pylint: disable=possibly-used-before-assignment
txt_dict_ldaumats['uldau'] = txt[iuldau + 1:iphi] # pylint: disable=possibly-used-before-assignment
txt_dict_ldaumats['phi'] = txt[iphi + 1:] # pylint: disable=possibly-used-before-assignment

return has_ldaupot_file, txt_dict_ldaumats

Expand Down Expand Up @@ -164,8 +164,8 @@ def get_LDAU_initmatrices_dict(txts_ldaumat1, offset=0):
# Fill the dictionary with atom-wise information
for iatom in range(len(iatoms)):
LDAU_initmatrices_dict[f'iatom={int(iatoms[iatom])-1+offset}'] = {}
LDAU_initmatrices_dict[f'iatom={int(iatoms[iatom])-1+offset}']['wldau'] = wldaumat[iatom]
LDAU_initmatrices_dict[f'iatom={int(iatoms[iatom])-1+offset}']['uldau'] = uldaumat[iatom]
LDAU_initmatrices_dict[f'iatom={int(iatoms[iatom])-1+offset}']['phi'] = phimat[iatom]
LDAU_initmatrices_dict[f'iatom={int(iatoms[iatom])-1+offset}']['wldau'] = wldaumat[iatom] # pylint: disable=possibly-used-before-assignment
LDAU_initmatrices_dict[f'iatom={int(iatoms[iatom])-1+offset}']['uldau'] = uldaumat[iatom] # pylint: disable=used-before-assignment
LDAU_initmatrices_dict[f'iatom={int(iatoms[iatom])-1+offset}']['phi'] = phimat[iatom] # pylint: disable=used-before-assignment

return LDAU_initmatrices_dict
Loading
Loading