Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
conda activate my_env
# Run the actual testing of the code with pytest
# Using python -m pytest is necessary because pytest has the habit of not looking in the site-packages of the venv
python -m pytest -v --basetemp=./tmp -k 'test_unittests or test_gui or test_integration_public' --cov=loadskernel --cov=modelviewer --cov=loadscompare --junitxml=testresult.xml
python -m pytest -v --basetemp=./tmp -k 'test_unittests or test_gui or test_integration_public' --cov=loadskernel --cov=modelviewer --cov=loadscompare --cov=responseviewer --junitxml=testresult.xml
# Create some reports
coverage report
coverage xml -o coverage.xml
Expand Down
61 changes: 39 additions & 22 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,44 @@
variables:
GIT_STRATEGY: clone
DISPLAY: ':99.0'
# Allow OpenMPI to run as root (only ok inside the VM)
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
# Use single threading
MKL_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1
OMP_NUM_THREADS: 1

stages:
- test
- deploy

.virtenv: &virtualenv
- source /work/f_jwsb/software/miniforge3/etc/profile.d/conda.sh
# This is the environment where I installed all dependencies.
- conda activate lk_ci
# To make things faster, re-use existing site packages.
- python -m venv virtualenv --system-site-packages
- source virtualenv/bin/activate
# Python's venv comes with an older version of pip, so update it.
- pip install --upgrade pip
# Check python version
- which python
- which pytest
# Check MPI
.conda-and-pip-installation: &conda-and-pip-installation
# Like in the GitHub workflows, we use conda to install most dependencies,
# then install the rest using pip.
# Location of conda within the docker-image condaforge/miniforge3:latest
- source /opt/conda/etc/profile.d/conda.sh
- conda create -n my_env python=3.13
- conda activate my_env
- conda install -y -q -c conda-forge --file ./tests/list_of_packages.txt || true
# Install with -e (in editable mode) to allow the tracking of the test coverage
- pip install -e .[extras,test]
# Check result of installation
- pip list
- which loads-kernel
- which model-viewer
- which loads-compare
- which mpiexec
# Check location
- pwd

.setup-os: &setup-os
# Install Xvfb and git-lfs
- apt-get update && apt-get install -y xvfb git-lfs
# Start Xvfb (X Virtual Framebuffer) for headless GUI testing
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
# Initialize git-lfs
- git lfs install
# Tell git to use the proxy
- git config --global http.proxy $http_proxy

LongTermContinuousIntegration:
stage: test
Expand All @@ -29,18 +47,17 @@ LongTermContinuousIntegration:
tags:
- lk
script:
# Set-up the environement
- *virtualenv
# Install with -e (in editable mode) to allow the tracking of the test coverage
- pip install -e .[test,extras]
- pip list
# Set up the operating system
- *setup-os
# Set-up the conda environement
- *conda-and-pip-installation
# Get the internal examples repository
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.dlr.de/loads-kernel/loads-kernel-examples.git
# Get the internal reference results repository
- git clone --depth=1 --filter=blob:none https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.dlr.de/loads-kernel/loads-kernel-reference-results.git
# Run the actual testing of the code with pytest
# Using python -m pytest is necessary because pytest has the habit of not looking in the site-packages of the venv
- python -m pytest -v --cov=loadskernel --cov=modelviewer --cov=loadscompare --junitxml=testresult.xml
- python -m pytest -v --cov=loadskernel --cov=modelviewer --cov=loadscompare --cov=responseviewer --junitxml=testresult.xml
# Create some reports
- coverage report
- coverage xml -o coverage.xml
Expand All @@ -65,7 +82,7 @@ deploy-pages:
- LongTermContinuousIntegration
script:
- mkdir public
# Publish the coverage htlm results
# Publish the coverage html results
- mv coverage ./public/coverage
# Specifies that this is a Pages job
pages: true
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
]},
include_package_data=True,
package_data={'loadskernel': ['graphics/*.*'],
'loadscompare': ['graphics/*.*'], },
'loadscompare': ['graphics/*.*'],
'responseviewer': ['graphics/*.*'], },
# Remember to update the requirements also in the conda feedstock (./recipe/meta.yml) when changing them here!
python_requires='>=3.12',
install_requires=['PanelAero',
Expand All @@ -43,8 +44,6 @@
'h5py',
'tables',
'pyyaml',
# Pandas 3.0.0 comes with changes that are not yet supported,
# see https://github.com/DLR-AE/LoadsKernel/issues/86
'pandas'
],
extras_require={'extras': ['mpi4py',
Expand Down
Loading