Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
9157c99
Set up linting rules
nedtaylor Oct 9, 2024
6524d40
Apply linting rules
nedtaylor Oct 9, 2024
c65f99d
Improve linting catching
nedtaylor Oct 9, 2024
26573c3
Fix continuation specifier line
nedtaylor Oct 9, 2024
b8f13c2
Fix formatting
nedtaylor Oct 9, 2024
1c90091
Fix formatting
nedtaylor Oct 24, 2024
7575b05
Update linting checks
nedtaylor Oct 24, 2024
e9140d7
Fix formatting
nedtaylor Oct 25, 2024
93549a2
Update formatting rules
nedtaylor Oct 25, 2024
e39c710
Add workflow
nedtaylor Oct 25, 2024
f632961
Add actions
nedtaylor Oct 25, 2024
db4bdda
Update action
nedtaylor Oct 25, 2024
0fb9d11
Fix variables
nedtaylor Oct 25, 2024
9e6195d
Remove module definition
nedtaylor Oct 25, 2024
cb9a8a9
Add initialisation
nedtaylor Oct 25, 2024
b88a93c
Fix ifx issues with rank 0 and assumed length strings
nedtaylor Oct 25, 2024
2598b18
Change compiler versions
nedtaylor Oct 25, 2024
0af83bd
Add pointer names
nedtaylor Oct 25, 2024
ba2f163
Update compiler versions
nedtaylor Oct 25, 2024
b7f6c5a
Update compiler versions
nedtaylor Oct 25, 2024
01da00f
Fix typo
nedtaylor Oct 25, 2024
e0775dc
Add pointer names
nedtaylor Oct 25, 2024
8ba481f
Fix excludes
nedtaylor Oct 25, 2024
ccb070c
Fix excludes
nedtaylor Oct 25, 2024
2f0c80a
Remove unused variable
nedtaylor Oct 26, 2024
e7af7b6
Fix grouping
nedtaylor Oct 26, 2024
235f8bc
Fix geom_rw references
nedtaylor Oct 29, 2024
e4f874d
Fix geom_rw references
nedtaylor Oct 29, 2024
eb15106
Move from setuptools to scikit-build
nedtaylor Oct 29, 2024
5d3273b
Add version number dynamic handling
nedtaylor Oct 29, 2024
df72cc0
Remove meson build directory specifier
nedtaylor Oct 29, 2024
66aaa7b
Remove file
nedtaylor Oct 29, 2024
350a1b8
Remove intel tests
nedtaylor Oct 29, 2024
9e265ba
Install gcovr
nedtaylor Oct 29, 2024
0c57ae6
Add python version
nedtaylor Oct 29, 2024
4554287
Point to python
nedtaylor Oct 29, 2024
aa263ff
Install python dependencies
nedtaylor Oct 29, 2024
09df8d8
Add flags
nedtaylor Oct 29, 2024
55ceb2c
Revert change
nedtaylor Oct 29, 2024
b201685
Add coverage type
nedtaylor Oct 29, 2024
9ecf976
Generalise python extension
nedtaylor Oct 29, 2024
354e9be
Improve test accuracy
nedtaylor Oct 29, 2024
a6bb6fb
Remove extra dot
nedtaylor Oct 29, 2024
0550c13
Improve version and tag clarity
nedtaylor Oct 30, 2024
8ed474e
Add logo
nedtaylor Oct 30, 2024
96241f7
Add notes on installation
nedtaylor Oct 30, 2024
32963d6
Add dependencies
nedtaylor Oct 30, 2024
b8f16ea
Fix Fortran version reference
nedtaylor Oct 30, 2024
8b183f7
Fix python version number
nedtaylor Oct 30, 2024
87ebe6d
Add email
nedtaylor Oct 30, 2024
92e68bf
Fix allocation and deallocation
nedtaylor Oct 30, 2024
b9e0916
Add warning print procedure
nedtaylor Oct 30, 2024
8448be3
Handle no neighbours
nedtaylor Oct 30, 2024
14ce6bf
Merge branch 'development' into 18-consistent-linting
nedtaylor Oct 30, 2024
af98c6c
Fix indentation
nedtaylor Oct 30, 2024
e3a8109
Add rule
nedtaylor Oct 30, 2024
c4e861b
Fix error handling
nedtaylor Oct 30, 2024
c7ecc55
Update workflow triggers
nedtaylor Oct 30, 2024
71617a1
Change doc to docs
nedtaylor Oct 31, 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
155 changes: 155 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
name: run-cmake-build

on:
pull_request:
branches:
- main
- development
types:
- opened
- synchronize
paths:
- ".github/workflows/cmake.yml"
- "CMakeLists.txt"
- "**.f90"
- "**.F90"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: cmake
cancel-in-progress: false

jobs:
build-and-test-cmake-debug:
environment:
name: github-pages
name: Build and test in debug mode
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
toolchain:
- {compiler: gcc, version: 13}
# - {compiler: intel, version: '2024.1'}
# - {compiler: intel-classic, version: '2021.10'}
# exclude:
# - os: macos-latest
# toolchain: {compiler: intel, version: '2024.1'}
# - os: macos-latest
# toolchain: {compiler: intel-classic, version: '2021.10'}
steps:
- name: checkout repo
uses: actions/checkout@v4

- name: actions-setup-python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: actions-setup-cmake
uses: jwlawson/actions-setup-cmake@v2.0.1
with:
cmake-version: '3.24.x'

- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}

- name: Install gcovr
run: |
pip --version
pip install gcovr

- name: Install python dependencies
run: |
python --version
python -m pip install pip-tools
python -m piptools compile -o requirements.txt pyproject.toml --all-build-deps
python -m pip install -r requirements.txt

- name: Compile
run: |
cmake --version
python --version
${{ env.FC }} --version
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_Fortran_COMPILER=${{ env.FC }} -DPython_EXECUTABLE=$(which python) -DPython_INCLUDE_DIRS=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") ..
make
make install

- name: Test
run: |
${{ env.FC }} --version
ctest

build-and-test-cmake-release:
environment:
name: github-pages
name: Build and test in release mode
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
toolchain:
- {compiler: gcc, version: 13}
# - {compiler: intel, version: '2024.1'}
# - {compiler: intel-classic, version: '2021.10'}
# exclude:
# - os: macos-latest
# toolchain: {compiler: intel, version: '2024.1'}
# - os: macos-latest
# toolchain: {compiler: intel-classic, version: '2021.10'}
steps:
- name: checkout repo
uses: actions/checkout@v4

- name: actions-setup-python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: actions-setup-cmake
uses: jwlawson/actions-setup-cmake@v2.0.1
with:
cmake-version: '3.24.x'

- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}

- name: Install python dependencies
run: |
python --version
python -m pip install pip-tools
python -m piptools compile -o requirements.txt pyproject.toml --all-build-deps
python -m pip install -r requirements.txt

- name: Compile
run: |
cmake --version
python --version
${{ env.FC }} --version
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_Fortran_COMPILER=${{ env.FC }} -DPython_EXECUTABLE=$(which python) -DPython_INCLUDE_DIRS=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") ..
make
make install

- name: Test
run: |
${{ env.FC }} --version
ctest


13 changes: 10 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@ name: run-code-coverage

on:
push:
branches: ["main"]
branches:
- "main"
paths:
- ".github/workflows/coverage.yml"
- "CMakeLists.txt"
- "**.f90"
- "**.F90"
- "**.cmake"
pull_request:
branches: ["main"]
branches:
- "main"
types:
- opened
- synchronize
paths:
- ".github/workflows/coverage.yml"
- "CMakeLists.txt"
- "**.f90"
- "**.F90"
- "**.cmake"
workflow_dispatch:

Expand Down Expand Up @@ -64,7 +71,7 @@ jobs:
cmake --version
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_PYTHON=Off -DBUILD_EXECUTABLE=Off ..
cmake -DCMAKE_BUILD_TYPE=Coverage -DBUILD_PYTHON=Off -DBUILD_EXECUTABLE=Off ..
make

- name: Run coverage tests
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: format-checker

on:
push:
branches:
- main
paths:
- ".github/workflows/formatting.yml"
- "**.f90"
- "**.F90"
pull_request:
branches:
- main
- development
types:
- opened
- synchronize
paths:
- ".github/workflows/formatting.yml"
- "**.f90"
- "**.F90"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: formatting
cancel-in-progress: false

jobs:
format-checker:
runs-on: ubuntu-latest

steps:
- name: checkout repo
uses: actions/checkout@v4

- name: actions-setup-python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Run format checker
id: run_format_checker
run: |
python tools/check_indentation.py
continue-on-error: true

- name: Comment on PR if script failed
if: github.event_name == 'pull_request' && steps.run_format_checker.outcome != 'success'
run: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '⚠️ The format checker failed.
Please check the formatting of your code by running tools/check_indentation.py locally.'
})

113 changes: 113 additions & 0 deletions .github/workflows/fpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: run-fpm-build

on:
pull_request:
branches:
- main
- development
types:
- opened
- synchronize
paths:
- ".github/workflows/fpm.yml"
- "fpm.toml"
- "**.f90"
- "**.F90"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: fpm
cancel-in-progress: false

jobs:
build-and-test-fpm-debug:
environment:
name: github-pages
name: Build and test in debug mode
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
toolchain:
- {compiler: gcc, version: 13}
# - {compiler: intel, version: '2024.1'}
# - {compiler: intel-classic, version: '2021.10'}
# exclude:
# - os: macos-latest
# toolchain: {compiler: intel, version: '2024.1'}
# - os: macos-latest
# toolchain: {compiler: intel-classic, version: '2021.10'}
steps:
- name: checkout repo
uses: actions/checkout@v4

- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}

- uses: fortran-lang/setup-fpm@v5
id: setup-fpm
with:
fpm-version: "v0.10.0"

- name: Compile
run: |
${{ env.FC }} --version
fpm build --profile debug --compiler ${{ env.FC }}

- name: Test
run: |
${{ env.FC }} --version
fpm test --profile debug --compiler ${{ env.FC }}

build-and-test-fpm-release:
name: Build and test in release mode
environment:
name: github-pages
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
toolchain:
- {compiler: gcc, version: 13}
# - {compiler: intel, version: '2024.1'}
# - {compiler: intel-classic, version: '2021.10'}
# exclude:
# - os: macos-latest
# toolchain: {compiler: intel, version: '2024.1'}
# - os: macos-latest
# toolchain: {compiler: intel-classic, version: '2021.10'}

steps:
- name: checkout repo
uses: actions/checkout@v4

- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}

- uses: fortran-lang/setup-fpm@v5
id: setup-fpm
with:
fpm-version: "v0.10.0"

- name: Compile
run: |
${{ env.FC }} --version
fpm build --profile release --compiler ${{ env.FC }}

- name: Test
run: |
${{ env.FC }} --version
fpm test --profile release --compiler ${{ env.FC }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ src/*.egg-info
*.egg-info
iteration*
doc/html
docs/html
settings.json
example/example_files/database*
**/POSCAR*
Expand Down
Loading