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

Develop #71

Merged
merged 31 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
eb6189c
Add paper to list (even though they cited the docs not the actual pap…
kavanase Mar 19, 2024
4886857
Update paper list
kavanase Mar 23, 2024
75827a7
Fix typo
kavanase Mar 28, 2024
760b987
Add `verbose` option to `io.parse_energies()` and set to `False` by d…
kavanase Apr 3, 2024
874b447
Add `verbose` option to `snb-parse`, and pass to `io.parse_energies()…
kavanase Apr 3, 2024
5b3156e
Close matplotlib figures after saving when running `snb-plot -a`, to …
kavanase Apr 3, 2024
36a416c
Update oxi-state guessing to be more efficient, using ``doped`` funct…
kavanase Apr 3, 2024
6fda89d
Update plotting handling for defects with undetermined displacements
kavanase Apr 3, 2024
af92249
Update tests
kavanase Apr 3, 2024
dad0691
Minor test updates – remaining failing `test_create_vasp_input` is du…
kavanase Apr 4, 2024
cdbcc0d
Remove `_reset_warnings` import from `doped`
kavanase Apr 11, 2024
ccc58e9
Bump changelog and version numbers for release
kavanase Apr 11, 2024
54ff804
Separate plotting and non plotting tests as in `doped` for efficiency
kavanase Apr 12, 2024
b897460
Use `custom_mpl_image_compare` function as in `doped` for leanness & …
kavanase Apr 12, 2024
57a4418
Refactor (most) `setUp` code in `test_input.py` to `setUpClass` for e…
kavanase Apr 12, 2024
ffdff81
Fix typo 🙄
kavanase Apr 12, 2024
4a2c174
Avoid duplication of test runs with push and PR, and ensure latest ma…
kavanase Apr 12, 2024
e955ce1
Update tests config
kavanase Apr 12, 2024
adf594b
Update tests config (pt 2)
kavanase Apr 12, 2024
86a2213
Tests consolidation
kavanase Apr 12, 2024
a35de64
Bump readthedocs.yaml versions
kavanase Apr 12, 2024
9c26fb3
Consolidate tests
kavanase Apr 13, 2024
bbf92e9
Fix typo
kavanase Apr 13, 2024
d6aea62
Update formatting and linting
kavanase Apr 13, 2024
0067d83
remove redundant lines in io.py
ireaml Apr 14, 2024
a4cd681
remove uncecessary lines in `_format_distortion_names` that format na…
ireaml Apr 14, 2024
931be0b
Minor formatting and efficiency updates
kavanase May 5, 2024
989d603
Missing `cd ..` call in `SnB_run.sh`
kavanase May 9, 2024
8fcae93
Update paper list
kavanase May 14, 2024
5084535
Merge remote-tracking branch 'origin/develop' into develop
kavanase May 14, 2024
c30b3bc
Bump changelog and version numbers for release
kavanase May 15, 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
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
max-parallel: 1

matrix:
python-version: ['3.10']
python-version: ['3.11']

name: Python ${{ matrix.python-version }} Test Pop

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

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
34 changes: 23 additions & 11 deletions .github/workflows/pip_install_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ jobs:
fail-fast: false

matrix:
os: [ ubuntu-latest, macos-14 ]
python-version: [ '3.9', '3.10', '3.11' ]
os: [ ubuntu-latest,macos-latest ]
exclude:
- os: macos-14
python-version: '3.9' # Exclude Python 3.9 on macOS, not supported for macOS-14 tests
# macos-latest should be 14 according to link below, but currently doesn't?
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

runs-on: ${{matrix.os}}

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

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -36,20 +41,27 @@ jobs:
pip install shakenbreak[tests] # install only from PyPI
- name: Test
run: |
pytest --mpl -vv tests # test everything
run: |
pytest -vv -m "not mpl_image_compare" tests # all non-plotting tests
- name: Plotting Tests
if: always() # run even if non-plotting tests fail
id: plotting_tests # Add an ID to this step for reference
run: |
pytest --mpl -m "mpl_image_compare" tests/test_plotting.py # plotting tests
pytest --mpl -m "mpl_image_compare" tests/test_shakenbreak.py # plotting tests
- name: Generate GH Actions test plots
if: always() # always generate the plots, even if the tests fail
run: |
if: failure() && steps.plotting_tests.outcome == 'failure' # Run only if plotting tests fail
run: |
# Generate the test plots in case there were any failures:
pytest --mpl-generate-path=tests/remote_baseline tests/test_plotting.py
pytest --mpl-generate-path=tests/remote_baseline tests/test_shakenbreak.py
pytest --mpl-generate-path=tests/remote_baseline -m "mpl_image_compare" tests/test_plotting.py
pytest --mpl-generate-path=tests/remote_baseline -m "mpl_image_compare" tests/test_shakenbreak.py
# Upload test plots
- name: Archive test plots
if: always() # always upload the plots, even if the tests fail
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: output-plots
path: tests/remote_baseline
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
# only run when tests have passed (or manually triggered)

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

- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
46 changes: 25 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
name: Tests

on:
pull_request:
branches:
- main
- develop
push:
branches:
- main
- develop
- '*' # all branches

workflow_dispatch:

Expand All @@ -18,14 +13,20 @@ jobs:
fail-fast: false

matrix:
python-version: ['3.9', '3.10', '3.11']
os: [ubuntu-latest,macos-latest]
matrix:
os: [ ubuntu-latest, macos-14 ]
python-version: [ '3.9', '3.10', '3.11' ]
exclude:
- os: macos-14
python-version: '3.9' # Exclude Python 3.9 on macOS, not supported for macOS-14 tests
# macos-latest should be 14 according to link below, but currently doesn't?
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -39,27 +40,30 @@ jobs:
pip show -V pymatgen-analysis-defects
pip show -V pymatgen
pip show -V pytest
pip show -V doped

- name: Test
run: |
pytest --mpl -vv tests # test everything
pytest -vv -m "not mpl_image_compare" tests # all non-plotting tests

- name: Plotting Tests
if: always() # run even if non-plotting tests fail
id: plotting_tests # Add an ID to this step for reference
run: |
pytest --mpl -m "mpl_image_compare" tests/test_plotting.py # plotting tests
pytest --mpl -m "mpl_image_compare" tests/test_shakenbreak.py # plotting tests

- name: Generate GH Actions test plots
if: always() # always generate the plots, even if the tests fail
run: |
if: failure() && steps.plotting_tests.outcome == 'failure' # Run only if plotting tests fail
run: |
# Generate the test plots in case there were any failures:
pytest --mpl-generate-path=tests/remote_baseline tests/test_plotting.py
pytest --mpl-generate-path=tests/remote_baseline tests/test_shakenbreak.py
pytest --mpl-generate-path=tests/remote_baseline -m "mpl_image_compare" tests/test_plotting.py
pytest --mpl-generate-path=tests/remote_baseline -m "mpl_image_compare" tests/test_shakenbreak.py

# Upload test plots
- name: Archive test plots
if: always() # always upload the plots, even if the tests fail
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: output-plots
path: tests/remote_baseline

# - name: Download a single artifact
# uses: actions/download-artifact@v3
# with:
# name: output-plots
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
version: 2

build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.11"

# Build from the docs/ directory with Sphinx
sphinx:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Change Log
==========

v3.3.2
----------
- Add ``verbose`` options to ``io.parse_energies()`` and ``snb-parse``, also used in ``snb-plot`` and
``snb-analyse``, and set to ``False`` by default to reduce verbosity of certain SnB CLI commands.
- Use ``doped`` functions to make oxi-state guessing (and thus defect initialisation) more efficient.
- Miscellaneous efficiency and robustness updates.
- Testing updates.

v3.3.1
----------
- ``distortion_metadata.json`` for each defect now saved to the individual defect folders (as well as the
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ Automatic testing is run on the master and develop branches using Github Actions

- X. Wang et al. **_Upper efficiency limit of Sb<sub>2</sub>Se<sub>3</sub> solar cells_** [_arXiv_](https://arxiv.org/abs/2402.04434) 2024
- I. Mosquera-Lois et al. **_Machine-learning structural reconstructions for accelerated point defect calculations_** [_arXiv_](https://doi.org/10.48550/arXiv.2401.12127) 2024
- K. Li et al. **_Computational Prediction of an Antimony-based n-type Transparent Conducting Oxide: F-doped Sb<sub>2</sub>O<sub>5</sub>_** [_ChemRxiv_](https://chemrxiv.org/engage/chemrxiv/article-details/65846b8366c1381729bc5f23) 2023
- K. Li et al. **_Computational Prediction of an Antimony-based n-type Transparent Conducting Oxide: F-doped Sb<sub>2</sub>O<sub>5</sub>_** [_Chemistry of Materials_](https://doi.org/10.1021/acs.chemmater.3c03257) 2024
- X. Wang et al. **_Four-electron negative-U vacancy defects in antimony selenide_** [_Physical Review B_](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.108.134102) 2023
- Y. Kumagai et al. **_Alkali Mono-Pnictides: A New Class of Photovoltaic Materials by Element Mutation_** [_PRX Energy_](http://dx.doi.org/10.1103/PRXEnergy.2.043002) 2023
- A. T. J. Nicolson et al. **_Cu<sub>2</sub>SiSe<sub>3</sub> as a promising solar absorber: harnessing cation dissimilarity to avoid killer antisites_** [_Journal of Materials Chemistry A_](https://doi.org/10.1039/D3TA02429F) 2023
- J. Willis, K. B. Spooner, D. O. Scanlon **_On the possibility of p-type doping in barium stannate_** [_Applied Physics Letters_](https://doi.org/10.1063/5.0170552) 2023

- J. Cen et al. **_Cation disorder dominates the defect chemistry of high-voltage LiMn<sub>1.5</sub>Ni<sub>0.5</sub>O<sub>4</sub> (LMNO) spinel cathodes_** [_Journal of Materials Chemistry A_](https://doi.org/10.1039/D3TA00532A) 2023
- J. Willis & R. Claes et al. **_Limits to Hole Mobility and Doping in Copper Iodide_** [_Chem Mater_](https://doi.org/10.1021/acs.chemmater.3c01628) 2023
- I. Mosquera-Lois & S. R. Kavanagh, A. Walsh, D. O. Scanlon **_Identifying the ground state structures of point defects in solids_** [_npj Computational Materials_](https://www.nature.com/articles/s41524-023-00973-1) 2023
- B. Peng et al. **_Advancing understanding of structural, electronic, and magnetic properties in 3d-transition-metal TM-doped α-Ga₂O₃ (TM = V, Cr, Mn, and Fe)_** [_Journal of Applied Physics_](https://doi.org/10.1063/5.0173544) 2023
- Y. T. Huang & S. R. Kavanagh et al. **_Strong absorption and ultrafast localisation in NaBiS<sub>2</sub> nanocrystals with slow charge-carrier recombination_** [_Nature Communications_](https://www.nature.com/articles/s41467-022-32669-3) 2022
- S. R. Kavanagh, D. O. Scanlon, A. Walsh, C. Freysoldt **_Impact of metastable defect structures on carrier recombination in solar cells_** [_Faraday Discussions_](https://doi.org/10.1039/D2FD00043A) 2022
- Y-S. Choi et al. **_Intrinsic Defects and Their Role in the Phase Transition of Na-Ion Anode Na<sub>2</sub>Ti<sub>3</sub>O<sub>7</sub>_** [_ACS Appl. Energy Mater._](https://doi.org/10.1021/acsaem.2c03466) 2022 (Early version)
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
author = 'Irea Mosquera-Lois, Seán R. Kavanagh'

# The full version, including alpha/beta/rc tags
release = '3.3.1'
release = '3.3.2'


# -- General configuration ---------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,15 @@ Studies using ``ShakeNBreak``

- X\. Wang et al. **Upper efficiency limit of Sb₂Se₃ solar cells** `arXiv <https://arxiv.org/abs/2402.04434>`_ 2024
- I\. Mosquera-Lois et al. **Machine-learning structural reconstructions for accelerated point defect calculations** `arXiv <https://doi.org/10.48550/arXiv.2401.12127>`_ 2024
- K\. Li et al. **Computational Prediction of an Antimony-based n-type Transparent Conducting Oxide: F-doped Sb₂O₅** `ChemRxiv <https://chemrxiv.org/engage/chemrxiv/article-details/65846b8366c1381729bc5f23>`_ 2024
- K\. Li et al. **Computational Prediction of an Antimony-based n-type Transparent Conducting Oxide: F-doped Sb₂O₅** `Chemistry of Materials <https://doi.org/10.1021/acs.chemmater.3c03257>`_ 2024
- X\. Wang et al. **Four-electron negative-U vacancy defects in antimony selenide** `Physical Review B <https://journals.aps.org/prb/abstract/10.1103/PhysRevB.108.134102>`_ 2023
- Y\. Kumagai et al. **Alkali Mono-Pnictides: A New Class of Photovoltaic Materials by Element Mutation** `PRX Energy <http://dx.doi.org/10.1103/PRXEnergy.2.043002>`__ 2023
- J\. Willis, K. B. Spooner, D. O. Scanlon. **On the possibility of p-type doping in barium stannate** `Applied Physics Letters <https://doi.org/10.1063/5.0170552>`__ 2023
- A\. T. J. Nicolson et al. **Cu₂SiSe₃ as a promising solar absorber: harnessing cation dissimilarity to avoid killer antisites** `Journal of Materials Chemistry A <https://doi.org/10.1039/D3TA02429F>`__ 2023
- J\. Cen et al. **Cation disorder dominates the defect chemistry of high-voltage LiMn** :sub:`1.5`**Ni** :sub:`0.5`**O₄ (LMNO) spinel cathodes** `Journal of Materials Chemistry A`_ 2023
- J\. Cen et al. **Cation disorder dominates the defect chemistry of high-voltage LiMn** :sub:`1.5` **Ni** :sub:`0.5` **O₄ (LMNO) spinel cathodes** `Journal of Materials Chemistry A`_ 2023
- J\. Willis & R. Claes et al. **Limits to Hole Mobility and Doping in Copper Iodide** `Chem Mater <https://doi.org/10.1021/acs.chemmater.3c01628>`__ 2023
- I\. Mosquera-Lois & S. R. Kavanagh, A. Walsh, D. O. Scanlon **Identifying the ground state structures of point defects in solids** `npj Computational Materials`_ 2023
- B\. Peng et al. **Advancing understanding of structural, electronic, and magnetic properties in 3d-transition-metal TM-doped α-Ga₂O₃ (TM = V, Cr, Mn, and Fe)** `Journal of Applied Physics <https://doi.org/10.1063/5.0173544>`__ 2023
- Y\. T. Huang & S. R. Kavanagh et al. **Strong absorption and ultrafast localisation in NaBiS₂ nanocrystals with slow charge-carrier recombination** `Nature Communications`_ 2022
- S\. R. Kavanagh, D. O. Scanlon, A. Walsh, C. Freysoldt **Impact of metastable defect structures on carrier recombination in solar cells** `Faraday Discussions`_ 2022
- Y-S\. Choi et al. **Intrinsic Defects and Their Role in the Phase Transition of Na-Ion Anode Na₂Ti₃O₇** `ACS Appl. Energy Mater. <https://doi.org/10.1021/acsaem.2c03466>`__ 2022 (Early version)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def package_files(directory):

setup(
name="shakenbreak",
version="3.3.1",
version="3.3.2",
description="Package to generate and analyse distorted defect structures, in order to "
"identify ground-state and metastable defect configurations.",
long_description=long_description,
Expand Down
Loading