Skip to content

Commit

Permalink
Release 1.4.1
Browse files Browse the repository at this point in the history
Merge pull request #153 from aiidateam/release/1.4.1
  • Loading branch information
yakutovicha authored Feb 16, 2022
2 parents 59a795d + 5d09ec9 commit e263cbb
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 4 deletions.
104 changes: 104 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
name: Publish on Test PyPI and PyPI

on:
push:
branches:
# Commits pushed to release/ branches are published on Test PyPI if they
# have a new version number.
- release/**
tags:
# Tags that start with the "v" prefix are published on PyPI.
- v*

jobs:

build:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2

- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install pypa/build
run: python -m pip install build

- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Upload distribution artifact
uses: actions/upload-artifact@v2
with:
name: release
path: dist/


publish-test:

name: Build and publish on TestPyPI
if: startsWith(github.ref, 'refs/heads/release/')
needs: [build]
runs-on: ubuntu-latest

environment:
name: Test PyPI
url: https://test.pypi.org/project/aiida-cp2k/

steps:
- uses: actions/download-artifact@v2
name: Download distribution artifact
with:
name: release
path: dist/

- name: Publish distribution on Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/heads/release/')
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true

publish:

name: Build and publish on PyPI
if: startsWith(github.ref, 'refs/tags')
needs: [build]
runs-on: ubuntu-latest

environment:
name: PyPI
url: https://pypi.org/project/aiida-cp2k/

steps:

- uses: actions/download-artifact@v2
name: Download distribution artifact
with:
name: release
path: dist/

- uses: softprops/action-gh-release@v0.1.14
name: Create release
if: startsWith(github.ref, 'refs/tags/v')
with:
files: |
dist/*
generate_release_notes: true

- name: Publish distribution on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion aiida_cp2k/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
###############################################################################
"""AiiDA-CP2K plugins, parsers, workflows, etc ..."""

__version__ = "1.4.0"
__version__ = "1.4.1"

# EOF
5 changes: 3 additions & 2 deletions aiida_cp2k/workchains/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,17 @@ def setup(self):
This `self.ctx.inputs` dictionary will be used by the `BaseRestartWorkChain` to submit the calculations in the
internal loop.
"""

super(Cp2kBaseWorkChain, self).setup()
self.ctx.inputs = AttributeDict(self.exposed_inputs(Cp2kCalculation, 'cp2k'))

def results(self):
super().results()
if self.inputs.cp2k.parameters != self.ctx.inputs.parameters:
self.out('final_input_parameters', self.ctx.inputs.parameters)

def overwrite_input_structure(self):
self.ctx.inputs.structure = self.ctx.children[self.ctx.iteration-1].outputs.output_structure
if "output_structure" in self.ctx.children[self.ctx.iteration-1].outputs:
self.ctx.inputs.structure = self.ctx.children[self.ctx.iteration-1].outputs.output_structure

@process_handler(priority=400, enabled=False)
def resubmit_unconverged_geometry(self, calc):
Expand Down
2 changes: 1 addition & 1 deletion setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@
"license": "MIT License",
"name": "aiida_cp2k",
"url": "https://github.com/aiidateam/aiida-cp2k",
"version": "1.4.0"
"version": "1.4.1"
}

0 comments on commit e263cbb

Please sign in to comment.