diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 45c3cb3..8677bde 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -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 \ @@ -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 diff --git a/.devcontainer/devcontainer.bashrc b/.devcontainer/devcontainer.bashrc index 1bd9398..aa9919c 100644 --- a/.devcontainer/devcontainer.bashrc +++ b/.devcontainer/devcontainer.bashrc @@ -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 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 71c7118..ed472ee 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ // For format details, see https://aka.ms/devcontainer.json. { - "name": "prd", + "name": "petsird", "build": { "dockerfile": "Dockerfile", "context": ".." @@ -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": { @@ -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, diff --git a/.github/actions/configure-environment/action.yml b/.github/actions/configure-environment/action.yml deleted file mode 100644 index 1eacc5b..0000000 --- a/.github/actions/configure-environment/action.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Configure Environment -description: Configures the conda environment -runs: - using: composite - steps: - - - name: Initial setup - shell: bash - run: | - # filter conda environment file - cat environment.yml | grep -v "#.*\<\local\>" > ci-environment.yml - - - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: yardl - environment-file: ci-environment.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b7b603..216429d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | diff --git a/.gitmodules b/.gitmodules index c1703ce..e392867 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "PETSIRD"] path = PETSIRD - url = https://github.com/ETSInitiative/PRDdefinition + url = https://github.com/ETSInitiative/PETSIRD + branch=main diff --git a/PETSIRD b/PETSIRD index f168903..8f0531d 160000 --- a/PETSIRD +++ b/PETSIRD @@ -1 +1 @@ -Subproject commit f16890385facda7ac949d8ab622e4e8fee3332d2 +Subproject commit 8f0531d2a873a667fe6839d71484af52c80a1b9e diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index a0bbfe0..748450a 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -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) @@ -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) diff --git a/environment.yml b/environment.yml index 499b4df..9e85d4b 100644 --- a/environment.yml +++ b/environment.yml @@ -1,4 +1,4 @@ -name: prd +name: petsird channels: - conda-forge - defaults diff --git a/python/start.py b/python/start.py index 60f13f9..d8aa21e 100644 --- a/python/start.py +++ b/python/start.py @@ -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