Skip to content

Commit

Permalink
Merge pull request #11 from KrisThielemans/prd2PETSIRD
Browse files Browse the repository at this point in the history
Changes prd to PETSIRD and update module/CI
  • Loading branch information
KrisThielemans authored Nov 1, 2024
2 parents ad49ea9 + 08afbf0 commit 2003cfb
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ARG USERNAME="vscode"
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ARG CONDA_GID=900
ARG CONDA_ENVIRONMENT_NAME=prd
ARG CONDA_ENVIRONMENT_NAME=petsird

RUN apt-get update && apt-get install -y \
libc6-dbg \
Expand Down Expand Up @@ -83,7 +83,7 @@ ENV CMAKE_GENERATOR=Ninja

# Create a kits file for the VSCode CMake Tools extension, so you are not prompted for which kit to select whenever you open VSCode
RUN mkdir -p /home/vscode/.local/share/CMakeTools \
&& echo '[{"name":"GCC-10","compilers":{"C":"/opt/conda/envs/prd/bin/x86_64-conda_cos6-linux-gnu-gcc","CXX":"/opt/conda/envs/prd/bin/x86_64-conda_cos6-linux-gnu-g++"}}]' > /home/vscode/.local/share/CMakeTools/cmake-tools-kits.json \
&& echo '[{"name":"GCC-10","compilers":{"C":"/opt/conda/envs/petsird/bin/x86_64-conda_cos6-linux-gnu-gcc","CXX":"/opt/conda/envs/petsird/bin/x86_64-conda_cos6-linux-gnu-g++"}}]' > /home/vscode/.local/share/CMakeTools/cmake-tools-kits.json \
&& chown vscode:conda /home/vscode/.local/share/CMakeTools/cmake-tools-kits.json

# Install the yardl tool
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# shellcheck source=/dev/null

source /opt/conda/etc/profile.d/conda.sh
conda activate prd
conda activate petsird
source <(yardl completion bash)

if [[ "${BASH_ENV:-}" == "$(readlink -f "${BASH_SOURCE[0]:-}")" ]]; then
Expand Down
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// For format details, see https://aka.ms/devcontainer.json.
{
"name": "prd",
"name": "petsird",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
Expand Down Expand Up @@ -47,7 +47,7 @@
"cmake.buildDirectory": "${workspaceFolder}/cpp/build",
"cmake.configureOnOpen": false,

"python.defaultInterpreterPath": "/opt/conda/envs/prd/bin/python",
"python.defaultInterpreterPath": "/opt/conda/envs/petsird/bin/python",
"python.analysis.typeCheckingMode": "strict",
"python.analysis.diagnosticMode": "workspace",
"python.analysis.diagnosticSeverityOverrides": {
Expand Down Expand Up @@ -87,7 +87,7 @@
"gitlens.showWhatsNewAfterUpgrades": false
},

"gcovViewer.gcovBinary": "/opt/conda/envs/prd/bin/x86_64-conda-linux-gnu-gcov",
"gcovViewer.gcovBinary": "/opt/conda/envs/petsird/bin/x86_64-conda-linux-gnu-gcov",
"gcovViewer.buildDirectories": ["${workspaceFolder}/cpp/build"],

"search.useIgnoreFiles": false,
Expand Down
16 changes: 0 additions & 16 deletions .github/actions/configure-environment/action.yml

This file was deleted.

22 changes: 12 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with: {submodules: recursive}
- name: strip environment.yml
run: |
cat environment.yml | grep -v "#.*\<\local\>" > temp-ci-environment.yml
- uses: conda-incubator/setup-miniconda@v3
with:
submodules: recursive

- name: Configure environment
uses: ./.github/actions/configure-environment

activate-environment: yardl
environment-file: temp-ci-environment.yml
- name: Install yardl
run: |
rm temp-ci-environment.yml
YARDL_DIR=${{github.workspace}}/yardl
mkdir ${YARDL_DIR}
cd ${YARDL_DIR}
echo "${{github.workspace}}/yardl" >> $GITHUB_PATH
YARDL_VERSION=0.3.2
YARDL_VERSION=0.6.2
wget --quiet "https://github.com/microsoft/yardl/releases/download/v${YARDL_VERSION}/yardl_${YARDL_VERSION}_linux_x86_64.tar.gz"
tar -xzf "yardl_${YARDL_VERSION}_linux_x86_64.tar.gz"
tar -xzf "yardl_${YARDL_VERSION}_linux_x86_64.tar.gz" -C "${YARDL_DIR}"
rm "yardl_${YARDL_VERSION}_linux_x86_64.tar.gz"
echo "${YARDL_DIR}" >> $GITHUB_PATH
- name: Build model
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "PETSIRD"]
path = PETSIRD
url = https://github.com/ETSInitiative/PRDdefinition
url = https://github.com/ETSInitiative/PETSIRD
branch=main
4 changes: 2 additions & 2 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.12.0) # older would work, but could give warnings on policy CMP0074
project(PETSIRDUseCaseTemplate VERSION 0.1.0)
project(PETSIRDUseCaseTemplate VERSION 0.2.0)

set(CMAKE_CXX_STANDARD 17)

Expand All @@ -11,7 +11,7 @@ endif()

# Example lines for a new executable
# add_executable(my_prog my_prog.cpp)
# target_link_libraries(my_prog PUBLIC prd_generated)
# target_link_libraries(my_prog PUBLIC petsird_generated)
# install(TARGETS my_prog DESTINATION bin)

add_subdirectory(../PETSIRD/cpp/generated PETSIRD_generated)
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: prd
name: petsird
channels:
- conda-forge
- defaults
Expand Down
2 changes: 1 addition & 1 deletion python/start.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sys
# Currently hard-wire location of generated files. This will need to change!
sys.path.append('../PETSIRD/python/')
import prd
import petsird

0 comments on commit 2003cfb

Please sign in to comment.