ansys / actions

A collection of reusable workflows
https://actions.docs.ansys.com/
MIT License
13 stars 5 forks source link

Decouple main actions logic #166

Open germa89 opened 1 year ago

germa89 commented 1 year ago

📝 Description of the feature

This is a complain I have already rised, but I need to insist.

The current actions are veeery specific and complex. For example, doc-deploy-dev.

In this action we perform:

Proposed solution

I think these underlying actions should be grouped in "private" actions. For instance:

name: "Documentation deploy development version."
description: "Deploy development documentation to GitHub pages."

inputs:
  doc-artifact-name:
    description: "Name of the HTML documentation artifact."
    required: false
[...]

runs:
  using: "composite"
  steps:

    - name: "Checkout"
      uses: pyansys/actions/_doc_deploy_dev_checkout

    - name: "Download needed files"
       id: download
      uses: pyansys/actions/_doc_deploy_dev_download

    - name: "Documentation generation"
      uses: pyansys/actions/_doc_deploy_dev_doc_gen
      with:
          artifact_path: download.output.artifact_path

    - name: "Deploy"
      uses: pyansys/actions/_doc_deploy_dev_deploy

💡 Steps for implementing the feature

To be decided but I am happy to help (when I go back from holidays) if approved the PoC.

🔗 Useful links and references

No response

germa89 commented 1 year ago

Pinging @pyansys/pyansys-core for visibility

jorgepiloto commented 1 year ago

Thanks for raising this concern, German.

I understand that the doc-deploy-* actions are long and may be difficult to read and maintain. However, I am not sure up to which point adding so many "private" actions is going to increase its maintainability over time.

germa89 commented 1 year ago

I understand more actions might increase the maintainability cost, and I agree.

But decoupling the main steps in several smaller (and maybe private) actions will enforce a common API between them and hence making easier individual changes in each one. Having everything in one big action goes (IMHO) against the componetization approach we are trying to take in PyAnsys.

jorgepiloto commented 1 year ago

I am adding this to the list of tasks for the next release. Let us investigate more about it. At least, it should be feasible to isolate the common parts into private actions.

jorgepiloto commented 1 year ago

Postponing this for v4.2.

jorgepiloto commented 6 months ago

Adding this to v6.1. It makes me wonder if we should put the effort in here or in #459.

RobPasMue commented 6 months ago

I would go for #459... seems more appropriate.

RobPasMue commented 6 months ago

They are not mutually exclusive though - but I'd tackle first the other one