Skip to content

Commit

Permalink
Update and consolidate tests and docs CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase committed Apr 12, 2024
1 parent 7dbaaaa commit 5e8bed3
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 79 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/JOSS_draft-PDF.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
on: [push]
on:
workflow_dispatch: # only if manually run or on main branch

push:
branches: [ main ]

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: docs/JOSS/paper.md
- name: Upload
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v5
with:
name: paper
# This is the output path where Pandoc will write the compiled
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/pip_install_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,20 @@ jobs:
fail-fast: false

matrix:
os: [ ubuntu-latest, macos-14 ]
python-version: [ '3.9', '3.10', '3.11' ]
os: [ ubuntu-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 Down Expand Up @@ -55,7 +60,7 @@ jobs:
# Upload test plots
- name: Archive test plots
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: output-plots
path: tests/remote_baseline
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ 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"
python-version: "3.11"

- name: Install dependencies
run: |
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: Tests
on:
workflow_dispatch:

pull_request:
branches:
- '*' # all branches
push:
branches:
- '*' # all branches
Expand All @@ -16,15 +13,20 @@ jobs:
fail-fast: false

matrix:
os: [ ubuntu-latest, macos-14 ]
python-version: [ '3.9', '3.10', '3.11' ]
os: [ ubuntu-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 Down Expand Up @@ -52,7 +54,7 @@ jobs:
# Upload test plots
- name: Archive test plots
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: output-plots
path: tests/remote_baseline
58 changes: 0 additions & 58 deletions .github/workflows/test_mac.yml

This file was deleted.

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.9"
python: "3.11"

# Build from the docs/ directory with Sphinx
sphinx:
Expand Down
3 changes: 2 additions & 1 deletion docs/Dev_ToDo.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,5 @@
- Deal with cases where "X-rich"/"X-poor" corresponds to more than one limit (pick one and warn user?)
- `dist_tol` should also group defects for the concentration etc functions, currently doesn't (e.g. `CdTe_thermo.get_equilibrium_concentrations(limit="Te-rich", per_charge=False, fermi_level=0.5)` and `CdTe_thermo.dist_tol=10; CdTe_thermo.get_equilibrium_concentrations(limit="Te-rich", per_charge=False, fermi_level=0.5)`, same output)
- Add example to chemical potentials / thermodynamics analysis tutorials of varying chemical potentials as a function of temperature/pressure (i.e. gas phases), using the `Spinney` functions detailed here (https://spinney.readthedocs.io/en/latest/tutorial/chemipots.html#including-temperature-and-pressure-effects-through-the-gas-phase-chemical-potentials) or possibly `DefAP` functions otherwise.
- Plotting lines colour updates.
- Plotting lines colour updates.
- Archive/delete `paper` branch
2 changes: 1 addition & 1 deletion doped/utils/legacy_corrections.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get_murphy_image_charge_correction(
verbose (bool): If True details of the correction will be printed.
Returns:
The image charge correction as {charge: correction}
The image charge correction as a ``{charge: correction}`` dictionary.
"""
inv_diel = np.linalg.inv(dielectric_matrix)
det_diel = np.linalg.det(dielectric_matrix)
Expand Down

0 comments on commit 5e8bed3

Please sign in to comment.