Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d30d21c
filtering out non-release tags in git2debchangelog.sh
jholloc Apr 29, 2026
54c138f
Bump actions/github-script from 8 to 9
dependabot[bot] May 1, 2026
726e95d
Bump softprops/action-gh-release from 2 to 3
dependabot[bot] May 1, 2026
197b97d
Bump pypa/cibuildwheel from 3.4.0 to 3.4.1
dependabot[bot] May 1, 2026
4ad6be2
fixing issues related to TokaMap schemas version 0.3.2
jholloc May 1, 2026
c02cf41
adding missing changes
jholloc May 1, 2026
860ede6
removing unwanted updated
jholloc May 1, 2026
2669496
removing unwanted xtensor changes
jholloc May 1, 2026
2d5b8d8
fixing syntax tests
jholloc May 1, 2026
8915888
fixing example mappings
jholloc May 1, 2026
0932770
fixing python tests
stephen-dixon May 1, 2026
7dd229d
fixing python tests
stephen-dixon May 1, 2026
145b04b
fixing tests in CI
stephen-dixon May 1, 2026
b417269
fixing tests in CI
stephen-dixon May 1, 2026
141534a
Merge pull request #36 from ukaea/dependabot/github_actions/develop/p…
stephen-dixon May 1, 2026
4ff50ad
Merge pull request #35 from ukaea/dependabot/github_actions/develop/s…
stephen-dixon May 1, 2026
d7b24f4
Merge pull request #34 from ukaea/dependabot/github_actions/develop/a…
stephen-dixon May 1, 2026
9638143
finishing lowercase mapping keys changes and adding failing cache tests
stephen-dixon Jun 10, 2026
83a0167
Merge branch 'develop' of github.com:ukaea/libtokamap into develop
stephen-dixon Jun 10, 2026
a7bf434
Pass runtime attributes to data sources
stephen-dixon Jun 10, 2026
1b2193a
adding rust wrapper
jholloc Jun 18, 2026
e5cb6cb
Bump pypa/cibuildwheel from 3.4.1 to 4.1.0
dependabot[bot] Jul 1, 2026
89810e5
Bump actions/checkout from 6 to 7
dependabot[bot] Jul 1, 2026
f0e5b76
Merge pull request #40 from ukaea/feature/datasource-args
stephen-dixon Jul 16, 2026
2671ab6
Merge pull request #42 from ukaea/dependabot/github_actions/develop/a…
jholloc Jul 16, 2026
2c35e52
Merge pull request #41 from ukaea/dependabot/github_actions/develop/p…
jholloc Jul 16, 2026
5cf6040
Bump pypa/cibuildwheel from 4.1.0 to 4.1.1
dependabot[bot] Aug 1, 2026
b0fbea5
Bump actions/setup-python from 6 to 7
dependabot[bot] Aug 1, 2026
e65e515
skipping cache tests
jholloc Aug 21, 2026
be5d653
Merge pull request #45 from ukaea/dependabot/github_actions/develop/a…
adam-parker1 Aug 21, 2026
ae687d8
Merge pull request #44 from ukaea/dependabot/github_actions/develop/p…
adam-parker1 Aug 21, 2026
b3217d1
initial commit skeleton code for interpolation mapping
adam-parker1 Aug 5, 2026
2bcae31
remove unused MappingType::SLICE (slice is an extension of data_source)
adam-parker1 Aug 5, 2026
acf9df8
First pass 1D ascending linear interpolation (to be extended and gene…
adam-parker1 Aug 6, 2026
1aae6bd
Add some simple tests for interpolation, all passing as of now
adam-parker1 Aug 6, 2026
bb498a7
Generate some function comments and parameters documentation
adam-parker1 Aug 6, 2026
5be01a2
adding explicit cast to float to avoid MSVC error
jholloc Aug 21, 2026
b4c8764
Merge pull request #46 from ukaea/feature/add_interpolate_map_type
jholloc Aug 21, 2026
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- uses: actions/github-script@v8
- uses: actions/github-script@v9
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0
fetch-tags: true
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
path: release_assets

- name: Upload assets to GitHub Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3
with:
files: |
release_assets/**/*.{deb,rpm,tar.gz,zip}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
- [windows-latest, AMD64, win_amd64, 0.0]

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
# need git tags available for setuptools_scm to grab tags
with:
fetch-depth: 0

- uses: actions/github-script@v8
- uses: actions/github-script@v9
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
Expand All @@ -59,7 +59,7 @@ jobs:

- name: Build Windows wheels
if: runner.OS == 'Windows'
uses: pypa/cibuildwheel@v3.4.0
uses: pypa/cibuildwheel@v4.1.1
with:
package-dir: ${{github.workspace}}/python
config-file: ${{github.workspace}}/python/pyproject.toml
Expand All @@ -76,7 +76,7 @@ jobs:
startswith(matrix.build-platform[2], 'manylinux_2_28') &&
! ( startswith(matrix.build-platform[1], 'aarch64') &&
!startsWith(github.ref, 'refs/tags/') )
uses: pypa/cibuildwheel@v3.4.0
uses: pypa/cibuildwheel@v4.1.1
with:
package-dir: ./python
config-file: ./python/pyproject.toml
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:

- name: Build macOS wheels
if: runner.os == 'macOS'
uses: pypa/cibuildwheel@v3.4.0
uses: pypa/cibuildwheel@v4.1.1
with:
package-dir: ./python
config-file: ./python/pyproject.toml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
# need git tags available to get git version
with:
fetch-depth: 0
Expand All @@ -33,7 +33,7 @@ jobs:
echo "commit_name=$GIT_COMMIT_NAME" >> $GITHUB_OUTPUT

- name: Setup Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: 3.x

Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ build/
.zed/
.cache/
python/build/
python/src/clibtokamap*.so
python/src/libtokamap/__pycache__/
python/src/libtokamap/_version.py
python/src/libtokamap.egg-info
python/tests/__pycache__/
python/dist/
python/setup.py
.clangd
Expand Down
46 changes: 25 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ project(
LANGUAGES CXX
)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set( CMAKE_POSITION_INDEPENDENT_CODE ON )

if( "${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}" )
message( SEND_ERROR "In-source builds are not allowed." )
message( SEND_ERROR "In-source builds are not allowed." )
endif()

# find_package( xtensor REQUIRED )

# Set project options
include( StaticAnalyzers )
include( Utils )
Expand All @@ -34,18 +36,18 @@ option( ENABLE_DEBIAN_PACKAGING "Configure install files for debian packaging" O

## Generators
if( UNIX AND NOT APPLE )
set( DEFAULT_CPACK_GENERATORS "DEB;RPM;TGZ" )
set( DEFAULT_CPACK_GENERATORS "DEB;RPM;TGZ" )
elseif( APPLE )
set( DEFAULT_CPACK_GENERATORS "TGZ;ZIP" )
set( DEFAULT_CPACK_GENERATORS "TGZ;ZIP" )
else()
set( DEFAULT_CPACK_GENERATORS "ZIP" )
set( DEFAULT_CPACK_GENERATORS "ZIP" )
endif()
set( ENABLE_CPACK_GENERATORS "${DEFAULT_CPACK_GENERATORS}" CACHE STRING "enable the cpack generators" )

add_clang_format_target()

if( ENABLE_TESTING )
enable_testing()
enable_testing()
endif()

# Specify C++ standard for all targets
Expand All @@ -69,16 +71,17 @@ set( UTIL_SOURCES
src/utils/typed_data_array.cpp
)
if( MSVC )
list( APPEND UTIL_SOURCES src/utils/windows_utils.cpp )
list( APPEND UTIL_SOURCES src/utils/windows_utils.cpp )
else()
list( APPEND UTIL_SOURCES src/utils/unix_utils.cpp )
list( APPEND UTIL_SOURCES src/utils/unix_utils.cpp )
endif()

set( MAP_TYPE_SOURCES
src/map_types/custom_mapping.cpp
src/map_types/data_source_mapping.cpp
src/map_types/dim_mapping.cpp
src/map_types/expr_mapping.cpp
src/map_types/interp_mapping.cpp
src/map_types/value_mapping.cpp
)

Expand Down Expand Up @@ -114,6 +117,7 @@ set( MAP_TYPE_HEADERS
src/map_types/data_source_mapping.hpp
src/map_types/dim_mapping.hpp
src/map_types/expr_mapping.hpp
src/map_types/interp_mapping.hpp
src/map_types/map_arguments.hpp
src/map_types/value_mapping.hpp
)
Expand Down Expand Up @@ -141,7 +145,7 @@ set( EXT_HEADERS
)

if( "${PROJECT_VERSION_TWEAK}" STREQUAL "" )
set( PROJECT_VERSION_TWEAK 0 )
set( PROJECT_VERSION_TWEAK 0 )
endif()

configure_file(
Expand All @@ -165,10 +169,10 @@ configure_file(
add_library( libtokamap ${SOURCES} )

if( MSVC )
target_compile_options( libtokamap PRIVATE /W4 /WX /bigobj /utf-8 )
target_link_libraries( libtokamap PRIVATE Dbghelp )
target_compile_options( libtokamap PRIVATE /W4 /WX /bigobj /utf-8 )
target_link_libraries( libtokamap PRIVATE Dbghelp )
else()
target_compile_options( libtokamap PRIVATE -Wall -Wextra -Wpedantic -Werror )
target_compile_options( libtokamap PRIVATE -Wall -Wextra -Wpedantic -Werror )
endif()

target_include_directories( libtokamap
Expand All @@ -184,7 +188,7 @@ target_include_directories( libtokamap
$<INSTALL_INTERFACE:include/libtokamap>
)
if( ENABLE_PROFILING )
target_compile_definitions( libtokamap PRIVATE LIBTOKAMAP_PROFILE_ENABLED )
target_compile_definitions( libtokamap PRIVATE LIBTOKAMAP_PROFILE_ENABLED )
endif()
target_sources( libtokamap PUBLIC
FILE_SET HEADERS
Expand Down Expand Up @@ -241,35 +245,35 @@ install( FILES

# Install documentation
if( ENABLE_DEBIAN_PACKAGING )
add_custom_command(
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/changelog"
COMMAND ./scripts/git2debchangelog.sh | grep -v -e 'Merge branch' -e 'Merge pull' > ${CMAKE_CURRENT_BINARY_DIR}/changelog
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "Generating changelog"
)

add_custom_command(
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/changelog.gz"
COMMAND gzip -cn9 changelog > changelog.gz
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/changelog"
COMMENT "Compressing changelog"
)

add_custom_target( changelog_gz ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/changelog.gz" )
add_custom_target( changelog_gz ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/changelog.gz" )

install( FILES
install( FILES
"${CMAKE_CURRENT_BINARY_DIR}/changelog.gz"
DESTINATION "${CMAKE_INSTALL_DATADIR}/doc/libtokamap-dev"
)

install( FILES
install( FILES
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE
DESTINATION "${CMAKE_INSTALL_DATADIR}/doc/libtokamap-dev"
RENAME copyright
)
else( ENABLE_DEBIAN_PACKAGING )
install( FILES
install( FILES
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE
${CMAKE_CURRENT_SOURCE_DIR}/README.md
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
Expand All @@ -278,11 +282,11 @@ endif( ENABLE_DEBIAN_PACKAGING )

# Unit testing setup
if( ENABLE_TESTING )
add_subdirectory( test )
add_subdirectory( test )
endif()

if( ENABLE_EXAMPLES )
add_subdirectory( examples/simple_mapper )
add_subdirectory( examples/simple_mapper )
endif()

list( TRANSFORM SOURCES PREPEND ${CMAKE_CURRENT_LIST_DIR}/ )
Expand Down
4 changes: 2 additions & 2 deletions examples/simple_mapper/mappings/example_v1/globals.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"DATA_SOURCE_CONFIG": {
"data_source_config": {
"JSON": {
"ARGS": {
"args": {
"file_name": "data_{{ shot }}.json"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,91 +2,91 @@
"version": "1.0.0",
"coil": {
"map_type": "DIMENSION",
"DIM_PROBE": "_coils"
"dim_probe": "_coils"
},
"_coils": {
"MAP_TYPE": "DATA_SOURCE",
"DATA_SOURCE": "JSON",
"ARGS": {
"map_type": "DATA_SOURCE",
"data_source": "JSON",
"args": {
"signal": "coils"
}
},
"coil[#]/name": {
"MAP_TYPE": "DATA_SOURCE",
"DATA_SOURCE": "JSON",
"ARGS": {
"map_type": "DATA_SOURCE",
"data_source": "JSON",
"args": {
"signal": "coils/{{ #0 }}/name"
}
},
"_coil[#]/radius": {
"MAP_TYPE": "DATA_SOURCE",
"DATA_SOURCE": "JSON",
"ARGS": {
"map_type": "DATA_SOURCE",
"data_source": "JSON",
"args": {
"signal": "coils/{{ #0 }}/radius"
}
},
"coil[#]/area": {
"MAP_TYPE": "EXPR",
"EXPR": "pi * r^2",
"PARAMETERS": {
"map_type": "EXPR",
"expr": "pi * r^2",
"parameters": {
"r": "_coil[#]/radius"
}
},
"coil[#]/position": {
"MAP_TYPE": "DIMENSION",
"DIM_PROBE": "_coil[#]/position"
"map_type": "DIMENSION",
"dim_probe": "_coil[#]/position"
},
"_coil[#]/position": {
"MAP_TYPE": "DATA_SOURCE",
"DATA_SOURCE": "JSON",
"ARGS": {
"map_type": "DATA_SOURCE",
"data_source": "JSON",
"args": {
"signal": "coils/{{ #0 }}/position"
}
},
"coil[#]/position[#]/r": {
"MAP_TYPE": "DATA_SOURCE",
"DATA_SOURCE": "JSON",
"ARGS": {
"map_type": "DATA_SOURCE",
"data_source": "JSON",
"args": {
"signal": "coils/{{ #0 }}/position/{{ #1 }}/0"
}
},
"coil[#]/position[#]/z": {
"MAP_TYPE": "DATA_SOURCE",
"DATA_SOURCE": "JSON",
"ARGS": {
"map_type": "DATA_SOURCE",
"data_source": "JSON",
"args": {
"signal": "coils/{{ #0 }}/position/{{ #1 }}/1"
}
},
"coil[#]/flux/time": {
"MAP_TYPE": "DATA_SOURCE",
"DATA_SOURCE": "JSON",
"ARGS": {
"map_type": "DATA_SOURCE",
"data_source": "JSON",
"args": {
"signal": "coils/{{ #0 }}/flux/time"
}
},
"coil[#]/flux/data": {
"MAP_TYPE": "DATA_SOURCE",
"DATA_SOURCE": "JSON",
"ARGS": {
"map_type": "DATA_SOURCE",
"data_source": "JSON",
"args": {
"signal": "coils/{{ #0 }}/flux/data"
}
},
"coil[#]/flux/data_scaled": {
"MAP_TYPE": "DATA_SOURCE",
"DATA_SOURCE": "JSON",
"ARGS": {
"map_type": "DATA_SOURCE",
"data_source": "JSON",
"args": {
"signal": "coils/{{ #0 }}/flux/data"
},
"SCALE": 2.0
"scale": 2.0
},
"coil[#]/flux/dot_product": {
"MAP_TYPE": "CUSTOM",
"LIBRARY": "custom",
"FUNCTION": "dot_product",
"INPUTS": {
"map_type": "CUSTOM",
"library": "custom",
"function": "dot_product",
"inputs": {
"lhs": "coil[#]/flux/time",
"rhs": "coil[#]/flux/data"
},
"PARAMETERS": {}
"parameters": {}
}
}
Loading
Loading