From 99e1858da8b7ede8853188851ec99640034b8352 Mon Sep 17 00:00:00 2001 From: Tim Pillinger <26465611+wxtim@users.noreply.github.com> Date: Thu, 4 Dec 2025 13:26:51 +0000 Subject: [PATCH 1/2] Allow users to specify pip installing cylc packages in editable mode to allow coverage checking --- install-cylc-components/action.yml | 48 ++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/install-cylc-components/action.yml b/install-cylc-components/action.yml index 3b692f3..09bc2e3 100644 --- a/install-cylc-components/action.yml +++ b/install-cylc-components/action.yml @@ -17,6 +17,12 @@ inputs: The branch to use when determining compatible versions, if running in workflow dispatch. required: false + editable_installations: + description: | + Install repositories in editable mode. + This may be useful for running coverage. + default: false + required: false cylc_flow: description: Install cylc-flow (default=true) @@ -113,28 +119,38 @@ runs: meto_rose: ${{ inputs.metomi_rose_tag || steps.get_tag.outputs.rose }} cylc_rose: ${{ inputs.cylc_rose_tag || steps.get_tag.outputs.cylc_rose }} run: | - REQS=requirement.txt - touch "$REQS" + ARGS=() + + if [[ ${{ inputs.editable_installations }} == true ]]; then + EDITABLE="--editable" + else + EDITABLE='' + fi + if [[ ${{ inputs.cylc_flow }} == true ]]; then - echo \ - "cylc-flow[${{ inputs.cylc_flow_opts }}] @ git+https://github.com/${{ inputs.cylc_flow_repo }}@${cylc_flow}" \ - >> "$REQS" + if [[ ${{ inputs.editable_installations }} == true ]]; then + ARGS+=("--editable") + fi + ARGS+=("git+https://github.com/${{ inputs.cylc_flow_repo }}@${cylc_flow}#egg=cylc-flow[${{ inputs.cylc_flow_opts }}]") fi if [[ ${{ inputs.cylc_uiserver }} == true ]]; then - echo \ - "cylc-uiserver[${{ inputs.cylc_uiserver_opts }}] @ git+https://github.com/${{ inputs.cylc_uiserver_repo }}@${cylc_uis}" \ - >> "$REQS" + if [[ ${{ inputs.editable_installations }} == true ]]; then + ARGS+=("--editable") + fi + ARGS+=("git+https://github.com/${{ inputs.cylc_uiserver_repo }}@${cylc_uiserver}#egg=cylc-uiserver[${{ inputs.cylc_uiserver_opts }}]") fi if [[ ${{ inputs.metomi_rose }} == true ]]; then - echo \ - "metomi-rose[${{ inputs.metomi_rose_opts }}] @ git+https://github.com/${{ inputs.metomi_rose_repo }}@${meto_rose}" \ - >> "$REQS" + if [[ ${{ inputs.editable_installations }} == true ]]; then + ARGS+=("--editable") + fi + ARGS+=("git+https://github.com/${{ inputs.metomi_rose_repo }}@${metomi_rose}#egg=metomi-rose[${{ inputs.metomi_rose_opts }}]") fi if [[ ${{ inputs.cylc_rose }} == true ]]; then - echo \ - "cylc-rose[${{ inputs.cylc_rose_opts }}] @ git+https://github.com/${{ inputs.cylc_rose_repo }}@${cylc_rose}" \ - >> "$REQS" + if [[ ${{ inputs.editable_installations }} == true ]]; then + ARGS+=("--editable") + fi + ARGS+=("git+https://github.com/${{ inputs.cylc_rose_repo }}@${cylc_rose}#egg=cylc-rose[${{ inputs.cylc_rose_opts }}]") fi - cat "$REQS" - pip install -r "$REQS" + echo "${ARGS[@]}" + pip install "${ARGS[@]}" From cd53c791288ed8d3dcd285684f653b6b215bf114 Mon Sep 17 00:00:00 2001 From: Tim Pillinger <26465611+wxtim@users.noreply.github.com> Date: Thu, 4 Dec 2025 15:53:18 +0000 Subject: [PATCH 2/2] Update install-cylc-components/action.yml Co-authored-by: Oliver Sanders --- install-cylc-components/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-cylc-components/action.yml b/install-cylc-components/action.yml index 09bc2e3..e245dec 100644 --- a/install-cylc-components/action.yml +++ b/install-cylc-components/action.yml @@ -152,5 +152,5 @@ runs: ARGS+=("git+https://github.com/${{ inputs.cylc_rose_repo }}@${cylc_rose}#egg=cylc-rose[${{ inputs.cylc_rose_opts }}]") fi - echo "${ARGS[@]}" + echo "pip install ${ARGS[@]}" pip install "${ARGS[@]}"