ansys / actions

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

fix: command context when no pyproject.toml #557

Closed SMoraisAnsys closed 1 month ago

SMoraisAnsys commented 1 month ago

This PR make the doc-build action compatible with repos without pyproject.toml file. This is typically the case for repositories dedicated to example, e.g. pymapdl-examples or pymechanical-examples.

Note: the default behavior in such case is to not use `poetry command.

Close #544

ansys-reviewer-bot[bot] commented 1 month ago

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

Revathyvenugopal162 commented 1 month ago

We have skip-install for the libraries that don't have pyproject.toml. Example our dev guide https://github.com/ansys/pyansys-dev-guide/blob/ae61cd29db323dbfa6b62dd5dd36af18082d502a/.github/workflows/ci_cd.yml#L54. Isn't it enough for the repos without pyproject.toml file? or perhaps we could combine both if they serve the same purpose?

SMoraisAnsys commented 1 month ago

We have skip-install for the libraries that don't have pyproject.toml. Example our dev guide https://github.com/ansys/pyansys-dev-guide/blob/ae61cd29db323dbfa6b62dd5dd36af18082d502a/.github/workflows/ci_cd.yml#L54. Isn't it enough for the repos without pyproject.toml file? or perhaps we could combine both if they serve the same purpose?

It is not a problem when you install the doc dependencies. It is a problem that arises when the action tries to determine which command should be used to launch the documentation build (using poetry or not). I checked the repo `pyansys-dev-guide``and it seems that you have an error but it is not failing the workflow as you are running in Linux, see below

image

However, when I try to use it in a Windows environment here is what I get

image

Revathyvenugopal162 commented 1 month ago

We have skip-install for the libraries that don't have pyproject.toml. Example our dev guide https://github.com/ansys/pyansys-dev-guide/blob/ae61cd29db323dbfa6b62dd5dd36af18082d502a/.github/workflows/ci_cd.yml#L54. Isn't it enough for the repos without pyproject.toml file? or perhaps we could combine both if they serve the same purpose?

It is not a problem when you install the doc dependencies. It is a problem that arises when the action tries to determine which command should be used to launch the documentation build (using poetry or not). I checked the repo `pyansys-dev-guide``and it seems that you have an error but it is not failing the workflow as you are running in Linux, see below

image

However, when I try to use it in a Windows environment here is what I get

image

got it. thank you for the detailed explanation.