Skip to content

Commit c9ac254

Browse files
authored
Merge pull request #91 from DataAnalyticsEngineering/FANS-v0.4.3
2 parents ebc11ed + 0dccb3f commit c9ac254

34 files changed

+7551
-23352
lines changed

.github/workflows/build_and_test.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ jobs:
3030
UBUNTU_VERSION: [noble, jammy]
3131
steps:
3232
- name: Checkout code
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v5
3434

3535
- name: Set up pixi
36-
uses: prefix-dev/[email protected]
36+
uses: prefix-dev/[email protected]
37+
with:
38+
environments: dashboard
3739

3840
- name: Generate build directory
3941
run: mkdir -p ${{ env.FANS_BUILD_DIR }}
@@ -82,13 +84,8 @@ jobs:
8284
# ────────────────────────────────────────────────────────────────
8385
# Pytest checks
8486
# ────────────────────────────────────────────────────────────────
85-
- name: Install Pixi Python deps
86-
run: |
87-
pixi --version
88-
pixi install
89-
9087
- name: Run pytest checks on HDF5 output
91-
run: pixi run test
88+
run: pixi run -e dashboard pytest
9289

9390
- uses: actions/upload-artifact@v4
9491
if: failure()

.github/workflows/build_and_test_mac.yaml

Lines changed: 0 additions & 102 deletions
This file was deleted.

.github/workflows/docker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616

1717
- name: Set up QEMU
1818
uses: docker/setup-qemu-action@v3

.github/workflows/pixi_build.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and test pixi-build
2+
# Builds FANS for macOS and Ubuntu and runs the tests.
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
workflow_dispatch:
10+
concurrency:
11+
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
13+
jobs:
14+
build:
15+
name: ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest, macos-latest]
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v5
24+
25+
- name: Set up pixi
26+
uses: prefix-dev/[email protected]
27+
with:
28+
environments: default
29+
30+
- name: Run pytest checks on HDF5 output
31+
run: pixi run test
32+
33+
- name: Upload test logs
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: ${{ matrix.os }} test-logs
37+
path: test/output/*.log
38+
39+
- uses: actions/upload-artifact@v4
40+
if: failure()
41+
with:
42+
name: ${{ matrix.os }} PyTest logs
43+
path: |
44+
**/pytest*.xml
45+
**/.pytest_cache

.github/workflows/run-checks.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Check out repository
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717
- name: Lint markdown files (markdownlint)
1818
uses: articulate/actions-markdownlint@v1
1919
with:
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Check out repository
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929
- name: Check links in markdown files (markdown-link-check)
3030
uses: gaurav-nelson/github-action-markdown-link-check@v1
3131
with:
@@ -37,9 +37,9 @@ jobs:
3737
name: pre-commit checks
3838
runs-on: ubuntu-latest
3939
steps:
40-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@v5
4141
- name: Setup python
42-
uses: actions/setup-python@v5
42+
uses: actions/setup-python@v6
4343
with:
4444
python-version: '3.10'
4545
check-latest: true

.github/workflows/test_pyfans.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323

2424
- name: Checkout repository
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2626

2727
- name: Generate build directory
2828
run: mkdir -p ${{ env.FANS_BUILD_DIR }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,4 @@ test/input_files/**/*.json
210210
# pixi environments
211211
.pixi
212212
*.egg-info
213+
*.conda

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ repos:
2020
hooks:
2121
- id: clang-format
2222
args: ['--style=file']
23-
exclude: "include/json.hpp"
2423
types_or: [c++]

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# FANS Changelog
22

3+
## v0.4.3
4+
5+
- Introduce a Pixi dev environment [#89](https://github.com/DataAnalyticsEngineering/FANS/pull/89)
6+
- Include nlohmann-json via cmake [#87](https://github.com/DataAnalyticsEngineering/FANS/pull/87)
7+
- Relaxed versions in Pixi build workflow [#86](https://github.com/DataAnalyticsEngineering/FANS/pull/86)
8+
- Bump version in MacOS CI [#85](https://github.com/DataAnalyticsEngineering/FANS/pull/85)
9+
- Pixi build workflow for MacOS and Linux [#82](https://github.com/DataAnalyticsEngineering/FANS/pull/82) [#84](https://github.com/DataAnalyticsEngineering/FANS/pull/84)
10+
- Introduce conftest.py for pytest-fixture [#82](https://github.com/DataAnalyticsEngineering/FANS/pull/82)
11+
- Use dashboard environment for regular pytest [#81](https://github.com/DataAnalyticsEngineering/FANS/pull/81)
12+
- Fix bug in J2 plasticity routine [#80](https://github.com/DataAnalyticsEngineering/FANS/pull/80)
13+
314
## v0.4.2
415

516
- Reduce dependencies of dashboard for cf-package https://github.com/DataAnalyticsEngineering/FANS/pull/71

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.21)
55
# ##############################################################################
66

77
project(FANS
8-
VERSION 0.4.2
8+
VERSION 0.4.3
99
LANGUAGES C CXX
1010
)
1111

@@ -98,7 +98,7 @@ if (FANS_LIBRARY_FOR_MICRO_MANAGER)
9898
)
9999
FetchContent_MakeAvailable(pybind11)
100100
endif()
101-
101+
find_package(nlohmann_json REQUIRED)
102102
# ##############################################################################
103103
# TARGETS
104104
# ##############################################################################
@@ -141,7 +141,6 @@ target_include_directories(FANS_FANS PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SO
141141
# FANS.h header that consuming projects can use
142142
set_property(TARGET FANS_FANS PROPERTY PUBLIC_HEADER
143143
include/general.h
144-
include/json.hpp
145144
include/matmodel.h
146145
include/reader.h
147146
include/solverCG.h
@@ -186,7 +185,7 @@ target_link_libraries(FANS_FANS PRIVATE m)
186185
# TODO: when switching to a newer CMake version this can all be done by one
187186
# call to target_link_libraries(FANS_FANS PUBLIC HDF5::HDF5). But CMake 3.16
188187
# does not yet support this.
189-
target_include_directories(FANS_FANS PUBLIC ${HDF5_INCLUDE_DIRS})
188+
target_include_directories(FANS_FANS PRIVATE ${HDF5_INCLUDE_DIRS})
190189
target_link_libraries(FANS_FANS PUBLIC ${HDF5_CXX_LIBRARIES})
191190
target_compile_definitions(FANS_FANS PUBLIC ${HDF5_DEFINITIONS})
192191
if (HDF5_IS_PARALLEL)
@@ -195,12 +194,14 @@ endif ()
195194

196195
target_link_libraries(FANS_FANS PUBLIC MPI::MPI_CXX)
197196

198-
target_include_directories(FANS_FANS PUBLIC ${FFTW3_INCLUDE_DIRS})
197+
target_include_directories(FANS_FANS PRIVATE ${FFTW3_INCLUDE_DIRS})
199198
target_link_libraries(FANS_FANS PUBLIC ${FFTW3_LIBRARIES})
200199
target_compile_definitions(FANS_FANS PUBLIC ${FFTW3_DEFINITIONS})
201200

202201
target_link_libraries(FANS_FANS PUBLIC Eigen3::Eigen)
202+
target_link_libraries(FANS_FANS PUBLIC nlohmann_json::nlohmann_json)
203203

204+
target_include_directories(FANS_main PRIVATE ${HDF5_INCLUDE_DIRS})
204205
target_link_libraries(FANS_main PRIVATE FANS::FANS)
205206

206207
# ##############################################################################

0 commit comments

Comments
 (0)