Skip to content

Commit

Permalink
Merge pull request #57 from DLR-AE/devel
Browse files Browse the repository at this point in the history
Perpare new release
  • Loading branch information
ArneVoss authored Jan 8, 2025
2 parents c886065 + e5f5604 commit 31b3098
Show file tree
Hide file tree
Showing 28 changed files with 569 additions and 405 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
# Add multiple Python versions here to run tests on new(er) versions.
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
# Add multiple Python versions here to run tests on new(er) versions.
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
# Step 1 to make GUIs work, see https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coding-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
# Add the Python versions here to run tests on new(er) versions.
python-version: ["3.11"]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -41,7 +41,7 @@ jobs:
strategy:
matrix:
# Add multiple Python versions here to run tests on new(er) versions.
python-version: ["3.11"]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/housekeeping.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Housekeeping

on:
schedule:
- cron: '45 13 * * *'

jobs:
Stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: >
This issue was automatically marked as stale because it has not seen
recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.
stale-pr-message: >
This pull request was automatically marked as stale because it has not seen
recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.
stale-issue-label: 'no-activity'
stale-pr-label: 'no-activity'
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: python-package-distributions
path: dist/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
# Add multiple Python versions here to run tests on new(er) versions.
python-version: ["3.11"]
python-version: ["3.12"]
# Step 1 to make GUIs work, see https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html
env:
DISPLAY: ':99.0'
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
strategy:
matrix:
# Select Python version to be used for compiling here.
python-version: ["3.11"]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
# Add a dependency to the build job
needs: [Jupyter, Pytest]
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v4.1.7
with:
merge-multiple: true
- name: See what we've got and merge artifacts
Expand Down
67 changes: 6 additions & 61 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ variables:
GIT_STRATEGY: clone

stages:
- build
- test
- deploy

.virtenv: &virtualenv
- source /work/f_jwsb/software/miniconda-3.11/etc/profile.d/conda.sh
- conda activate
- source /work/f_jwsb/software/miniforge3/etc/profile.d/conda.sh
# This is the environment where I installed all dependencies.
- conda activate lk_ci_python3.12
# To make things faster, re-use existing site packages.
- python -m venv virtualenv --system-site-packages
- source virtualenv/bin/activate
Expand All @@ -22,59 +22,7 @@ stages:
# Check location
- pwd

pip-installation:
# This stage only tests if the installation is possible.
# The evironment created herein will be discared and re-created in the test stage.
stage: build
tags:
- lk
script:
- *virtualenv
- pip install -e .
# Check result of installation
- python -c "import loadskernel"
- which loads-kernel
- which model-viewer
- which loads-compare

Jupyter:
stage: build
tags:
- lk
script:
- *virtualenv
# Assemble the tutorials to a jupyter book and build htlm pages
- jupyter-book build ./doc/tutorials
artifacts:
when: always
paths:
- ./doc/tutorials

Flake8:
stage: test
tags:
- lk
script:
- *virtualenv
- pip install flake8
# stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# Lint with flake8
- flake8 . --count --statistics

Pylint:
stage: test
tags:
- lk
script:
- *virtualenv
- pip install pylint
# Install the package itself to make sure that all imports work.
- pip install .[extras]
# Analyse the code with pylint
- pylint $(git ls-files '*.py') --fail-under=7.0

Pytest:
LongTermContinuousIntegration:
stage: test
timeout: 3 hours
coverage: '/^TOTAL.+?(\d+\%)$/'
Expand All @@ -84,7 +32,7 @@ Pytest:
# Set-up the environement
- *virtualenv
# Install with -e (in editable mode) to allow the tracking of the test coverage
- pip install -e .[test]
- pip install -e .[test,extras]
- pip list
# Get the examples repository
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.dlr.de/loads-kernel/loads-kernel-examples.git
Expand Down Expand Up @@ -112,14 +60,11 @@ deploy-pages:
tags:
- lk
dependencies:
- Jupyter
- Pytest
- LongTermContinuousIntegration
script:
- mkdir public
# Publish the coverage htlm results
- mv coverage ./public/coverage
# Publish the htlm tutorials
- mv ./doc/tutorials/_build/html ./public/tutorials
artifacts:
paths:
- public
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Note
New releases are marked in the repository using tags. Simply checkout the master branch for the lastest version or use git checkout if you require a specific release, for example 'git checkout 2022.10'.

# Release 2025.01
- Update of flutter solution sequence including updated description in the User Guide and of the tutorials
- Numpy 2.2 and Python 3.12 compatibility
- More robust continuous integration testing

# Release 2024.06
- Added comprehensive tutorials as well as coresponding aeroelastic models of the DC3 created by Francisco Carvalho

Expand Down
Binary file not shown.
9 changes: 6 additions & 3 deletions doc/jcl_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,13 @@ def __init__(self):
'support': [0, 1, 2, 3, 4, 5],
# True or False, enables flutter check with k, ke or pk method
'flutter': False,
# flutter parameters for k and ke method
# Flutter parameters for k and ke method
'flutter_para': {'method': 'k', 'k_red': np.linspace(2.0, 0.001, 1000)},
# flutter parameters for pk method
# 'flutter_para': {'method': 'pk', 'Vtas': np.linspace(100.0, 500.0, 100)},
# Flutter parameters for pk method
# There are two implementations of the PK method: 'pk_schwochow', 'pk_rodden'
# Available mode tracking algortihms: 'MAC', 'MAC*PCC' (recommended), 'MAC*HDM'
# 'flutter_para': {'method': 'pk', 'Vtas': np.linspace(100.0, 500.0, 100),
# 'tracking': 'MAC*PCC'},
},
]
# End
2 changes: 1 addition & 1 deletion doc/tutorials/DC3_model/JCLs/jcl_dc3_flutter.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,5 @@ def __init__(self):
# True or False, enables flutter check with k, ke or pk method
'flutter': True,
# flutter parameters for pk method
'flutter_para': {'method': 'pk', 'Vtas': np.linspace(20.0, 300.0, 20)}}]
'flutter_para': {'method': 'pk', 'Vtas': np.linspace(20.0, 300.0, 20), 'tracking': 'MAC*PCC'}}]
# End
Loading

0 comments on commit 31b3098

Please sign in to comment.