Skip to content

Commit

Permalink
🚀 Release v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bastonero committed Mar 1, 2024
1 parent 42503f3 commit 85aa3c9
Show file tree
Hide file tree
Showing 4 changed files with 222 additions and 12 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/update_changelog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/bash
# -*- coding: utf-8 -*-
"""Script for automatically updating the `CHANGELOG.md` based on the commits since the latest release tag."""
from pathlib import Path
import re
import subprocess

DEFAULT_CHANGELOG_SECTIONS = """
### ‼️ Breaking changes
### ✨ New features
### 🗑️ Deprecations
### 👌 Improvements
### 🐛 Bug fixes
### 📚 Documentation
### 🔧 Maintenance
### ⬆️ Update dependencies
### ♻️ Refactor
"""


def update_changelog():
"""Update the `CHANGELOG.md` for a first draft of the release."""
print('🔍 Checking the current version number')
current_changelog = Path('CHANGELOG.md').read_text(encoding='utf-8')

from aiida_quantumespresso import __version__

if str(__version__) in current_changelog:
print('🛑 Current version already in `CHANGELOG.md`. Skipping...')
return

print('⬆️ Found updated version number, adapting `CHANGELOG.md`.')
tags = subprocess.run(['git', 'tag', '--sort=v:refname'], capture_output=True, check=True, encoding='utf-8').stdout
latest_tag = re.findall(r'(v\d\.\d\.\d)\n', tags)[-1]

print(f'🔄 Comparing with latest tag `{latest_tag}`.')
commits = subprocess.run(['git', 'log', "--pretty=format:'%h|%H|%s'", f'{latest_tag}..origin/main'],
capture_output=True,
check=True,
encoding='utf-8').stdout

pr_pattern = re.compile(r'\(\S(?P<pr_number>\d+)\)')

changelog_message = f'## v{__version__}\n' + DEFAULT_CHANGELOG_SECTIONS

for commit in commits.splitlines():

# Remove the PR number from the commit message
pr_match = pr_pattern.search(commit)

if pr_match is not None:
pr_number = pr_match.groupdict()['pr_number']
commit = commit.replace(fr'(#{pr_number})', '')

# Add the commit hash (short) to link to the changelog
commit = commit.strip("'")
hash_short, hash_long, message = commit.split('|', maxsplit=2)
message += f'[[{hash_short}](https://github.com/aiidateam/aiida-quantumespresso/commit/{hash_long})]'
changelog_message += f'\n* {message}'

with Path('CHANGELOG.md').open('w', encoding='utf8') as handle:
handle.write(changelog_message + '\n\n' + current_changelog)

print("🚀 Success! Finalise the `CHANGELOG.md` and let's get this baby released.")


if __name__ == '__main__':
update_changelog()
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## v1.1.0

This minor release includes new post-processing utilities, a small breaking change in [[42503f3]](https://github.com/bastonero/aiida-vibroscopy/commit/42503f312d9a812cfc46d4c4a03a78641201e1d3) with regards to reference system for non-analytical and polarization directions. Some examples providing
a unique python script to run the `IRamanSpectraWorkChain` are also added to help new users to get started. The license terms are also updated.
A CHANEGELOG file is finally added to keep track in a pretty format of the changes among releases of the code.

The new post-processing utilities can be used directly through a `VibrationalData` node, in a similar fashion to the other methods.
For instance, to compute the complex dielectric matrix and the normal reflectivity in the infrared regime:

```python
node = load_node(PK) # PK to a VibrationalData node

complex_dielectric = node.run_complex_dielectric_function() # (3,3,num_steps) shape complex array; num_steps are the number of frequency points where the function is evaluated
reflectivity = node.run_normal_reflectivity_spectrum([0,0,1]) # (frequency points, reflectance value), [0,0,1] is the orthogonal direction index probed via q.eps.q
```

Now, the polarization and non-analytical directions in _all_ methods in aiida-vibroscopy should be given in Cartesian coordinates:

```python
node = load_node(PK) # PK to a VibrationalData node

scattering_geometry = dict(pol_incoming=[1,0,0], pol_outgoing=[1,0,0], nac_direction=[0,0,1]) # corresponding to ZXXZ scattering setup
intensities, frequencies, mode_symmetry_labels = node.run_single_crystal_raman_intensities(**scattering_geometry)
```

### ‼️ Breaking changes

* Post-processing: polarization and nac directions in Cartesian coordinates [[42503f3]](https://github.com/bastonero/aiida-vibroscopy/commit/42503f312d9a812cfc46d4c4a03a78641201e1d3)

### 👌 Improvements

* Post-processing: computation of complex dielectric function and normal reflectivity in the infrared [[42503f3]](https://github.com/bastonero/aiida-vibroscopy/commit/42503f312d9a812cfc46d4c4a03a78641201e1d3)
* `Examples`: new folder with working examples for different use cases to get new users started [[7deb31b]](https://github.com/bastonero/aiida-vibroscopy/commit/7deb31b5f547ca16e4522be960b4aa5bbe13fccf)
* CI: add codecov step [[f36e8a1]](https://github.com/bastonero/aiida-vibroscopy/commit/f36e8a10566af68843546bae428560dff393aaf1)

### 🐛 Bug Fixes

* `Docs`: fix typos [[85b1830]](https://github.com/bastonero/aiida-vibroscopy/commit/85b18305be6e7e76efce35d9e4ae4c5a3547f9bc), [[e924b3d]](https://github.com/bastonero/aiida-vibroscopy/commit/e924b3dd436a67192f6c0780ff3a318581ab1fc5)
* Post-processing: fix coordinates and units [[42503f3]](https://github.com/bastonero/aiida-vibroscopy/commit/42503f312d9a812cfc46d4c4a03a78641201e1d3)

### 📚 Documentation

* Set correct hyperlink for AiiDA paper [[c92994d]](https://github.com/bastonero/aiida-vibroscopy/commit/c92994de36c336a265ac262eea2dc8d77fb11f08)

### 🔧 Maintenance

* Adapt tests also for other changes [[be3a6b7]](https://github.com/bastonero/aiida-vibroscopy/commit/be3a6b7d67926816957634fd7b520cd021532f0f)
* Add loads of tests [[42503f3]](https://github.com/bastonero/aiida-vibroscopy/commit/42503f312d9a812cfc46d4c4a03a78641201e1d3)
* `README`: add more information and badges [[c92994d]](https://github.com/bastonero/aiida-vibroscopy/commit/c92994de36c336a265ac262eea2dc8d77fb11f08)
* Docs: Remove aiida.manage.configuration.load_documentation_profile [[f914cbb]](https://github.com/bastonero/aiida-vibroscopy/commit/f914cbb5460d4f988dd117628890a8f53f1c976a)
* DevOps: update docs dependencies [[a0d124e]](https://github.com/bastonero/aiida-vibroscopy/commit/a0d124ee24cb287f9d90583b389f38d6b6265b9e)
* Bump SSSP version to 1.3 in tests [[94c72e5]](https://github.com/bastonero/aiida-vibroscopy/commit/94c72e5183584af08d9874fe2b6fc2ad41fce1b5)

### ⬆️ Update dependencies

* DevOps: update docs dependencies [[a0d124e]](https://github.com/bastonero/aiida-vibroscopy/commit/a0d124ee24cb287f9d90583b389f38d6b6265b9e)
91 changes: 80 additions & 11 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,96 @@
Non-Commercial, End-User Software License Agreement for AiiDA-Vibroscopy

Copyright (c), 2021-2024, University of Bremen, Germany (U Bremen Excellence Chair),
École Polytechnique Fédérale de Lausanne (Theory and Simulation of Materials (THEOS)
and National Centre for Computational Design and Discovery of Novel Materials
(NCCR MARVEL)), Switzerland and Paul Scherrer Institut (Laboratory for Materials
Simulations (LMS)), Switzerland. All rights reserved.

INTRODUCTION

- This license agreement sets forth the terms and conditions under which the Authors and their Insitutions (hereafter "LICENSORS") of the program "AiiDA-Vibroscopy" (hereafter "PROGRAM"), will grant you (hereafter "LICENSEE") a fully-paid, non-exclusive, and non-transferable license for academic, non-commercial purposes only (hereafter “LICENSE”) to use the PROGRAM computer software and associated documentation furnished hereunder.
- This license agreement sets forth the terms and conditions under which the
Authors and their Institutions (hereafter "LICENSORS") of the program
"AiiDA-Vibroscopy" (hereafter "PROGRAM"), will grant you (hereafter
"LICENSEE") a fully-paid, non-exclusive, and non-transferable license for
academic, non-commercial purposes only (hereafter "LICENSE") to use the PROGRAM
computer software and associated documentation furnished hereunder.

- LICENSEE acknowledges that the PROGRAM is a research tool still in the development stage, that is being supplied "as is", without any related services, improvements or warranties from LICENSORS and that this license is entered into in order to enable others to utilize the PROGRAM in their academic activities.
- LICENSEE acknowledges that the PROGRAM is a research tool still in the
development stage, that is being supplied "as is", without any related
services, improvements or warranties from LICENSORS and that this license is
entered into in order to enable others to utilize the PROGRAM in their academic
activities.

TERMS AND CONDITIONS OF THE LICENSE

1. LICENSORS grants to LICENSEE a fully-paid up, non-exclusive, and non-transferable license to use the PROGRAM for academic, non-commercial purposes, upon the terms and conditions hereinafter set out and until termination of this license as set forth below.
1. LICENSORS grant to LICENSEE a fully-paid up, non-exclusive, and
non-transferable license to use the PROGRAM for academic, non-commercial
purposes, upon the terms and conditions hereinafter set out and until
termination of this license as set forth below.

2. LICENSEE acknowledges that the PROGRAM is a research tool still in the development stage. The PROGRAM is provided "as is", without any related services or improvements from LICENSORS and that the LICENSE is entered into in order to enable others to utilize the PROGRAM in their academic activities.
2. LICENSEE acknowledges that the PROGRAM is a research tool still in the
development stage. The PROGRAM is provided "as is", without any related
services or improvements from LICENSORS and that the LICENSE is entered into in
order to enable others to utilize the PROGRAM in their academic activities.

3. LICENSORS MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR PARTICULAR PURPOSE OR THAT THE USE OF THE PROGRAM WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. LICENSORS shall not be liable for any direct, indirect or consequential damages with respect to any claim by LICENSEE or any third party arising from this Agreement or use of the PROGRAM.
3. LICENSORS MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING WITHOUT LIMITATION ANY REPRESENTATIONS OR WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR PARTICULAR PURPOSE OR THAT THE USE OF THE
PROGRAM WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
LICENSORS shall not be liable for any direct, indirect or consequential damages
with respect to any claim by LICENSEE or any third party arising from this
Agreement or use of the PROGRAM.

4. LICENSEE agrees that it will use the PROGRAM, and any modifications, improvements, or derivatives to PROGRAM that LICENSEE may create (collectively, "IMPROVEMENTS") solely for academic, non-commercial purposes and shall not distribute or transfer the PROGRAM or any IMPROVEMENTS to any person without prior written permission from LICENSORS. The terms "academic, non-commercial", as used in this Agreement, mean academic or other scholarly research which (a) is not undertaken for profit, or (b) is not intended to produce works, services, or data for commercial use, or (c) is neither conducted, nor funded, by a person or an entity engaged in the commercial use, application or exploitation of works similar to the PROGRAM.
4. LICENSEE agrees that it will use the PROGRAM, and any modifications,
improvements, or derivatives to PROGRAM that LICENSEE may create (collectively,
"IMPROVEMENTS") solely for academic, non-commercial purposes and shall not
distribute or transfer the PROGRAM or any IMPROVEMENTS to any person without
prior written permission from LICENSORS. The terms "academic, non-commercial",
as used in this Agreement, mean academic or other scholarly research which (a)
is not undertaken for profit, or (b) is not intended to produce works,
services, or data for commercial use, or (c) is neither conducted, nor funded,
by a person or an entity engaged in the commercial use, application or
exploitation of works similar to the PROGRAM.

5. LICENSEE agrees that he/she shall make the following acknowledgement in publications resulting from the use of the PROGRAM : "Lorenzo Bastonero and Nicola Marzari, Automated all-functional infrared and Raman spectra, XXX, YYY (2023), DOI: ZZZ" (LINK TO DOCUMENTATION); "Sebastiaan. P. Huber, Spyros Zoupanos, Martin Uhrin, Leopold Talirz, Leonid Kahle, Rico Häuselmann, Dominik Gresch, Tiziano Müller, Aliaksandr V. Yakutovich, Casper W. Andersen, Francisco F. Ramirez, Carl S. Adorf, Fernando Gargiulo, Snehal Kumbhar, Elsa Passaro, Conrad Johnston, Andrius Merkys, Andrea Cepellotti, Nicolas Mounet, Nicola Marzari, Boris Kozinsky, and Giovanni Pizzi, AiiDA 1.0, a scalable computational infrastructure for automated reproducible workflows and data provenance, Scientific Data 7, 300 (2020), DOI: 10.1038/s41597-020-00638-4" (http://www.aiida.net), plus any additional reference explicitly mention in the custom workflow used. Except for the above-mentioned acknowledgment, LICENSEE shall not use the PROGRAM title or the names or logos of LICENSORS, nor any adaptation thereof, nor the names of any of its employees or laboratories, in any advertising, promotional or sales material without prior written consent obtained from LICENSORS in each case.
5. LICENSEE agrees that he/she shall make the following acknowledgement in
publications resulting from the use of the PROGRAM: "Lorenzo Bastonero and Nicola
Marzari, Automated all-functionals infrared and Raman spectra, arXiv:2308.04308";
"Sebastiaan. P. Huber, Spyros Zoupanos, Martin Uhrin, Leopold Talirz, Leonid
Kahle, Rico Häuselmann, Dominik Gresch, Tiziano Müller, Aliaksandr V.
Yakutovich, Casper W. Andersen, Francisco F. Ramirez, Carl S. Adorf, Fernando
Gargiulo, Snehal Kumbhar, Elsa Passaro, Conrad Johnston, Andrius Merkys,
Andrea Cepellotti, Nicolas Mounet, Nicola Marzari, Boris Kozinsky, and
Giovanni Pizzi, AiiDA 1.0, a scalable computational infrastructure for
automated reproducible workflows and data provenance,
Scientific Data 7, 300 (2020), DOI: 10.1038/s41597-020-00638-4"
(http://www.aiida.net), plus any additional reference explicitly mentioned in
the custom workflow used. Except for the above-mentioned acknowledgment,
LICENSEE shall not use the PROGRAM title or the names or logos of LICENSORS,
nor any adaptation thereof, nor the names of any of its employees or
laboratories, in any advertising, promotional or sales material without prior
written consent obtained from LICENSORS in each case.

6. Ownership of all rights, including copyright in the PROGRAM and in any material associated therewith, shall at all times remain with LICENSORS and LICENSEE agrees to preserve same. LICENSEE agrees not to use any portion of the PROGRAM or of any IMPROVEMENTS in any machine-readable form outside the PROGRAM, nor to make any copies except for its internal use, without prior written consent of LICENSORS. LICENSEE agrees to place the following copyright notice on any such copies: © All rights reserved. University of Bremen, Germany, U Bremen Excellence Chair, 2023; Authors: Lorenzo Bastonero. Paul Scherrer Institut, Switzerland, Laboratory of Materials Simulations, 2023; Authors: Giovanni Pizzi. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, Laboratory of Theory and Simulation of Materials (THEOS), 2023; Authors: Nicola Marzari.
6. Ownership of all rights, including copyright in the PROGRAM and in any
material associated therewith, shall at all times remain with LICENSORS, and
LICENSEE agrees to preserve the same. LICENSEE agrees not to use any portion of
the PROGRAM or of any IMPROVEMENTS in any machine-readable form outside the
PROGRAM, nor to make any copies except for its internal use, without prior
written consent of LICENSORS. LICENSEE agrees to place the following copyright
notice on any such copies: © All rights reserved. University of Bremen, Germany,
U Bremen Excellence Chair, 2024; Authors: Lorenzo Bastonero and Nicola Marzari.
École Polytechnique Fédérale de Lausanne, Switzerland, Laboratory of Theory
and Simulation of Materials (THEOS), 2024; Authors: Nicola Marzari.
Paul Scherrer Institut, Switzerland, Laboratory for Materials Simulations
(LMS), 2024; Authors: Giovanni Pizzi and Nicola Marzari.

7. The LICENSE shall not be construed to confer any rights upon LICENSEE by implication or otherwise except as specifically set forth herein.
7. The LICENSE shall not be construed to confer any rights upon LICENSEE by
implication or otherwise except as specifically set forth herein.

8. This Agreement shall be governed by the material laws of Switzerland and any dispute arising out of this Agreement or use of the PROGRAM shall be brought before the courts of Lausanne, Switzerland.
8. This Agreement shall be governed by the material laws of Switzerland and any
dispute arising out of this Agreement or use of the PROGRAM shall be brought
before the courts of Lausanne, Switzerland.

9. This Agreement and the LICENSE shall remain effective until expiration of the copyrights of the PROGRAM except that upon any breach of this Agreement by LICENSEE, LICENSORS shall have the right to terminate the LICENSE immediately upon notice to LICENSEE.
9. This Agreement and the LICENSE shall remain effective until expiration of
the copyrights of the PROGRAM except that upon any breach of this Agreement by
LICENSEE, LICENSORS shall have the right to terminate the LICENSE immediately
upon notice to LICENSEE.
2 changes: 1 addition & 1 deletion src/aiida_vibroscopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
# For further information on the license, see the LICENSE.txt file #
#################################################################################
"""AiiDA plugin for vibrational spectoscopy using Quantum ESPRESSO."""
__version__ = '1.0.2'
__version__ = '1.1.0'

0 comments on commit 85aa3c9

Please sign in to comment.