Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/2.8.1 #54

Merged
merged 58 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
3914c58
adding 0-padding for microseconds of timestamp in logging.h
stephen-dixon Sep 11, 2024
f5b818b
fixing initial fatclient errors trying to get help::help working thro…
stephen-dixon Oct 30, 2024
5730aef
Update github actions workflow versions and pypa/cibuildwheel
adam-parker1 Nov 20, 2024
12afedb
Add macos-15 to the build-platforms
adam-parker1 Nov 20, 2024
66220ce
Adding chunk downloading to BYTES plugin.
jholloc Dec 9, 2024
b5b35db
Not closing file in readBytesNonOptimally.cpp
jholloc Dec 9, 2024
ecf2f20
Bumping protocol version to 10 - CAPNP data is now transferred as raw…
jholloc Dec 10, 2024
f5399bd
Undoing change to client protocol version for now.
jholloc Dec 10, 2024
ace4f64
Fixing bug and reverting back to protocol 10 in client.
jholloc Dec 10, 2024
3939176
fixing issues with using UDA_TYPE_OPAQUE for returning binary data
stephen-dixon Dec 11, 2024
4a18275
Update client_installation.md: add libtirpc-dev dependency for ubuntu…
maarten-ic Dec 13, 2024
e59c0a0
Making sending BYTES plugin using xdr_opaque an option so that it wor…
jholloc Dec 13, 2024
46e236f
Updating pyuda get_file to use opaque option.
jholloc Dec 13, 2024
0acbd55
removing macos15 runner from pyuda wheels CI script
stephen-dixon Dec 16, 2024
84bad21
Merge branch '35-missing-leading-0-in-fractions-of-seconds' into develop
stephen-dixon Dec 16, 2024
5620fc1
Merge branch 'feature/fat-client' into develop
stephen-dixon Dec 16, 2024
5a8a783
trying to fix windows and mac wheel builds
stephen-dixon Dec 16, 2024
c1d4efc
Updating pyuda get_file to download files as 'opaque' type as to down…
jholloc Dec 16, 2024
b5408f5
trying to fix windows and mac wheel builds
stephen-dixon Dec 16, 2024
f497848
trying to fix windows and mac wheel builds
stephen-dixon Dec 16, 2024
ccedce6
trying to fix the macos pyuda wheel CI build
stephen-dixon Dec 16, 2024
5e899cc
trying to fix the macos pyuda wheel CI build
stephen-dixon Dec 16, 2024
b1485a9
trying to fix the macos pyuda wheel CI build
stephen-dixon Dec 16, 2024
336a6c2
trying to fix the macos pyuda wheel CI build
stephen-dixon Dec 16, 2024
9722f45
trying to fix the macos pyuda wheel CI build
stephen-dixon Dec 17, 2024
22b254e
removing python3.13 from macos wheels build due to numpy errors
stephen-dixon Dec 17, 2024
a205aa6
Merge branch 'feature/bytes_plugin' into develop
stephen-dixon Dec 17, 2024
310a5ae
Merge branch 'feature/update-wheel-actions-versions' into develop
stephen-dixon Dec 17, 2024
dbe1873
trying to add python3.13 build for macos pyuda wheels
stephen-dixon Dec 17, 2024
3568e76
removing failing python3.13 build from macos pyuda wheels
stephen-dixon Dec 17, 2024
63cf47f
Merge branch 'feature/bytes_plugin' into release/2.8.1
stephen-dixon Dec 17, 2024
6c29bc6
adding automatic plugin versioning to bytes plugin and moving CI to u…
stephen-dixon Dec 18, 2024
fa766b3
adding missing includes from updated bytes plugin
stephen-dixon Dec 18, 2024
7aab323
adding missing includes from updated bytes plugin
stephen-dixon Dec 18, 2024
253b09a
fixing minor typo in bytes plugin
stephen-dixon Dec 18, 2024
51d0c12
removing some c-style casts in bytes plugin
stephen-dixon Dec 18, 2024
788993b
adding more documentation on running a server
stephen-dixon Dec 20, 2024
67c56ae
adding template functions for setReturnScalar plugin help functions a…
stephen-dixon Dec 24, 2024
e6b2406
adding plugin helper function to bit-encode a semantic version string…
stephen-dixon Dec 24, 2024
8df84fe
changing all plugin::version functions to return the server build sem…
stephen-dixon Dec 24, 2024
195188a
adding development notes to documentation
stephen-dixon Jan 7, 2025
7b4db93
Adding Adam's launchd work for MacOS
stephen-dixon Jan 7, 2025
871e004
adding launchd to docs
stephen-dixon Jan 8, 2025
44b4266
fixing typo
stephen-dixon Jan 8, 2025
baf9199
updating docs
stephen-dixon Jan 19, 2025
39ef3a4
updates to pyuda from testing updating bytes plugin and fixing typo i…
stephen-dixon Jan 21, 2025
ccbe06f
fixing compilation errors
stephen-dixon Jan 21, 2025
4e4c918
trying to debug CI errors
stephen-dixon Jan 21, 2025
e958b21
fixing build when CMAKE_PORJECT_VERSION_TWEAK is not set
stephen-dixon Jan 21, 2025
a7b4549
Fix typo in development.md
olivhoenen Jan 21, 2025
b326f4b
removing f-strings from pyuda to maintain python 3.5 compatibility
stephen-dixon Jan 21, 2025
e584d9d
Fix typos and cleanup a few sections
adam-parker1 Jan 21, 2025
7f16084
Merge branch 'release/2.8.1' of github.com:ukaea/UDA into release/2.8.1
stephen-dixon Jan 21, 2025
3f5aea5
changing idl wrapper getstructs routine to use builtin idl_validname …
stephen-dixon Jan 21, 2025
ecacdef
adding contributing.md
stephen-dixon Jan 21, 2025
f43855a
Bugfix/fix python313 macos issues (#56)
adam-parker1 Jan 22, 2025
b8f4363
fixing pyuda build on freia (centOS 7) which requires FMT_ROOT/lib64 …
stephen-dixon Jan 22, 2025
006aa15
updating readme.md
stephen-dixon Jan 22, 2025
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
36 changes: 21 additions & 15 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ jobs:
# which are only executed on push to tag.
# Test wheels are also generated for the other platforms (and uploaded to testpypi)
# on pushes to release branches and to main
- [ubuntu-latest, x86_64, manylinux2014_x86_64]
- [ubuntu-latest, x86_64, manylinux_2_28_x86_64]
- [ubuntu-latest, aarch64, manylinux_2_28_aarch64]
- [macos-13, x86_64, macosx_x86_64]
- [macos-14, arm64, macosx_arm64]
- [windows-latest, AMD64, win_amd64]
- [ubuntu-latest, x86_64, manylinux2014_x86_64, 0.0]
- [ubuntu-latest, x86_64, manylinux_2_28_x86_64, 0.0]
- [ubuntu-latest, aarch64, manylinux_2_28_aarch64, 0.0]
- [macos-13, x86_64, macosx_x86_64, 13.0]
- [macos-14, arm64, macosx_arm64, 14.0]
- [windows-latest, AMD64, win_amd64, 0.0]

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

- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
Expand Down Expand Up @@ -107,15 +107,15 @@ jobs:

- name: build windows wheels
if: runner.OS == 'Windows'
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.22.0
with:
package-dir: ${{github.workspace}}/install/python_installer
config-file: ${{github.workspace}}/install/python_installer/pyproject.toml
env:
CIBW_ARCHS: ${{matrix.build-platform[1]}}
CIBW_PLATFORM: windows
CIBW_BUILD: cp3*-${{matrix.build-platform[2]}}
CIBW_SKIP: cp36* cp37*
CIBW_SKIP: cp36* cp37* cp313*
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel} --add-path ${{github.workspace}}/install/lib"
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel"

Expand All @@ -125,7 +125,7 @@ jobs:
startswith(matrix.build-platform[2], 'manylinux2014') &&
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/')
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.22.0
with:
package-dir: ./source/wrappers/python
config-file: ./source/wrappers/python/pyproject.toml
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
startswith(matrix.build-platform[2], 'manylinux_2_28') &&
! ( startswith(matrix.build-platform[1], 'aarch64') &&
!startsWith(github.ref, 'refs/tags/') )
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.22.0
with:
package-dir: ./source/wrappers/python
config-file: ./source/wrappers/python/pyproject.toml
Expand All @@ -189,7 +189,7 @@ jobs:
CIBW_BEFORE_ALL: >
dnf update -y &&
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm &&
dnf install -y boost-devel openssl-devel libxml2-devel libtirpc-devel
dnf install -y boost1.78-devel openssl-devel libxml2-devel libtirpc-devel
fmt fmt-devel spdlog spdlog-devel capnproto capnproto-devel &&
cd /project &&
cmake -B build
Expand All @@ -203,6 +203,10 @@ jobs:

- name: build uda on macos
if: runner.os == 'macOS'
# note: it's recommended in cibuildwheel to build all deps from source in macos
# instead of using homebrew as this way the wheel will be back-compatible with
# other macos versions. MACOSX_DEPLOYMENT_TARGET will no longer be required if
# this change is made.
run: >
brew update-reset && brew install
git
Expand All @@ -222,18 +226,20 @@ jobs:
-DCMAKE_INSTALL_PREFIX=$PWD/install
-DCLIENT_ONLY=ON &&
cmake --build build -j --config Release --target install &&
cp -r $PWD/install/python_installer/* ${{github.workspace}}/source/wrappers/python/
cp -r $PWD/install/python_installer/* ${{github.workspace}}/source/wrappers/python/

- name: Build macos wheels
if: runner.os == 'macOS'
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.22.0
with:
package-dir: ./source/wrappers/python
config-file: ./source/wrappers/python/pyproject.toml
env:
CIBW_ARCHS: ${{matrix.build-platform[1]}}
CIBW_PLATFORM: macos
CIBW_SKIP: cp313*
CIBW_BUILD: cp*-${{matrix.build-platform[2]}}
MACOSX_DEPLOYMENT_TARGET: ${{matrix.build-platform[3]}}

- uses: actions/upload-artifact@v4
with:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-22.04, windows-latest, macos-latest]
release: [Release]
ssl: [ON, OFF]
client-only: [ON, OFF]
capnp: [ON, OFF]
exclude:
- os: windows-latest
client-only: OFF
- os: ubuntu-latest
- os: ubuntu-22.04
client-only: ON
- os: macos-latest
client-only: ON
Expand All @@ -47,7 +47,7 @@ jobs:
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');

- name: Install linux dependencies
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: >
sudo apt update && sudo apt install -y
git
Expand All @@ -67,7 +67,7 @@ jobs:
python3-venv

- name: Install Intel compiler
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: >
sudo apt install -y wget &&
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB &&
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
spdlog

- name: Configure CMake (linux)
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: >
cmake -G Ninja -B build
-DBUILD_SHARED_LIBS=ON
Expand All @@ -125,7 +125,7 @@ jobs:
-DENABLE_CAPNP=${{ matrix.capnp }}

- name: Configure CMake (linux Intel)
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: >
source /opt/intel/oneapi/setvars.sh &&
CXX=icpx CC=icx cmake -G Ninja -B build-intel
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
run: cmake --build build --config ${{ matrix.release }}

- name: Build Intel
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: cmake --build build-intel --config ${{ matrix.release }}

- name: Install
Expand All @@ -188,7 +188,7 @@ jobs:
run: cmake --install build --config ${{ matrix.release }}

- name: Install pyuda
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: >
cp -r /usr/local/python_installer ${{github.workspace}}/python_installer &&
python3 -m venv ${{github.workspace}}/venv &&
Expand All @@ -198,13 +198,13 @@ jobs:
pip3 install ${{github.workspace}}/python_installer

- name: Test pyuda import
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: >
source ${{github.workspace}}/venv/bin/activate &&
python3 -c 'import pyuda; client=pyuda.Client()'

- name: Run non-SSL system tests
if: matrix.os == 'ubuntu-latest' && matrix.ssl == 'OFF'
if: matrix.os == 'ubuntu-22.04' && matrix.ssl == 'OFF'
run: >
sudo cp /usr/local/etc/uda.socket /usr/local/etc/[email protected] /etc/systemd/system &&
sudo systemctl start uda.socket &&
Expand All @@ -216,7 +216,7 @@ jobs:
./build/test/plugins/plugin_test_testplugin

- name: Run SSL system tests
if: matrix.os == 'ubuntu-latest' && matrix.ssl == 'ON'
if: matrix.os == 'ubuntu-22.04' && matrix.ssl == 'ON'
run: >
sudo cp /usr/local/etc/uda.socket /usr/local/etc/[email protected] /etc/systemd/system &&
sudo chown -R $USER:$USER /usr/local/etc &&
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required( VERSION 3.0 )
cmake_minimum_required( VERSION 3.12 )

########################################################################################################################
# Macro used to convert Windows path to Unix
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ UDA requires the following to packages in order to build:
| libfmt | | |
| spdlog | | |
| capnproto | | |
| tirpc | | |
| boost | | C++, Python & HTTP wrappers |
| LibMemcached | | to enable caching |
| python | \> 3.0 | Python wrapper |
Expand All @@ -64,6 +65,7 @@ Start by installing all system-level dependencies.
```sh
sudo apt update && sudo apt install -y
git
libtirpc-dev
libboost-dev
libboost-program-options-dev
libssl-dev
Expand Down Expand Up @@ -94,4 +96,8 @@ build and install
```sh
cmake --build build -j --config Release --target install
```
## Events and training

Slide packs including some hands-on exercises are available from an UDA workshop delivered at ITER in 2023. These resources provide some additional details and working examples for working with UDA, especially in the context of the ITER Modelling and Analysis Suite (IMAS).

See event details and resources [here](https://indico.iter.org/event/81/).
2 changes: 1 addition & 1 deletion docs/api_changes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: API changes
nav_order: 6
nav_order: 7
---

# API changes
Expand Down
44 changes: 44 additions & 0 deletions docs/authentication.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
layout: default
title: Authentication
nav_order: 6
---

TODO: Notes on configuring authenticated connections

# Authenticated connections in UDA
{:.no_toc}

An UDA server can be configured to only accept requests from authenticated clients. This can be used to ensure only recognised users are able to access the data available through that server.

Currently only X509 certificate-based authentication is implemented. This involves both the server and client having access to their own certificate bundles, including the SSL Certificate Authority (CA) certificate used to sign the server and client certificates.

Certificate revocations can be managed using a certificate revocation list (CRL) on the server.

## Contents
{:.no_toc}
1. TOC
{:toc}

## Configuring an SSL-authenticated server

```sh
export UDA_SERVER_SSL_AUTHENTICATE=1
export UDA_SERVER_SSL_CERT="${UDA_ROOT}/etc/.uda/certs/<server_address>.pem"
export UDA_SERVER_SSL_KEY="${UDA_ROOT}/etc/.uda/keys/<server_address>.key.pem"
export UDA_SERVER_CA_SSL_CERT="${UDA_ROOT}/etc/.uda/certs/uda-ca.cert.pem"
export UDA_SERVER_CA_SSL_CRL="${UDA_ROOT}/etc/.uda/crl/uda-ca.crl.pem"
```

## Configuring an authenticated client connection

```sh
SSL_HOME="<certificate_install_dir>/.uda"

export UDA_CLIENT_SSL_KEY="${SSL_HOME}/keys/<username>.key.pem"
export UDA_CLIENT_CA_SSL_CERT="${SSL_HOME}/certs/uda-ca.cert.pem"
export UDA_CLIENT_SSL_CERT="${SSL_HOME}/certs/<username>.cert.pem"
export UDA_CLIENT_SSL_AUTHENTICATE=1

```

18 changes: 16 additions & 2 deletions docs/client_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ There are a number of client wrappers which provide an UDA interface in differen
often with a more user-friendly, object-oriented layer over the basic C-API.

In general, the underlying UDA client library must be fully built and then any number of additional language wrappers can
be built on-top. With the exception on the python wrapper, building any additional wrappers is completely handled by the
be built on-top. With the exception of the python wrapper, building any additional wrappers is completely handled by the
project CMake configuration. It's worth noting, however, that pre-built Docker images or python wheels may already be
available for your platform.

Expand Down Expand Up @@ -76,6 +76,7 @@ Install dependencies from system package manager.
```sh
sudo apt update && sudo apt install -y \
git \
libtirpc-dev \
libboost-dev \
libboost-program-options-dev \
libssl-dev \
Expand Down Expand Up @@ -342,10 +343,23 @@ cd <uda-install-dir>/python_installer
python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade pip wheel
python3 -m pip install "numpy<2" cython six
python3 -m pip install .

# test
python3 -c 'import pyuda; print(pyuda.__version__)'
```
# Configuring an authenticated client connection

Once you have a certificate bundle, set the following environment variables to the individual SSL file locations. See the [Authentication section](/UDA/authentication) for more details about authenticated connections in uda.

These variables will need to be set before every new client session when you are connecting to an SSL-authenticated uda server.

```sh
SSL_HOME="<certificate_install_dir>/.uda"

export UDA_CLIENT_SSL_KEY="${SSL_HOME}/keys/<username>.key.pem"
export UDA_CLIENT_CA_SSL_CERT="${SSL_HOME}/certs/uda-ca.cert.pem"
export UDA_CLIENT_SSL_CERT="${SSL_HOME}/certs/<username>.cert.pem"
export UDA_CLIENT_SSL_AUTHENTICATE=1

```
Loading
Loading