Skip to content

Commit 992c61d

Browse files
authored
Merge pull request #228 from BASE-Laboratory/claude/fix-gpu-wheels-build-yptxM
Claude/fix gpu wheels build yptx m
2 parents af25f38 + 69479dc commit 992c61d

23 files changed

Lines changed: 1120 additions & 8 deletions

.github/release-drafter.yml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Configuration for Release Drafter
2+
# https://github.com/release-drafter/release-drafter
3+
#
4+
# Automatically drafts GitHub release notes from merged PRs.
5+
# PRs are categorized by their labels into changelog sections.
6+
7+
name-template: 'v$RESOLVED_VERSION'
8+
tag-template: 'v$RESOLVED_VERSION'
9+
10+
# Determine the next version bump from PR labels
11+
version-resolver:
12+
major:
13+
labels:
14+
- 'breaking'
15+
minor:
16+
labels:
17+
- 'enhancement'
18+
- 'feature'
19+
- 'physics'
20+
patch:
21+
labels:
22+
- 'bug'
23+
- 'fix'
24+
- 'performance'
25+
- 'documentation'
26+
- 'devops'
27+
- 'dependencies'
28+
default: patch
29+
30+
# Map PR labels to changelog sections
31+
categories:
32+
- title: '🔬 Physics & Solvers'
33+
labels:
34+
- 'physics'
35+
- 'solver'
36+
- title: '🚀 New Features'
37+
labels:
38+
- 'feature'
39+
- 'enhancement'
40+
- title: '⚡ Performance'
41+
labels:
42+
- 'performance'
43+
- 'gpu'
44+
- title: '🐛 Bug Fixes'
45+
labels:
46+
- 'bug'
47+
- 'fix'
48+
- title: '📖 Documentation'
49+
labels:
50+
- 'documentation'
51+
- title: '🔧 DevOps & CI'
52+
labels:
53+
- 'devops'
54+
- 'ci'
55+
- title: '📦 Dependencies'
56+
labels:
57+
- 'dependencies'
58+
- title: '⚠️ Breaking Changes'
59+
labels:
60+
- 'breaking'
61+
- title: '🧹 Maintenance'
62+
labels:
63+
- 'maintenance'
64+
- 'refactor'
65+
66+
# Exclude PRs with these labels from release notes
67+
exclude-labels:
68+
- 'skip-changelog'
69+
70+
# Template for the release body
71+
template: |
72+
## What's Changed
73+
74+
$CHANGES
75+
76+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
77+
78+
# Auto-label PRs based on file paths
79+
autolabeler:
80+
- label: 'physics'
81+
files:
82+
- 'src/props/**'
83+
title:
84+
- '/tortuosity/i'
85+
- '/diffusiv/i'
86+
- '/solver/i'
87+
- '/HYPRE/i'
88+
- '/MLMG/i'
89+
- label: 'io'
90+
files:
91+
- 'src/io/**'
92+
title:
93+
- '/reader/i'
94+
- '/TIFF/i'
95+
- '/HDF5/i'
96+
- label: 'documentation'
97+
files:
98+
- 'docs/**'
99+
- '*.md'
100+
- 'Doxyfile'
101+
title:
102+
- '/docs/i'
103+
- '/documentation/i'
104+
- label: 'devops'
105+
files:
106+
- '.github/**'
107+
- 'containers/**'
108+
- 'pyproject.toml'
109+
- 'CMakeLists.txt'
110+
title:
111+
- '/CI/i'
112+
- '/workflow/i'
113+
- '/wheel/i'
114+
- '/PyPI/i'
115+
- label: 'gpu'
116+
files:
117+
- 'src/props/*GPU*'
118+
- 'src/props/*CUDA*'
119+
title:
120+
- '/CUDA/i'
121+
- '/GPU/i'
122+
- '/NVCC/i'
123+
- label: 'python'
124+
files:
125+
- 'python/**'
126+
title:
127+
- '/python/i'
128+
- '/pybind/i'
129+
- '/binding/i'
130+
- label: 'tests'
131+
files:
132+
- 'tests/**'
133+
- 'python/tests/**'

.github/workflows/docs.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# .github/workflows/docs.yml
2-
name: Deploy Doxygen Documentation
2+
name: Deploy Documentation
33

44
on:
55
push:
66
branches: [master]
77
paths:
88
- 'src/**'
9+
- 'python/**'
910
- 'Doxyfile'
1011
- 'docs/**'
1112
- '.github/workflows/docs.yml'
@@ -24,7 +25,7 @@ concurrency:
2425

2526
jobs:
2627
build-docs:
27-
name: Build Doxygen Documentation
28+
name: Build Documentation
2829
runs-on: ubuntu-latest
2930
steps:
3031
- name: Checkout repository
@@ -35,15 +36,28 @@ jobs:
3536
sudo apt-get update
3637
sudo apt-get install -y doxygen graphviz
3738
echo "Doxygen version: $(doxygen --version)"
38-
echo "Dot version: $(dot -V 2>&1)"
3939
40-
- name: Generate documentation
40+
- name: Set up Python
41+
uses: actions/setup-python@v5
42+
with:
43+
python-version: "3.11"
44+
45+
- name: Install Sphinx and dependencies
46+
run: pip install -r docs/requirements.txt
47+
48+
- name: Generate Doxygen XML and HTML
4149
run: doxygen Doxyfile
4250

51+
- name: Build Sphinx documentation
52+
run: sphinx-build -b html docs/ docs/_build/html
53+
54+
- name: Copy Doxygen HTML into Sphinx output
55+
run: cp -r docs/doxygen/html docs/_build/html/doxygen
56+
4357
- name: Upload Pages artifact
4458
uses: actions/upload-pages-artifact@v3
4559
with:
46-
path: docs/doxygen/html
60+
path: docs/_build/html
4761

4862
deploy:
4963
name: Deploy to GitHub Pages

.github/workflows/pypi-wheels-cpu.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
uses: actions/checkout@v4
1717
with:
1818
submodules: recursive # Fetches Catch2, nlohmann/json, or pybind11 if needed
19+
fetch-depth: 0
1920

2021
- name: Set up Python
2122
uses: actions/setup-python@v5

.github/workflows/pypi-wheels-gpu.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
uses: actions/checkout@v4
1717
with:
1818
submodules: recursive
19+
fetch-depth: 0
1920

2021
- name: Set up Python
2122
uses: actions/setup-python@v5
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# .github/workflows/release-drafter.yml
2+
name: Release Drafter
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request_target:
9+
types: [opened, reopened, synchronize]
10+
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
15+
jobs:
16+
update-release-draft:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: release-drafter/release-drafter@v6
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
steps:
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
1820

1921
- name: Set up Apptainer
2022
uses: eWaterCycle/setup-apptainer@v2
@@ -121,10 +123,14 @@ jobs:
121123
sudo apptainer build "$SIF_FILENAME" Singularity.final.def
122124
echo "SIF_FILENAME=$SIF_FILENAME" >> $GITHUB_ENV
123125
124-
- name: Create GitHub Release and Upload SIF
126+
- name: Upload SIF to GitHub Release
125127
uses: softprops/action-gh-release@v2
126128
with:
127129
files: ${{ env.SIF_FILENAME }}
130+
# Release notes are pre-populated by Release Drafter.
131+
# Only fall back to auto-generated notes if the body is empty
132+
# (e.g. tag was pushed without a prior draft).
128133
generate_release_notes: true
134+
append_body: true
129135
env:
130136
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CMakeLists.txt

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,37 @@
1515

1616
cmake_minimum_required(VERSION 3.18)
1717

18+
# ---------------------------------------------------------------------------
19+
# Derive project version from the latest Git tag (e.g. v4.0.1 → 4.0.1).
20+
# Falls back to 0.0.0 when building outside a Git repository or when no
21+
# tag is reachable (e.g. shallow clone without --tags).
22+
# ---------------------------------------------------------------------------
23+
set(OPENIMPALA_FALLBACK_VERSION "4.0.1")
24+
25+
find_package(Git QUIET)
26+
if(GIT_FOUND)
27+
execute_process(
28+
COMMAND "${GIT_EXECUTABLE}" describe --tags --match "v[0-9]*" --abbrev=0
29+
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
30+
OUTPUT_VARIABLE _git_tag
31+
OUTPUT_STRIP_TRAILING_WHITESPACE
32+
ERROR_QUIET
33+
RESULT_VARIABLE _git_result
34+
)
35+
if(_git_result EQUAL 0 AND _git_tag MATCHES "^v([0-9]+\\.[0-9]+\\.[0-9]+)")
36+
set(_detected_version "${CMAKE_MATCH_1}")
37+
endif()
38+
endif()
39+
40+
if(NOT _detected_version)
41+
set(_detected_version "${OPENIMPALA_FALLBACK_VERSION}")
42+
message(STATUS "Git tag not found — using fallback version ${_detected_version}")
43+
else()
44+
message(STATUS "Version from Git tag: ${_detected_version}")
45+
endif()
46+
1847
project(OpenImpala
19-
VERSION 0.1.0
48+
VERSION ${_detected_version}
2049
LANGUAGES C CXX Fortran
2150
DESCRIPTION "Image-based simulation of transport properties in porous media"
2251
)

Doxyfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ FULL_SIDEBAR = NO
6464
GENERATE_LATEX = NO
6565
GENERATE_RTF = NO
6666
GENERATE_MAN = NO
67-
GENERATE_XML = NO
67+
GENERATE_XML = YES
68+
XML_OUTPUT = xml
6869

6970
#---------------------------------------------------------------------------
7071
# Graphs (requires Graphviz dot)

docs/api/cpp.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# C++ API Reference
2+
3+
The C++ API reference is generated from Doxygen comments in the source code
4+
using [Breathe](https://breathe.readthedocs.io/).
5+
6+
## Namespace
7+
8+
All OpenImpala classes live in the `OpenImpala` namespace.
9+
10+
## Key classes
11+
12+
### I/O Readers
13+
14+
```{eval-rst}
15+
.. doxygenclass:: OpenImpala::TiffReader
16+
:members:
17+
:outline:
18+
19+
.. doxygenclass:: OpenImpala::HDF5Reader
20+
:members:
21+
:outline:
22+
23+
.. doxygenclass:: OpenImpala::RawReader
24+
:members:
25+
:outline:
26+
```
27+
28+
### Transport Solvers
29+
30+
```{eval-rst}
31+
.. doxygenclass:: OpenImpala::TortuosityHypre
32+
:members:
33+
:outline:
34+
35+
.. doxygenclass:: OpenImpala::TortuosityMLMG
36+
:members:
37+
:outline:
38+
39+
.. doxygenclass:: OpenImpala::EffectiveDiffusivityHypre
40+
:members:
41+
:outline:
42+
```
43+
44+
### Utilities
45+
46+
```{eval-rst}
47+
.. doxygenclass:: OpenImpala::VolumeFraction
48+
:members:
49+
:outline:
50+
51+
.. doxygenclass:: OpenImpala::PercolationCheck
52+
:members:
53+
:outline:
54+
55+
.. doxygenclass:: OpenImpala::TortuositySolverBase
56+
:members:
57+
:outline:
58+
59+
.. doxygenclass:: OpenImpala::HypreStructSolver
60+
:members:
61+
:outline:
62+
```
63+
64+
### Configuration
65+
66+
```{eval-rst}
67+
.. doxygenstruct:: OpenImpala::PhysicsConfig
68+
:members:
69+
:outline:
70+
```
71+
72+
## Full Doxygen output
73+
74+
For the complete class hierarchy, include dependency graphs, and file-level
75+
documentation, see the [Doxygen pages](../doxygen/html/index.html).

0 commit comments

Comments
 (0)