-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/0.13.0: Version 0.13.0 Remove line markers within line continuations added by fypp for NAG compiler (fixes ecmwf/atlas#193) GitHub ci notifications (#42) Upgrade fypp installation to pep517 Fix copyright header dates and replace message with ecbuild_info Make python virtual environment installation optional Downgrade minimum cmake to 3.17 Disable pip upgrade warnings Restore fckit-eval script processing of fypp Add tests for fckit_yaml_reader VENV: install python virtualenv with ruamel and fypp Increase CMake version to 3.20 to use cmake_path utils YAML reader: create minimal yaml reader class that exports the same API as pyyaml RUAMEL: add contributed ruamel.yaml repo Fix memory leak in fckit_configuration%get_config_list (Thanks Mirco)
- Loading branch information
Showing
61 changed files
with
18,062 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Notify new issue | ||
|
||
on: | ||
issues: | ||
types: | ||
- "opened" | ||
|
||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Notify new issue | ||
uses: ecmwf-actions/notify-teams-issue@v1 | ||
with: | ||
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Notify new PR | ||
|
||
# Needs the worklow to be located in the branche the PR is merged to | ||
on: | ||
pull_request_target: | ||
types: | ||
- "opened" | ||
|
||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Notify new PR | ||
uses: ecmwf-actions/notify-teams-pr@v1 | ||
with: | ||
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
build/* | ||
build | ||
install/* | ||
CMakeLists.txt.user | ||
**/*.egg-info/ | ||
__pycache__ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
0.12.1 | ||
0.13.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# (C) Copyright 2024 ECMWF. | ||
# | ||
# This software is licensed under the terms of the Apache Licence Version 2.0 | ||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
# In applying this licence, ECMWF does not waive the privileges and immunities | ||
# granted to it by virtue of its status as an intergovernmental organisation nor | ||
# does it submit to any jurisdiction. | ||
|
||
macro( fckit_install_venv ) | ||
|
||
# Create a virtualenv | ||
set( VENV_PATH ${CMAKE_CURRENT_BINARY_DIR}/fckit_venv ) | ||
ecbuild_info( "Create Python virtual environment ${VENV_PATH}" ) | ||
execute_process( COMMAND ${Python3_EXECUTABLE} -m venv --copies "${VENV_PATH}" ) | ||
|
||
# Make the virtualenv portable by automatically deducing the VIRTUAL_ENV path from | ||
# the 'activate' script's location in the filesystem | ||
execute_process( | ||
COMMAND | ||
sed -i "s/^VIRTUAL_ENV=\".*\"$/VIRTUAL_ENV=\"$(cd \"$(dirname \"$(dirname \"\${BASH_SOURCE[0]}\" )\")\" \\&\\& pwd)\"/" "${VENV_PATH}/bin/activate" | ||
) | ||
|
||
# Change the context of the search to only find the venv | ||
set( Python3_FIND_VIRTUALENV ONLY ) | ||
set( Python3_EXECUTABLE_CACHE ${Python3_EXECUTABLE} ) | ||
|
||
# Unset Python3_EXECUTABLE because it is also an input variable | ||
# (see documentation, Artifacts Specification section) | ||
unset( Python3_EXECUTABLE ) | ||
# To allow cmake to discover the newly created venv if Python3_ROOT_DIR | ||
# was passed as an argument at build-time | ||
set( Python3_ROOT_DIR "${VENV_PATH}" ) | ||
|
||
# Find newly created python venv | ||
find_package( Python3 COMPONENTS Interpreter REQUIRED ) | ||
|
||
set( _pkg_name "fckit_yaml_reader") | ||
if( HAVE_TESTS ) | ||
set( _pkg_name "fckit_yaml_reader/[tests]") | ||
endif() | ||
|
||
ecbuild_info( "Install fckit_yaml_reader in virtual environment ${VENV_PATH}" ) | ||
execute_process( COMMAND ${Python3_EXECUTABLE} -m pip install --disable-pip-version-check ${CMAKE_CURRENT_SOURCE_DIR}/src/fckit/${_pkg_name} OUTPUT_QUIET ) | ||
|
||
# install ruamel | ||
ecbuild_info( "Install ruamel.yaml in virtual environment ${VENV_PATH}" ) | ||
execute_process( COMMAND ${Python3_EXECUTABLE} -m pip install --disable-pip-version-check ${CMAKE_CURRENT_SOURCE_DIR}/contrib/ruamel.yaml-0.18.6 OUTPUT_QUIET ) | ||
|
||
# install fypp | ||
ecbuild_info( "Install fypp in virtual environment ${VENV_PATH}" ) | ||
execute_process( COMMAND ${Python3_EXECUTABLE} -m pip install --use-pep517 --disable-pip-version-check | ||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/fypp-3.2-b8dd58b-20230822 OUTPUT_QUIET ) | ||
|
||
if( ECBUILD_INSTALL_LIBRARY_HEADERS ) | ||
install( DIRECTORY ${VENV_PATH} DESTINATION . PATTERN "bin/*" PERMISSIONS ${install_permissions} ) | ||
endif() | ||
|
||
# add python interpreter of venv as executable target | ||
set( FCKIT_VENV_EXE ${Python3_EXECUTABLE} ) | ||
|
||
# compute relative path to venv to aid with installation | ||
string(REPLACE "${CMAKE_CURRENT_BINARY_DIR}/" "" rel_venv_exe_path ${FCKIT_VENV_EXE}) | ||
|
||
set( FYPP ${CMAKE_CURRENT_SOURCE_DIR}/tools/fckit-eval.sh ${FCKIT_VENV_EXE} -m fypp ) | ||
|
||
# reset Python3_EXECUTABLE to the system install | ||
set( Python3_EXECUTABLE ${Python3_EXECUTABLE_CACHE} ) | ||
|
||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.